How to convert octal to hexadecimal ?
Using the below two methods, we can convert the octal number system into the hexadecimal number system.
1. Convert the octal number into binary and then convert the binary into hexadecimal.
2. Convert the octal number into decimal and then convert the decimal into hexadecimal.
Let's convert the octal number into the hexadecimal number system.
Octal Binary Hexadecimal
Let's convert (56)8 into hexadecimal
Step 1 : Convert (56)8 into Binary
In order to convert the octal number into binary, we need to express every octal value using 3 binary bits.
Binary equivalent of 5 is (101)2.
Binary equivalent of 6 is (110)2.
= (56)8
= (101)(110)
= (101110)2
Step 2 : Convert (101110)2 into Hexadecimal
In order to convert the binary number into hexadecimal, we need to group every 4 binary bits and calculate the value[From left to right].
(101110)2 in hexadecimal
= (101110)2
= (10)(1110)
= (2)(14)
= (2e)16
14 equivalent hexadecimal is e.
This method is relatively easy compared to the below method.
Octal Decimal Hexadecimal
Step 1 : Convert (56)8 into Decimal
= 5*81+6*80
= 40+6
= (46)10
Step 2 : Convert (46)10 into hexadecimal
16|46 ---- 16|2 - 14= (2e)16