|
Because computers are made up of digital electronics, internally they respond to two kinds of electrical states: "on" or "off". These may actually be high or low voltage, positive and negative voltage, or some other combination. The key is that there are two conditions. We represent these with two numbers: 0 and 1, and the arithmetic that deals with these two states is called binary arithmetic. Each 0 or 1 in the binary system is termed a bit (short for binary digit). Strings of bits are used to represent numbers larger than 1 (much like combinations of digits are used to represent numbers larger than 9 in our decimal numbering system. Bits in strings of eight are called bytes, and one byte usually represents a single character of data in the computer. It's a little used term, but you might be interested in knowing that a nibble is half a byte (usually 4 bits). Binary Numbers ExplainedLet's look at the concept of binary numbers and bytes a little closer. Think of binary numbers in terms of switches. With two switches you can represent up to four different numbers.
Study the above for a moment -- it brings out an important concept in computers. Do you see it? Look at the decimal number versus the number of numbers. Two binary numbers gives you up to decimal 3, but there are four actual numbers. In our decimal system, we rarely think of the zero; with computers, zero is always thought of as a number. Thus, a single bit represents 2 numbers, two bits give 4 numbers, three bits show 8 numbers, four bits represent 16 numbers, and so forth up to a byte, or eight bits, which represents 256 numbers. (Each added bit doubles the number of numbers.) But, while 8 bits represents 256 numbers the byte 11111111 equals decimal 255. Just to show you the correspondence between binary and decimal numbers here is a table that runs down a few: Binary numbers are formed just like decimal, except there are only two numbers to work with. Exhaust those two numbers and start over with the next position to the left filled with a "1". When you are down to 111 you simply start the entire marked series over again with a 1 in front of it. Thus, every time you add a binary digit to the string you effectively double the number of total decimal numbers available for use. Look at the table. One bit counts to two numbers, two bits count to four numbers, three bits to eight numbers, four bits to 16 numbers, five to 32, six to 64, seven to 128 and finally, one byte (8 bits) counts to 256 numbers.
It is easy to get confused over the point of zero being a digit. A byte with all digits ON represents the decimal number 255 and it is hard to visualize this as the 256th digit in a series, but that is exactly what the computer demands of you. In brief -- start learning to count from zero, not one! Kilobytes and MegabytesThe first place we will use the concept of counting in binary is in talking about computer memory. Early manufacturers stated memory capacity in terms of kilobytes. In the decimal system, the prefix kilo- means 1,000. In the binary system the prefix kilo- means 1,024. It's a little tricky, but 1,024 is 2 to the 10th power, or the number that can be represented by 10 bits that are all set to one. Thus, ten ones in a row represents the decimal number 1,023 and the 1,024th digit. Using this nomenclature, a computer may be described as having 640K (640 kilobytes) of memory, when it really has 640 x 1,024 or 655,360 bytes. By the same token, computers are described as having megabytes and gigabytes of memory, even though there is somewhat more than a million or billion actual bytes available. When 64-bit CPU's become common memory will start to be spoken about in terabytes, petabytes, and exabytes.
Note: There is some lack of standardization on these terms when applied to memory and disk capacity. Memory specifications tend to adhere to the definitions above whereas disk capacity specifications tend to simplify things to the 10th power definitions (kilo=103, mega=106, giga=109, etc.) in order to produce even numbers. AddressingIn addition to capacity, binary numbers are used to address specific locations in memory (or on a disk). To understand addressing, think of each memory location as a post office box containing one character (letter, digit or special character). Each box has an "address" that makes it unique. You should be able to calculate how many boxes a 16-bit binary number can specify: 65536 (64K). In early Intel-based computers memory addresses were specified in blocks of 64K. To see how that comes about think of memory as a series of 256 pages, each containing 256 bytes of information. This is what a 16-bit number can address. Multiply 256 x 256 and you get 65,536; exactly 64K. Of course, the maximum amount of memory that any computer can directly address will depend upon how many bits the CPU has in its address bus (that's the wires the CPU uses to send out addresses, not a local RTD line). Early computers had a 16-bit bus (64K memory), later computers have a larger bus for more. |
Please use the contact
form for questions or comments about this web site.
Copyright © 2001
Computer Knowledge, All Rights Reserved
Pray the Rosary for peace.