< previous page page_451 next page >

Page 451
power or not enough power). Rather than saying enough or not enough, they simplify it to yes or no. Yes or no, or true or false, can be represented as 1 or 0. By convention, 1 means true or yes, but that is just a convention; it could just as easily have meant false or no.
Once you make this great leap of intuition, the power of binary becomes clear: With 1s and 0s you can represent the fundamental truth of every circuit (there is power or there isn't). All a computer ever knows is, Is you is, or is you ain't? Is you is = 1; is you ain't = 0.
Bits, Bytes, and Nybbles
Once the decision is made to represent truth and falsehood with 1s and 0s, binary digits (or bits) become very important. Since early computers could send 8 bits at a time, it was natural to start writing code using 8-bit numberscalled bytes.
Half a byte (4 bits) is called a nybble!

With 8 binary digits you can represent up to 256 different values. Why? Examine the columns: If all 8 bits are set (1), the value is 255. If none is set (all the bits are clear or zero the value is 0. 0255 is 256 possible states.
What's a KB?
It turns out that 210 (1,024) is roughly equal to 103 (1,000). This coincidence was too good to miss, so computer scientists started referring to 210 bytes as 1KB or 1 kilobyte, based on the scientific prefix of kilo for thousand.
Similarly, 1024 * 1024 (1,048,576) is close enough to one million to receive the designation 1MB or 1 megabyte, and 1,024 megabytes is called 1 gigabyte (giga implies thousand-million or billion).
Binary Numbers
Computers use patterns of 1s and 0s to encode everything they do. Machine instructions are encoded as a series of 1s and 0s and interpreted by the fundamental circuitry. Arbitrary sets of 1s and 0s can be translated back into numbers by computer scientists, but it would be a mistake to think that these numbers have intrinsic meaning.

 
< previous page page_451 next page >

If you like this book, buy it!