| Binary Numbers |
Understanding Binary Numbers
(How Computers Store Information)
|
|
|
|
|
|
|
|
|
Unless you have a very small
bank account, this doesn't seem like a great method of storing numbers.
Think about this... with a single switch we can store two numbers, either
a "ZERO" or a "ONE". What happens if we add more switches?
Imagine a row with four switches. Each switch can either be ON or
OFF
just like the single switch... so how many numbers can we make?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As you can see, by adding only
three more switches we increased our storage capacity from only two numbers
(0) or (1) to sixteen numbers, (0) to (15).
Can you see a pattern to the numbers? Every time switch "A" is turned
ON,
the number is an odd number. This is because switch "A" has a weight
of (1). The next switch, "B" has a weight of (2),
then switch "C" has a weight of (4), and lastly switch "D"
has a weight of (8). To get any number simply add up the weights
of the switches that are turned ON.
| SWITCH
D = 8 |
SWITCH
C = 4 |
SWITCH
B = 2 |
SWITCH
A = 1 |
NUMBER STORED |
| ON | OFF | ON | OFF | 8 + 2 = 10 |
The name for a group of four
switches, or four binary digits is called a NIBBLE. A NIBBLE
is made of four BITS and can store numbers from 0 to 15,
for a total of 16 possible numbers. If you were to connect two NIBBLES
together, you would have a group consisting of eight BITS. A group
of eight BITS is called a BYTE. One BYTE can store
numbers from 0 to 255, for a total of 256 numbers.
If you were to then connect
two BYTES together you would have four NIBBLES, or a total
of 16 BITS. With this many BITS, you can store large numbers
from 0 to 65535, for a total of 65536 numbers! Let's take another
look at this...
| WORD | BYTE | NIBBLE | BIT | LARGEST NUMBER POSSIBLE |
| 1/16 | 1/8 | 1/4 | 1 | 1
(0 OR 1) |
| 1/4 | 1/2 | 1 | 4 | 16
(0 TO 15) |
| 1/2 | 1 | 2 | 8 | 256
(0 TO 255) |
| 1 | 2 | 4 | 16 | 65536
(0 TO 65535) |