Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Number System in Digital Electronics

Part II
Prof. Neeraj Bhargava
Pooja Dixit
Department of Computer Science, School of
Engineering & System Sciences
MDS University Ajmer, Rajasthan
Binary to Octal
• Example − Convert binary number 10010110 into octal number.

First convert this into decimal number = (10010110)2


= 1x27+0x26+0x25+1x24+0x23+1x22+1x21+0x20
= 128+0+0+16+0+4+2+0
= (150)10 Then, convert it into octal number
= (150)10
Then, convert it into octal number

(226)8 Ans
Binary to Octal
Example 2: Convert 10101012 to octal
• Solution:
• Given binary number is 10101012
• First, we convert given binary to decimal
• 10101012 = (1 * 26) + (0 * 25 ) + (1 * 24) + (0 * 23) + (1 * 22) + (0 * 21) + (1 * 20)
• = 64 + 0 + 16 + 0 + 4 + 0 + 1
• = 64 + 21
• 0101012= 85 (Decimal form)
• Now we will convert this decimal to octal form

• Therefore, the equivalent octal number is 1258.


Binary to Octal
• Example 3: Convert 011012 to octal
• Solution:
• Given binary number is 011012
• First we convert given binary to decimal
• 011012 = (0 * 24) + (1 * 23) + (1 * 23) + (0 * 2) + (1 *20)
• = 0 + 8 + 4 + 0 +1
• 011012= 13 (Decimal form)
• Now we will convert this decimal to octal form

• Therefore, the equivalent octal number is 158.


Binary to Octal
Trick 2
• Example-1 − Convert binary number 1010111100 into octal number. Since
there is no binary point here and no fractional part. So,

• Therefore, Binary to octal is.


• = (1010111100)2 = (001 010 111 100)2 = (1 2 7 4)8 = (1274)8
Number Base Conversion
Example-2 Convert binary number 0110 011.1011 into octal number. Since
there is binary point here and fractional part. So,

Therefore, Binary to octal is.


= (0110 011.1011)2 = (0 110 011 . 101 1)2 = (110 011 . 101 100)2 = (6 3 . 5 4)8 =
(63.54)8
From Binary to Hexadecimal
• Example 1− Convert binary number 1101010 into hexadecimal
number.
First convert this into decimal number:
= (1101010)2
= 1x26+1x25+0x24+1x23+0x22+1x21+0x20
= 64+32+0+8+0+2+0 = (106)10
Then, convert it into hexadecimal number = (106)10 = 6x161+10x160 =
(6A)16 which is answer.
• Example 2 Trick 2
• Starting at the binary point and working left, separate the bits into
groups of four and replace each group with the corresponding
hexadecimal digit. 100010112 = 1000 1011 = 8B16
Solutions
• 1. 1010101101001

• Therefore, Binary to hexadecimal is,


• = (1010101101001)2 = (1 0101 0110 1001)2 = (0001 0101 0110 1001)2 = (1 5 6 9)16 = (1569)16
• 2. 001100101.110111

• Therefore, Binary to hexadecimal is,


• = (001100101.110111)2 = (0 0110 0101 . 1101 1100)2 = (0110 0101 . 1101 1100)2 = (6 5 . D C)16 =
(65.DC)16
Assignment Questions
• Assignment Question: Binary to Hexa
1. 1010101101001
2. 10111000101
3. 101010010001
4. 001100101.110111
5. 1110111100
6. 10011010
Assignment Question: Binary to Octal
1. 10011010
2. 10111000101
3. 101010010001
4. 1110111100

You might also like