Wikijunior:How Things Work/Binary

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

When you use normal numbers to do normal math, you are using what is called "base ten." In base ten, every time you get to 10 in a column you have to regroup to the next column. Example: Tens|Ones

    9
   +1
   __
   10   Regroup here.

In base ten, also known as decimal, each column has a "place value" 10 times the column to the right. For example, if there was a two in the tens column, that would be 2x10=20. But the column to the left of the tens has a value ten times higher, 10x10=100. So if there was a 5 in that column, it would be equal to 5x100=500.

In binary, or "base two," you regroup each time you get to two. So the column to the left of the ones column must have a place value twice as large. Example: Sixteens|Eights|Fours|Twos|Ones

   1      0     0     1    1    

To convert this number, 10011 (binary), you would multiply each digit by its place value and add all those results together. Example: 1x16=16 | 0x 8= 0 | 0x 4= 0 | 1x 2= 2 | 1x 1= 1 |

16+0+0+2+1=19 Here we see that the binary number 10011 equals the decimal number 19.


[edit] Uses of binary numbers

Computers use binary numbers because in the simplest electrical systems, electricity can only be "on" or "off." In a computer, all of the different systems report their data to the main system by using pulses of "on" and "off." Binary numbers are also very useful to programmers because in a program, the computer often needs to ask "yes" and "no" or "true" and "false" style questions to the different systems,programs, or even the user. Binary can represent any type of information. For example, here's a picture in binary: Image:Binaryface.png

Personal tools