The real number system which we have been using to enumerate and evaluate consists of numbers of base 10 system. That is, the digits used in the system 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 are all the possible remainders, the division by 10 can yield. Binary number system is a base 2 system consisting of only two digits 0 and 1. Because of this simple structure, binary numbers are used in computing systems for processing and computing data. |
The place value chart for the Binary system of numbers is given below:
The place values with negative powers represent the fractional part of the number and a dot separates it from the whole part as it is done in Decimal System.
Binary numbers are represented using only the two digits 0 and 1. Suppose a number is represented in Binary system as 110101. To find the representation in Decimal system, we multiply each digit by the corresponding place value (a power of 2) and add all these products.
Digits | 1 | 1 | 0 | 1 | 0 | 1 |
Place Values | 2^{5} | 2^{4} | 2^{3} | 2^{2} | 2^{1} | 2^{0} |
Decimal value = 1 x 2^{5} + 1 x 2^{4} + 0 x 2^{3} + 1 x 2^{2} + 0 x 2 + 1 x 1
= 32 + 16 + 0 + 4 + 0 + 1 = 53
Counting is done on Binary numbers, in a manner done in decimal system. The right most digit in any representation has the least place value and the counting starts from here. Once the highest valued digit takes that place, the right most digit starts over from 0 and the immediate digit to the left is incremented. In general, a higher order digit is incremented if all the lower order digits are exhausted, and the lower order digits start over. So, for Binary counting, let us start with all zeros. For the sake of simplicity, we consider only four places in a number. The same principle of counting can be extended to any number of places required.
0000 - Counting Starts
0001 - Right most digit is incremented
0010 - As the digits are exhausted, the immediate higher order digit is incremented and the right most digit starts over
0011 - Right most is again incremented
0100 - As the two right most digits are exhausted, the immediate higher order digit is incremented and the right most two digits start over.
0101
0110
0111
1000 - The counting pattern continues
Fractions have an exact binary representation only if the denominator is a power of 2.
Decimal equivalent to Binary equivalent is as follows:
$\frac{1}{2^1}$ = $\frac{1}{2}$ = 0.1
$\frac{1}{2^2}$ = $\frac{1}{4}$ = 0.01
$\frac{1}{2^3}$ = $\frac{1}{8}$ = 0.001
If the denominators are not exact powers of 2, the fractions are approximated to an infinite sum of unit fractions, with denominators as powers of 2. The binary representation for such fractions are non terminating with repeating pattern. Earlier we saw, a binary number is written in decimal form by multiplying the digits by the respective place values and adding the products.
Solved Examples
Question 1: Write 1011101 as a decimal number.
Solution:
Solution:
The digits and the corresponding place values are mapped as follows:
= 1 x 64 + 0 x 32 + 1 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1
= 64 + 16 + 8 + 4 + 1 = 93
Digits | 1 |
0 | 1 | 1 | 1 | 0 | 1 |
Place Values | 2^{6} | 2^{5} | 2^{4} | 2^{3} | 2^{2} | 2^{1} | 2^{0} |
= 1 x 64 + 0 x 32 + 1 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1
= 64 + 16 + 8 + 4 + 1 = 93
Question 2: Convert 125 (base 10) to binary form.
Solution:
Solution:
The process involves continuous division of 2 and writing the remainders together.
The remainders in each division is written on the side. The binary representation is written writing the remainders in the reverse order, starting from the last.
Hence, we got 125_{10} = 1111101_{2}.
The remainders in each division is written on the side. The binary representation is written writing the remainders in the reverse order, starting from the last.
Hence, we got 125_{10} = 1111101_{2}.
The rules for adding binary digits are as follows:
0 + 0 = 0 No digit is carried over
1 + 0 = 1 No digit is carried over
0 + 1 = 1 No digit is carried over
1 + 1 = 0 1 is carried over
For example, let us add 1101001_{2} and 1011_{2}.
1 0 1 1 <-- Numbers carried over 1 1 0 1 0 0 1 + 1 0 1 1 ------------- 1 1 1 0 1 0 0 --------------
Multiplying Rules are as follows:
1 x 1 = 1
1 x 0 = 0
0 x 1 = 0
0 x 0 = 0
Two binary numbers are multiplied applying the above rules just as decimal multiplication is done. The addition of the Products is done using the rules for binary addition.
Let us multiply 1 0 0 1_{2} and 1 1 0 1_{2}
1 0 0 1 x 1 1 0 1 ------------- 1 0 0 1 0 0 0 0 x 1 0 0 1 x x 1 0 0 1 x x x ------------- 1 1 1 0 1 0 1 -------------The following table gives binary representation of decimal numbers 0 to 16.
Decimal | Binary |
0 |
0000 |
1 |
0001 |
2 |
0010 |
3 |
0011 |
4 |
0100 |
5 |
0101 |
6 |
0110 |
7 |
0111 |
8 |
1000 |
9 |
1001 |
10 |
1010 |
11 |
1011 |
12 |
1100 |
13 |
1101 |
14 |
1110 |
15 |
1111 |