Each computer deals with a certain number of bits at a time. The early hobbyist computers manipulated
8 bits at a time, and so were called “8-bit computers.” Another way to say this was that the computer “word size”
was 8 bits. The computer might be programmed to operate on more than 8 bits, but its basic operations dealt
with 8 bits at a time.
If our program must count, how large a count can an 8-bit computer maintain? Going back to our discussion
of the binary number system, this is the largest number we can represent with 8 bits:
11111111
This number is 128, plus 64, plus 32, plus 16, plus 8, plus 4, plus 2, plus 1—255. That’s it for an 8-bit
computer, unless we resort to some “workaround.”
The first IBM PC used the Intel 8088 processor. It had an 8-bit data bus (meaning it read and wrote 8 bits
at a time from/to peripheral devices), but internally it was a 16-bit computer. How large a count can a 16-bit
computer maintain? Here’s the number, broken into two 8-bit chunks (bytes) for legibility:
1111111 11111111
This number is 32,768 (215), plus 16,384, plus 8192, plus 4096, plus 2048, plus 1024, plus 256, plus 255
(the lower 8 bits we already computed above)—65,535. That’s a much bigger number than the maximum
number an 8-bit computer can work with, but it’s still pretty small for some jobs. You’d never be able to use
a 16-bit computer for census work, for instance, without some “workaround.”
Today, most computers we’re familiar with use a 32-bit word size. The maximum count possible with
32 bits is over 4 billion. The next generation computers will likely use a 64-bit word size, and the maximum
count possible with 64 bits is something like a trillion billions!
The ability to represent a large number directly is nice, but it comes at a cost of “bit efficiency.” Here’s what
the number 6 looks like in a 32-bit word:
00000000000000000000000000000110
There are a lot of wasted bits (leading zeros) there! When memory was more expensive, engineers used to
see bit-efficiency as a consideration, but memory is now so inexpensive that it usually is no longer a concern.
No comments:
Post a Comment