Back to Activities page |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The binary system is important in computer technology since any binary number can be represented by, for example, the positions of a series of on-off switches. The "on" position corresponds to a 1, and the "off" position to a 0. Instead of switches, magnetized dots on a magnetic tape or disk also can be used to represent binary numbers: a magnetized dot stands for the digit 1, and the absence of a magnetized dot is the digit 0. Flip-flops-electronic devices that can only carry two distinct voltages at their outputs and that can be switched from one state to the other state by an impulse-can also be used to represent binary numbers; the two voltages correspond to the two digits. Any decimal number can be expressed in the binary system by the sum of different powers of two. Take for example: 101 and convert it to decimal Start from the right 1 x 2^0 + 0 x 2 ^1 + 1 x 2^2 = 1 x 1 + 0 x 2 + 1 x 4 = 1 + 0 + 4 = 5 Another example, the conversion of the binary number 10101101 into a decimal number. Start from the right and (1 × 2^0) + (0 × 2^1) + (1 × 2^2) + (1 × 2^3) + (0 × 2^4) + (1 × 2^5) + (0 × 2^6) + (1 × 2^7) = 173. The following table (8-4-2-1) can be created: Showing the relationship between base 10 and base 2 numbers. Base 10 (decimal) numbers are arranged as powers of 10 10^0 = 1 (ones), 10^1 = 10 (tens), 10^2 = 100 (hundreds), 10^3 = 1000 (thousands). Base 2 (binary) numbers are arranged as powers of 2. 2^0 = 1 (ones), 2^1 = 2 (twos), 2^2 = 4 (fours), 2^3 = 8 (eights)
For the conversion of decimal numbers to binary numbers, the same principle can be used, but the other way around. To convert 15 to a binary number look for the highest power of 2 that is less than or equal to the decimal number in this case 2^4 = 16 (too much) but 2^3 = 8 so 1 can be inserted in the fourth place from the right. The remainder is 7 after subtracting the 8 so we find 2^2=4 which is less than 7 with 7-4=3, so we have a 1 marked in the third place from the right. 2^1 is less than 3 with 3-2=1 so we have a 1 marked in the second position from the right. With one left over all we have left is 2^0=1 so we have 1 marked in the far right position. Thus we have 15 = 1111. Try 64 converted to binary (hint: 8*8 = 64, and 2^3 = 8) Arithmetic operations in the binary system are extremely simple. The basic rules are: 1 + 1 = 10, and 1 × 1 = 1. Zero plays its usual role: 1 × 0 = 0, and 1 + 0 = 1. Addition, subtraction, and multiplication are done in a fashion similar to that of the decimal system. Use this converter when you have learned why and how to convert. (Hint: Press the tab button after entering the number and the base to convert) |
Email Jim Dildine
Date Last Modified: 8/31/99
James P. Dildine