Lesson 15.1 Converting Binary Into Octal or Hexadecimal Numbers and Vice Versa
Lesson 15.1 Converting Binary Into Octal or Hexadecimal Numbers and Vice Versa
Group the bits in threes from right to left and replace each group with the corresponding octal digit.
110100111 = (110)(100)(111)
= 110 100 111
Multiply each digit by (4, 2 and 1)
= 1(4) + 1(2) + 0(1) 1(4) + 0(2) + 0(1) 1(4) + 1(2) + 1(1)
=4+2+0 4+0+0 4+2+1
=6 4 7
110100111 = 647 base 8
Group the bits in threes from right to left and replace each group with the corresponding octal digit.
1010010001 = (1)(010)(010)(001)
= (001)(010)(010)(001) supply 0 as place value
= 001 010 010 001
Multiply each digit by (4, 2 and 1)
= 0(4) + 0(2) + 1(1) 0(4) + 1(2) + 0(1) 0(4) + 1(2) + 0(1) 0(4) + 0(2) + 1(1)
=0+0+1 0+2+0 0+2+0 0+0+1
=1 2 2 1
1010010001 = 1221 base 8
Group the bits in threes from right to left and replace each group with the corresponding octal digit.
11011110 = (11)(011)(110)
= (011)(011)(110) supply 0 as place value
= 011 011 110
Multiply each digit by (4, 2 and 1)
= 0(4) + 1(2) + 1(1) 0(4) + 1(2) + 1(1) 1(4) + 1(2) + 0(1)
=0+2+1 0+2+1 4+2+0
=3 3 6
11011110 = 336 base 8
Group the bits in fours from right to left and then replace each group with the equivalent hexadecimal digit.
110100111 = (1)(1010)(0111)
= (0001)(1010)(0111) supply 0 as place value
= 0001 1010 0111
Multiply each digit by (8, 4, 2 and 1)
= 0(8) + 0(4) + 0(2) + 1(1) 1(8) + 0(4) + 1(2) + 0(1) 0(8) + 1(4) + 1(2) + 1(1)
=0+0+0+1 8+0+2+0 0+4+2+1
=1 10 7
=1 A 7
110100111 = 1A7 base 16
Group the bits in fours from right to left and then replace each group with the equivalent hexadecimal digit.
1010010001 = (10)(1001)(0001)
= (0010)(1001)(0001) supply 0 as place value
= 0010 1001 0001
Multiply each digit by (8, 4, 2 and 1)
= 0(8) + 0(4) + 1(2) + 0(1) 1(8) + 0(4) + 0(2) + 1(1) 0(8) + 0(4) + 0(2) + 1(1)
=0+0+2+0 8+0+0+1 0+0+0+1
=2 9 1
1010010001 = 291 base 16
Group the bits in fours from right to left and then replace each group with the equivalent hexadecimal digit.
11011110 = (1101)(1110)
= 1101 1110
Multiply each digit by (8, 4, 2 and 1)
= 1(8) + 1(4) + 0(2) + 1(1) 1(8) + 1(4) + 1(2) + 0(1)
=8+4+0+1 8+4+2+0
= 13 14
=D E
11011110 = DE base 16
Next, convert 501 into hexadecimal using the algorithm with 16 as divisor (base 16)
501 = (16)(quotient q) + (remainder r)
501 = (16)(q) + r
501 = (16)(31) + 5 5
Take q = 5 as the new dividend 31 = (16)(1) + 15 F
Take q = 1 as the new dividend 1 = (16)(0) + 1 1
(stop when q = 0) 15 = F in hexadecimal
Next convert 3044 into octal (base 8) number using the algorithm with 8 as divisor
3044 = (8)(quotient q) + remainder r
3044 = (8)(q) + r
3044 = (8)(380) + 4
Take q = 380 as the new dividend 380 = (8)(47) + 4
Take q = 47 as the new dividend 47 = (8)(5) + 7
Take q = 5 as the new dividend 5 = (8)(0) + 5
(stop when q = 0)
See more examples found in your PowerPoint Presentation (Base Number System)