Digital and Binary Concepts

We're all used to counting up to 10 on our fingers. We know that there are 10 digits, from 0 to 9, and after 9 comes 10. It's so obvious even little children understand it. But what if everyone around the world had fewer fingers, say, four on each hand? Would we all count differently?

We probably would. We'd likely have just eight digits, from 0 to 7. What comes after 7? If you guessed 8, try again. When you have only eight fingers to count on the number that comes after 7 is 10.

If that seems weird, watch how the odometer in your car works. After you drive 9 miles, the odometer rolls over to 10. And after you've driven 99 miles it rolls over to 100. Obvious, right? The odometer rolls over every time it runs out of digits. The number 9 is the last digit it knows, so every time you add another mile it has to change the 9 back to a 0 and then increase the number beside it by one. In grade school we called that “adding one to the tens column.”

The system works just the same way no matter how many digits, or how many “fingers,” you have. If 7 is the last number your odometer knows, it will roll over from 7 to 10. Eight miles later it will roll over from 17 to 20, and then from 27 to 30, and so on. After 77 comes 100. We're accustomed to writing the numbers 8 and 9 because we happen to have 10 fingers. If we'd all been born with eight fingers the numbers 8 and 9 would never have been invented and this system would seem perfectly natural.

Here comes the tricky part. What if you had only two fingers? With only two digits, you'd be limited to the numbers 0 and 1. Your odometer would be rolling over almost constantly because after 0 comes 1, but then after 1 comes 10. In fact, with a two-number system counting from 0 up to 8 would look like this: 0, 1, 10, 11, 100, 101, 110, 111, 1000. Yes, that last number is really eight, not one thousand, in the two-number system.

As you've probably figured out by now, computers and other digital electronic products all use this two-number system. They're surprisingly limited when it comes to counting. Unlike most of us who have 10 fingers to count on, digital electronic systems have only two.

You've probably also guessed that this odd two-number system is called binary. The reason electronic systems use binary numbers instead of our familiar 10-number system is because they rely on electricity for their “fingers.” A small amount of electric voltage on a wire or in a chip is a 1; if there's no voltage it's a 0. Programmers, mathematicians, and other software people call this system binary. Electrical engineers, chip designers, and other hardware types call it digital. Digital or binary, it means the same thing: a system of counting that uses only two numbers, 0 and 1.

Tech Talk

The word digital comes from the Greek word for finger. In fact, we sometimes call our own fingers digits. Binary also comes from a Greek word meaning one-half or something that has two parts. Biathlon, biennial, and bilingual all come from the same Greek root as binary.


Table 9.1 starts you off with the first 16 numbers written out in both the binary system and our more familiar system with 10 numbers. Binary numbers obviously take more space to write than “normal” numbers because each digit is less powerful, so to speak. It's really the same number in both columns; they just look different. By the same token, Chinese calligraphy takes less space to write than English words because the Chinese characters are more compact. They say more with each character. Yet both English and Chinese newspapers can say the same things; they just look different.

As funny as it looks, the binary system of numbers is just as useful and just as powerful as our own. There's no limit to the size of binary numbers; infinity is still infinity, no matter how you write it. Computers use binary numbers to balance our checkbooks, play games, and surf the Web. Unless you're a computer programmer, you'd never notice your PC was using such a strange system of numbers. If you are a computer programmer, you quickly become accustomed to this alternate number system, like learning to read a second language.

The binary, or digital, system was chosen by the early computer engineers because it is so easy to create using electricity. Simply passing a small voltage down a wire is like sending the number 1. More wires creates more number positions, so five wires can send five-digit numbers from 00000 (zero) to 11111 (thirty-one). Twenty wires can send even bigger numbers, and so on. As we saw in Chapter 6, “Essential Guide to Microprocessors,” a 32-bit microprocessor chip uses 32 wires at a time to store, send, and receive numbers.

Table 9.1. The first 16 numbers, from 0 to 15, in both binary and our more familiar “decimal” or base-10 system of counting. Both columns show exactly the same numbers written different ways.
BinaryDecimal
00
11
102
113
1004
1015
1106
1117
10008
10019
101010
101111
110012
110113
111014
111115

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.187