Hexadecimal Conversion
Hexadecimal Conversion
a) Hexadecimal to Binary
Convert each digit of Hexadecimal Number to its binary equivalent and write them in 4 bits. Then, combine each 4 bit binary number and that is the resulting answer.
Example
Convert the Hexadecimal number (10AF)16 to its Binary equivalent.
= 1 | 0 | A | F |
= 0001 | 0000 | 1010 | 1111
= (0001000010101111)2
= (1000010101111)2
b) Hexadecimal Fraction to Binary
Example
Convert the Hexadecimal number (13.54)16 to its Binary equivalent.
= 1 | 3 | . | 5 | 4 |
= 0001 | 0011 | . | 0101 | 0100 |
= (00010011.01010100)2
= (10011.010101)2
c) Hexadecimal to Octal
To convert Hexadecimal to Octal, Convert each digit of Hexadecimal Number to its binary equivalent and write them in 4 bits. Then, combine each 3 bit binary number and that is converted into octal.
Example
Convert the Hexadecimal number (A42)16 to its Octal equivalent.
= A | 4 | 2
= 1010 | 0100 | 0010
= (101001000010)2
= 101 | 001 | 000 | 010
= 5 | 1 | 0 | 2
= (5102)8
d) Hexadecimal Fraction to Octal
Example
Convert the Hexadecimal fraction (15.34)16 to its Octal equivalent.
= 1 | 5 | . | 3 | 4
= 0001 | 0101 | . | 0011 | 0100
= (10101.001101)2
= 010 | 101 | . | 001 | 101 |
= 2 | 5 | . | 1 | 5 |
= (25.15)8
e) Hexadecimal to Decimal
1. Start at the rightmost bit.
2. Take that bit and multiply by 16n where n is the current position beginning at 0 and increasing by 1 each time. This represents a power of 16.
3. Sum each terms of product until all bits have been used.
Example
Convert the Hexadecimal number (AB)16 to its Decimal equivalent.
= A * 161 + B * 160
= 10 * 161 + 11 * 160
= 160 + 11
= (171)10
f) Hexadecimal fraction to Decimal
Example
Convert (1E.8C)16 to decimal
= 1 | E | 8 | C |
= (1 x 161) + (14 x 160) + (8 x 16-1) + (12 x 16-2)
= 16 + 14 + 0.5 + 0.04688
= (30.54688)10
Comments
Post a Comment