Table of Contents
1. Introduction
- The binary number system uses two digits, ‘0’ and ‘1’, to represent numbers and perform arithmetic operations. The base of the binary number system is 2.
- The base of the binary number system is also called the radix of the number system.
- In the binary number system, a number can be represented as \((11001)_2\). In this example, the base is 2. Each binary digit is called a ‘bit’. The number contains 5 bits.
Binary Numbers Table
| Decimal Number | Binary Number | Decimal Number | Binary Number |
|---|---|---|---|
| 1 | 001 | 11 | 1011 |
| 2 | 010 | 12 | 1100 |
| 3 | 011 | 13 | 1101 |
| 4 | 100 | 14 | 1110 |
| 5 | 101 | 15 | 1111 |
| 6 | 110 | 16 | 10000 |
| 7 | 111 | 17 | 10001 |
| 8 | 1000 | 18 | 10010 |
| 9 | 1001 | 19 | 10011 |
| 10 | 1010 | 20 | 10100 |
2. Binary to Decimal Conversion
- A binary number is converted into a decimal number by multiplying each digit, starting from the rightmost digit, by the corresponding non-negative integer power of 2, starting with exponent 0, i.e., \(2^0,2^1,2^2,2^3,\ldots\), and then adding all the terms to obtain the required decimal number.
- Let us consider a binary number with \(n\) digits, \(B=(a_{n-1}\ldots a_1a_0)_2\). The corresponding decimal number is given by:
\[ D=(a_{n-1}\times 2^{n-1})+\cdots+(a_1\times 2^1)+(a_0\times 2^0) \]
Example: Convert \((11011)_2\) to the decimal system.
Solution: \((11011)_2=(1\times 2^4)+(1\times 2^3)+(0\times 2^2)+(1\times 2^1)+(1\times 2^0)\)
\[ \begin{aligned} \Rightarrow (11011)_2 &= 16+8+0+2+1\\ \Rightarrow (11011)_2 &= (27)_{10} \end{aligned} \]
Conversion of Fractional Binary Number to Decimal Number
Start with the first digit to the right of the binary point and multiply successive digits by the corresponding negative powers of 2, i.e., \(2^{-1},2^{-2},2^{-3},\ldots\), and then add all the terms to obtain the required decimal number.
Example: Convert \((0.1011)_2\) to the decimal system.
Solution: \((0.1011)_2=1\times 2^{-1}+0\times 2^{-2}+1\times 2^{-3}+1\times 2^{-4}\)
\[ \begin{aligned} \Rightarrow (0.1011)_2 &= \frac{1}{2}+0+\frac{1}{8}+\frac{1}{16}\\ \Rightarrow (0.1011)_2 &= \frac{8+2+1}{16}=\frac{11}{16}=(0.6875)_{10} \end{aligned} \]
3. Decimal to Binary Conversion
A positive decimal integer is converted into a binary number by repeatedly dividing it by 2 until the quotient is 1. Write the final quotient, followed by the remainders read from bottom to top.
Example: Convert \((28)_{10}\) into a binary number.
\[ \left.\begin{array}{r|r|r} 2 & 28 & \\ \hline 2 & 14 & 0\\ \hline 2 & 7 & 0\\ \hline 2 & 3 & 1\\ \hline & 1 & 1 \end{array}\right\uparrow \]
\[\Rightarrow (28)_{10}=(11100)_2\]
Conversion of Fractional Decimal Number to Binary Form
To convert a fractional decimal number into a binary number, follow these steps:
- Multiply the fractional number by 2.
- Write the integer part of the product.
- Again, multiply the fractional part of the previous product by 2 and note the integer part.
- Repeat Step 3 until the fractional part becomes zero or the required precision is reached.
- Finally, write the recorded integer parts in order, from first to last.
Example: Convert \((0.3125)_{10}\) to a binary number.
\[ \begin{array}{r} 0.3125\\ \times 2\\ \hline \boxed{0}.6250\\ \times 2\\ \hline \boxed{1}.2500\\ \times 2\\ \hline \boxed{0}.5000\\ \times 2\\ \hline \boxed{1}.0000\downarrow \end{array} \]
\[ \Rightarrow (0.3125)_{10}=(0.0101)_2 \]
4. Operations on Binary Numbers
- Binary Addition: The result of the addition of two binary numbers is also a binary number. To obtain the result, add the digits of the binary numbers column by column. The rules for adding two binary digits without an incoming carry are given in the table:
| Binary Number (1) | Binary Number (2) | Addition | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
- Binary Subtraction: The result of the subtraction of two binary numbers is also a binary number. To obtain the result, subtract the digits of the binary numbers column by column. The rules for subtracting two binary digits without an incoming borrow are given in the table:
| Binary Number (1) | Binary Number (2) | Subtraction | Borrow |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
- Binary Multiplication: The multiplication process for binary numbers is similar to the multiplication of decimal numbers. The rules for multiplying two binary digits are given in the table:
| Binary Number (1) | Binary Number (2) | Multiplication |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
- Binary Division: The division method for binary numbers is similar to the division method for decimal numbers.