Binary and Decimal Converstion
Binary and Decimal Converstion
Divide the given decimal number by “2” where it gives the result along with the remainder.
If the given decimal number is even, then the result will be whole and it gives the remainder “0”
If the given decimal number is odd, then the result is not divided properly and it gives the remainder “1”.
By placing all the remainders in order in such a way, the Least Significant Bit (LSB) at the top and Most Significant Bit
(MSB) at the bottom, the required binary number will obtain.
Convert the given decimal number 294 into a binary number.
147 ÷ 2 73 1 1
73 ÷ 2 36 1 1
36 ÷ 2 18 0 0
18 ÷ 2 9 0 0
9÷2 4 1 1
4÷2 2 0 0
2÷2 1 0 0
1÷2 0 1 1 (MSB)
Therefore, the binary equivalent for the given decimal number 29410 is 1001001102
29410 =1001001102
Decimal to Binary Conversion Solved Examples
Example 1: Convert 16010 to binary Number
Solution:
Given: Decimal Number = 16010
160 ÷ 2 80 0 0 (LSB)
80 ÷ 2 40 0 0
40 ÷ 2 20 0 0
20 ÷ 2 10 0 0
10 ÷ 2 5 0 0
5÷2 2 1 1
2÷2 1 0 0
1÷2 0 1 1 (MSB)
Therefore, 16010 = 101000002
Example 2: Convert 1710 into a binary number
Solution:
Given: Decimal Number = 1710
17 ÷ 2 8 1 1 (LSB)
8÷2 4 0 0
4÷2 2 0 0
2÷2 1 0 0
1÷2 0 1 1 (MSB)
Therefore, 1710 = 100012
Questions
Here are a few questions that are given for students, so that they can solve them and get good
practice. Solving these problems will help students to increase their speed and attain good marks in
the exams.
Question 1: Convert 0110101 to decimal.
Solution:
Given Binary number is 0110101
0110101 = (0 × 26) + (1 × 25) + (1 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20)
= 0 + 32 + 16 + 0 + 4 + 0 + 1
= 53
Therefore, Binary Number 0110101 = 53 Decimal number
Question 2: Convert the binary number 10100011 to decimal.
Solution:
Given binary number is 10100011
Using the conversion formula,
10100011 = (1 × 27) + (0 × 26) + (1 × 25) + (0 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
= 128 + 0 + 32 + 0 + 0 + 0 + 2 + 1
= 163
Therefore, binary number 10100011 = 163 decimal number
Question 3: Convert the binary number 11101111 to decimal.
Solution:
Given binary number is 11101111
Using the conversion formula,
11101111 = (1 × 27) + (1 × 26) + (1 × 25) + (0 × 24) + (1 × 23) + (1 × 22) + (1 × 21) + (1 × 20)
= 128 + 64 + 32 + 0 + 8 + 4 + 2 + 1
= 239
Therefore, binary number 11101111 = 239 decimal number
Octal to Decimal conversion
Definition
A number system which has its base as ‘eight’ is called an Octal number system. It uses numbers from 0 to 7. Let us take an
example, to understand the concept. As we said, any number with base 8 is an octal number like 24 8, 1098, 558, etc.
Like Octal number is represented with base 8, in the same way, a binary number is represented with base 2, decimal number with
base 10
Solved Example
Problem: Suppose 560 is a decimal number. Convert it into an octal number.
Solution: If 560 is a decimal number, then,
560/8=70 and remainder is 0
70/8=8 and remainder is 6
8/8=1 and remainder is 0
And 1/8=0 and remainder is 1
So the octal number starts from MSD to LSD, i.e. 1060
Hexadecimal to decimal
In the hexadecimal number system, the numbers are represented with base 16. It is also pronounced sometimes as ‘hex’. Just like the binary number, octal number and
decimal number whose base representation are 2, 8 and 10, respectively, the hexadecimal conversion is also possible which can be represented in a table. This concept is
widely explained in the syllabus of Class 9. The list of 16 hexadecimal digits with their decimal, octal and binary representation is provided here in the form of a table, which
will help in number system conversion.
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
242/16 q 15 r2
Binary addition is much like your normal everyday addition (decimal addition), except that it carries on a value of 2 instead of a
value of 10.
For example: in decimal addition, if you add 8 + 2 you get ten, which you write as 10; in the sum this gives a digit 0 and a carry of
1. Something similar happens in binary addition when you add 1 and 1; the result is two (as always), but since two is written as 10
in binary, we get, after summing 1 + 1 in binary, a digit 0 and a carry of 1.
Therefore in binary:
0+0=0
0+1=1
1+0=1
1 + 1 = 10 (which is 0 carry 1)
Suppose we would like to add two binary numbers 10 and 11. We start from the last digit. Adding 0 and 1, we get 1 (no
carry). That means the last digit of the answer will be one. Then we move one digit to the left: adding 1 and 1 we get 10.
Hence, the answer is 101. Note that binary 10 and 11 correspond to 2 and 3 respectively. And the binary sum 101
corresponds to decimal 5: is the binary addition corresponds to our regular addition.
Problem: 1 + 11 = ?.
Answer: 1 + 11 = 100.
Explanation:
1
+ 1 1
If we take the first column from the right, we get the binary addition of 1 and 1, which is:
1 + 1 = 10 = 0 carry 1
The second column from the right becomes: 0 + 1 + 1 (from the carry). In binary addition:
0 + 1 + 1 = 10 = 0 carry 1
Therefore, the second rightmost digit is a 0 and a 1 is carried to the next column. The next column doesn't exist (there are no
numbers), therefore the 1 drops into the next slot of the answer. So our answer is: 1 0 0
Problem: 1010 + 11 = ?.
Answer: 1010 + 11 = 1101.
Explanation:
1 0 1 0
+ 1 1
For the first column (from the right) we have 0 + 1. In binary addition:
0 + 1 = 1,
1 + 1 = 0 carry 1 .
Therefore, the second digit (from the right) in the answer is 0 and we carry 1 to the next column. The next column now contains 0
+ 0 + 1 (from the carry). In binary addition:
0 + 0 + 1 = 1,
so that the next digit that we can fill in for the answer is 1. The final column contains 1 + 0. In binary addition:
1+0=1.