[QUOTE=Cartooniverse]
I get that on a CD or DVD, the absence of a pit means a 1 ( or 0, whichever ) and a pit means 0 ( or 1, whichever ). I get that punchcards have holes, which create a negative and offset the presence of smooth paper in an area that COULD have a hold. Smooth can equal 1, absent 0. Fine.
[/QUOTE]
Actually, CD encoding is much more fiendishly complex than that, but to go into it here would be cruel.
[QUOTE=Cartooniverse]
What I have never undertood is how one can write a “line of code” with lots of zero’s and one’s in it that somehow equals a command that says " when I move this tracball in a random fashion I will cause a previously created static icon to float around on the screen area in a fashion that mimics perfectly the movements of the dots on the tracball".
To me, that is a very complex instruction set. ( forget the set that must exist that creates the optical reader in the tracball nest, AND the set that must exist that creates a static icon of a crooked arrow. )
[/QUOTE]
Let’s take your example. If you open up a mechanical, wired mouse, it has three wheels, two oriented orthogonally to each other, and a diagonal spring-loaded one that keeps the trakball pressed up against the other two. as the ball spins, the two orthogonally-oriented wheels spin proportionally to the component vectors of the motion of the ball. The speed of their rotation is measured (I’m not sure, but I suspect the number of rotations is measured against some internal clock), and the information is sent to the computer, which translates it, moment by moment, into a set of screen coordinates.
This set of coordinates is interpreted as the location on screen at which the upper left hand corner of an array of pixels (each of whose color and brightness has been carefully set so that together they represent a crooked arrow) should be drawn. This information is plugged into a much larger set of data that describes how every pixel on the screen should look, based on what windows and toolbars are open, where the mouse is, and what should be visible “behind” them. This data is sent to the monitor, and the pixels appear on screen, at whatever speed the screen refresh rate is, with the mouse in a new position each time. It’s essentially an interactive animated cartoon.
Now, at its base level, the computer can only carry out very simple functions, such as “transfer this informaton from here to there”, or “combine these two pieces of information according to this rule”. etc., so the algorithms of which of these commands have to be done in what order in order to get the result you want have to be worked out well in advance. Some of them are so routine, that we can assign them code words, and simply use the code words to make a whole raft of these sequences perform, once the code words have been translated into the correct sequence of computer commands.
[QUOTE=Cartooniverse]
How can a language work that is based solely on a 1 and a 0 ?
[/QUOTE]
Well, with just “a” 1 and “a” 0 you can’t do too much. The reason ones and zeros are used is because the hardware of a computer is really just a set of electronically controlled switches (I’ll call them bits) that are constantly turning one another on and off in various combinations. You build your computer system so that each combination place your machinery in some state, whether it’s calculating, placing a pixel on screen or printing part of a document.
So a 1 or 0 represents a certain state of a particular bit. So I could assign that bit to represent one of two options. Put two bits together, and the various combination of on and off for both give me four things I can represent. Each bit I add doubles my options. For instance, I could make them represent the digits 0 through 3, either according to binary notation from mathematics, or some other scheme. So I can represent any number I want to if I have enough bits to create enough combinations to assign all the values to.
I mentioned already that the computer can carry out a set of basic instructions. Each of these is numbered, so I can set things up so that if a certain combination of bit values is presented to the chip, it will carry out a particular command. If I want the instructions to be performed on numerical data, I can use the bits to store that as well.
Text? Remember the old “A=1, B=2” cipher? Extend that to include both capital and lower case letters, digits, punctuation, symbols, tabs, spaces, and commands like “new line”, and you have the ASCII set, which needs 7 bits to represent all that. Extend the number of bits to 16 and you can do Unicode, which has a number for almost every written character ever concieved by man.
[QUOTE=Cartooniverse]
I’ve been reading up on a fellow whose math laid some of the foundation for early computers and he used ( literally ) a roll of paper that looked like toilet paper. A long spool with squares demarked, and each square had a zero or one, or set thereof.
[/QUOTE]
Sounds like a Turing or a Post machine.
Turing showed that you could perform any calculation using such a device, which only has the ability to move the paper tape back and forth, and make or read/remove a mark on the paper.
Later it was proven mathematically that a multi-track Turing machine (which is essentially what a computer is a physical model of) performed no better than a Turing Machine.
A computer is, in fact, a Universal Turing Machine. That is, one whose input is a description of a particular variety of Turing Machine along with input typical of that machine. Its output is the expected responsive behavior of that machine.
A pocket calculator is a Turing machine. I can create a description of a calculator, load it into a UTM (computer), provide input of the sort I would give a calculator, and its response is that of a calculator. That’s why your OS’s calculator works like a calculator.
[QUOTE=Cartooniverse]
And?? We use 26 letters in our modern Roman alphabet. Other languages use more or less letters, but the pattern is ( I think its safe to say ) similar all over the planet. We create a set of icons that, when combined, allow us to assign an idea to a set of icons.
I struggle to understand how one can do that with only two icons, instead of a few dozen. Or, even 15 or 18.
[/QUOTE]
One example, using five bits:
00001 = A
00010 = B
00011 = C
00100 = D
00101 = E
00110 = F
00111 = G
01000 = H
01001 = I
01010 = J
01011 = K
01100 = L
01101 = M
01110 = N
01111 = O
10000 = P
10001 = Q
10010 = R
10011 = S
10100 = T
10101 = U
10110 = V
10111 = W
11000 = X
11001 = Y
11010 = Z
And I still have six combinations of one’s and zeros I could assign to other things, like basic punctuation:
00000 = space
11011 = .
11100 = ,
11101 = "
11110 = ’
11111 = ?
00111001011010000000010011010011111