First, a math lesson...
Computer data is in "digital" format. That is to say, whether it is colors, words,
pictures or animation, it is all "coded" in terms of binary digits, that is "0s"
and "1s." In the first computers, "0" equaled "off" and "1"
equaled "on." This made it easy to program them using a series of "on" and
"off" switches. Current computers are still based on this simple system but
are exponentially more powerful.
The Binary System is one of numbers at the power of 2:
- "2 to the power of 0" = 1,
- "2 to the power of 1" = 2,
- "2 to the power of 2" = 4,
- "2 to the power of 3" = 8,
- "2 to the power of 4" = 16,
- "2 to the power of 5" = 32,
- "2 to the power of 6" = 64, etc.
These are written as: 2¹, 2², 2³, etc. Specificationssuch
as how fast it runs and how much memory it containsare only stated using these
sets of numbers.
Every positive integer can be written as sum of powers of 2:
| Number
| Of powers of 2 | 64 | 32 | 16
| 8 | 4 | 2 | 1 | | 45
| 32+8+4+1 | off | on | off | on
| on | off | on | | 74
| 64+8+2 | on | off | off | on
| off | on | off | | 77 | 64+8+4+1
| on | off | off | on | on
| off | on |
These on and off switches can be translated into information as follows:
| Decimal System | Binary System | | 45
| 0101101
(or simply 101101) | | 74 | 1001010 |
| 77 | 1001101 |
Now for some definitions...
- Radix: or "base," or "number base." In a positional representation
of numbers, a "radix" is that integer by which the significance of one digit
place must be multiplied to give the significance of the next higher digit
place. Conventional decimal numbers are radix ten, binary
numbers are radix two.
- Bit: stands for a "Binary digIT" (e.g. the number "2"
equals the binary digit "01").
- Octal: is shorthand notation for binary code. Octal, which stands for Base
8, uses a number representation using the digits 0-7 only, with the right-most
digit counting ones, the next counting multiples of 8, then 8^2 = 64, etc. (e.g.
octal "177" is digital "127" as seen in the chart below).
| digit |
weight |
value |
| 1 |
8^2 = 64 |
1* 64 = 64 |
| 7 |
8^1 = 8 |
7* 8 = 56 |
| 7 |
8^0 = 1 |
7* 1 = 7 |
| 177 = 127 |
Each octal digit equals 3 Bits (e.g. ["72" = 111010 (111(7) + 010(2) )].
If the number has a decimal point, start at point and divide into 3s going
in both directions (e.g. ["241.46" = 10100001.10011 (10(2) + 100(4) + 001(1)
.100(4) + 11(6) )]). NOTE: Octal system used to be widespread back
when many computers used 6-bit bytes, as a 6-bit byte can be conveniently
written as a two-digit octal number. These days, a byte is almost always
8-bit long, and the octal system has lost most of its appeal to the hexadecimal
system.
- Hexadecimal: Base 16. A number representation using the digits 0-9, with
their usual meaning, plus the letters A-F (or a-f) to represent hexadecimal
digits with values of (decimal) 10 to 15. The right-most digit counts ones,
the next counts multiples of 16, then 16^2 = 256, etc. (e.g. the hexadecimal
for the word "BEAD" is decimal "48813" as seen in the chart below).
| digit |
weight |
value |
| B = 11 |
16^3 = 4096 |
11*4096 = 45056 |
| E = 14 |
16^2 = 256 |
14* 256 = 3584 |
| A = 10 |
16^1 = 16 |
10* 16 = 160 |
| D = 13 |
16^0 = 1 |
13* 1 = 13 |
| BEAD = 48813 |
- ASCII (American Standard Code for Information Interchange): The
basis of character sets used in almost all present-day computers. US-ASCII
uses only the lower seven bits (character points 0 to 127) to convey some
control codes, space, numbers, most basic punctuation, and unaccented letters
a-z and A-Z. More modern coded character sets (e.g., Latin-1, Unicode) define
extensions to ASCII for values above 127 for conveying special Latin characters
(like accented characters, or German ess-tsett), characters from non-Latin
writing systems (e.g., Cyrillic, or Han characters), and such desirable glyphs
as distinct open- and close-quotation marks. ASCII replaced earlier systems,
which used fewer bytes.
- Bytes: Usually means 8 Bits (e.g. 10001011). Thus, for PCs
that used 7-bit ASCII (ASCII is the basis for most operation code),
a Byte was 7 bits; for PCs using 6-bit ASCII, a Byte was 6
bits, for PCs using 16-bit technology, a Byte was 16 bits
and for current PCs using 32-bit technology, a Byte is 32 bits.]
- Nibble: 4 Bits (half of an 8-bit Byte).
- Hexadecimal Digit: 4 Bits, a hexadecimal digit stands for a Nibble
Byte, which is 8 Bits.
- Kilobyte: 1,024 Bytes.
- Megabyte: 1,023 Kilobytes. [1,024 x 1,024 = 1,048,576 Bytes]
- Gigabyte: 1,024 Megabytes. [1,024 x 1,048,576 = 1,073,741,824 Bytes]
- Terabyte: 1,024 Gigabytes. [1,024 x 1,073,741,824 = 1,099,511,627,776 Bytes!]
- Microchip: Sometimes just called a "chip," a microchip is a unit of
packaged computer circuitry (usually called an "integrated circuit") that is
manufactured from silicon at a very small scale. Microchips
are made for program logic (logic or microprocessor chips) and for computer
memory (memory or RAMrandom access memorychips). Microchips are
also made that include both logic and memory and for special purposes such as
analog-to-digital conversion, bit slicing, and gateways.
So you can see, when you have a computer with a 20 Gig Hard Drive (20 Gigabytes of
memory), you can have room for a tremendous amount of information (21,474,836,480
Bytes to be exact!)
So How Do Computers Work?
Computers contain thousands of tiny electrical switches located in microchips.
As expected, each switch can be either "off" or "on." The various combinations of
which switches are "off" and which switches are "on" dictate what the
computer is doing at any given moment. You can imagine with thousands of switches operating,
there is virtually an infinite number of combinations of "off"s and "on"s. This explains
why computers can function in so many different waysfrom a adding machine to
a word processor!
If you think of a light switch, there are only two distinct
conditions which are possible, off or on. What happens if there are two switches
controlling two separate lights? We'll call the lights "A" and "B". Now there are
four distinct conditions which are possible as listed below:
- condition "0" with both lights "off"
- condition "1" with light "A" on and light "B" off
- condition "2" with light "A" off and light "B" on
- condition "3" with both lights on
Notice that our numbering system starts from "0." This is because with both lights
off there is no current flowing to either light, so we call it condition "0." Look
around your place and see if you can find a triplet panel3 switches grouped
together to control three separate lights ("A", "B", and "C"). Can you guess how
many distinct conditions are possible with three switches at your disposal? The
answer is 8 conditions. As discussed before, we start the numbering from "0":
- condition "0" with all three lights off
- condition "1" with light "A" on, light "B" off and light "C" off
- condition "2" with light "A" off, light "B" on and light "C" off
- condition "3" with light "A" on, light "B" on and light "C" off
- condition "4" with light "A" off, light "B" off and light "C" on
- condition "5" with light "A" on, light "B" off and light "C" on
- condition "6" with light "A" off, light "B" on and light "C" on
- condition "7" with all three lights on
Why did your home builder group these light switches together as a triplet panel?
The answer is efficiency and convenience. It is much easier to control all three
lights from one position in the room than it would be to move around from wall to
wall to control each light separately. Computer designers also found it much more
efficient to group computer switches together into panels. Computers started by
grouping eight switches on each panel. Would you care to guess how many distinct conditions
are possible with eight switches at your disposal? Here's a clue by reviewing what
was discussed above:
- with 1 switch, there were 2 distinct conditions possible (conditions "0 - 1")
- with 2 switches, there were 4 distinct conditions possible (conditions "0 - 3")
- with 3 switches, there were 8 distinct conditions possible (conditions "0 - 7")
Do you see a pattern to this yet?
- with 4 switches there are 16 distinct conditions possible (conditions "0 - 15")
- with 5 switches there are 32 distinct conditions possible (conditions "0 - 31")
- with 6 switches there are 64 distinct conditions possible (conditions "0 - 63")
- with 7 switches there are 128 distinct conditions possible (conditions "0 - 127")
- with 8 switches there are 256 distinct conditions possible (conditions "0 - 255")
It seems incredible but it is true. With 8 switches grouped together on one panel,
there are 256 unique and distinct conditions that can be controlled from this panel!
In computer terminology, each switch on the panel is called a bit. The full
group of 8 switches is called a byte. A byte can represent any number from
0 to 255. We all know that computers deal with numbers bigger than 255. If a number
is bigger than 255, the computer requires yet another byte to make the number.
For example, the number 256 would take up 2 bytesthe first one would hold the
maximum amount of 255 and the second one would hold the amount of 1. The sum of 255
+ 1 is therefore 256. Let's try another example. How many bytes would the computer
need to hold the number 65,025? Did you guess 255 bytes? Incorrect! The computer
only requires 2 bytes to hold the number 65,025! This time the computer multiplies
the value of 255 in the first byte by 255 in the second byte to give the value of
65,025. To hold a bigger number, like 67000, the computer would require yet another
byte for a total of 3 bytes.
How does the computer know that it should multiply the 2 bytes to create the number
65,025 and add 2 bytes to create a number like 256? This is the responsibility of
the computer's Central Processing Unit (CPU) or the brain of the computer.
The CPU is contained on a tiny microprocessor (about 1/4-inch square) and
is programmed at the factory to be able to look at any of the 8-bit panels (or
bytes) and figure out what it is to do with them.
Click here to learn more about HOW COMPUTERS WORK.
|