|
Binary Code
Computers use a special code of their own to express the digital information they process. It's called binary code because it is made of only two symbols — 0s and 1s. (The "bi" in "binary" means two.) Everything in the computer is represented by this binary code. Every picture, movie, sound, and program that you use in a computer is just a string of 0s and 1s.
But why 0s and 1s? Because those are the only two numbers you need to express the flow of electricity through a transistor or electrical circuit. The transistor or circuit is either on or it's off. It either has power flowing through it or it doesn't. On is 1, off is 0. Everything you say to a computer has to be put in terms of these two numbers. For a computer to execute or respond to a command, it has to be translated into the only language a computer knows: the 0s and 1s of the binary number system. The 0s and 1s represent the on and off of the transistors. When a computer is calculating or processing data it is essentially working with a series of on and offs sent through the circuit. The computer translates the series of ons and offs into binary code. What do you call one of these 0s or 1s? A bit. Which makes sense when you see how many of these bits it takes to represent a word, number, color, graphic or sound. They really are just a "bit" of something bigger. A computer groups these single bits of information together in order to process data at faster speeds. The smallest grouping of these bits is called a byte. A byte is made up of 8 bits.
Binary Code Conversion
The binary system that computers use to store and process information is a base 2 system. It needs only two symbols, 0 and 1. In fact, "binary" comes from the Latin word for two. Compare this to the decimal system you use. The decimal system is a base 10 system. ("Decimal" comes from the Latin word for ten.) It has 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).
So how do you count in a binary system? How do you represent numbers like 103? In a base ten system, you have a 1s place value, a 10s place value, a 100s place value and so on, to represent values. In our example above, there are 0 - 1000s, 1 - 100s, 0 - 10s, and 3 - 1s. If we add them together, we get 100 + 1 + 1 + 1 = 103.
In the binary system, you have a 1s place value, a 2s place value, a 4s place value, a 8s place value, a 16s place value and so on, to represent values. In our example above, 1100111 is the equivalent of 103 in the base 10 system. If you add up all the values you will get an answer of 103. 64 + 32 + 4 + 2 + 1 = 103. You can also see in the example above, the place values double as you move along the list from right to left.
|