To convert a number from octal to hexadecimal we will use two rules where one is for integer part and other is for fraction part. Hexadecimal is the 16 based number system where octal is the 8 based. In this article we will learn to convert a number from octal to hexadecimal. Let’s see the rules first.
Table of Contents
Convert from Octal to Hexadecimal
Rules for integer conversion
Example: Convert 3748 to equivalent hexadecimal number
Here, we have to convert the octal to hexadecimal number which is 374 to the equivalent hexadecimal number. Let’s see the given figure to learn conversion. Like as other number system here also we can add zeros at left side of the integer or ignore them.
So, the equivalent hexadecimal number will be (FC)16. We can convert any octal integer to its equivalent hexadecimal by this way.
Rules for fraction number
Example : Conversion of 0.5048 to equivalent hexadecimal number
At first we will convert the given octal number to the equivalent binary number and then convert the binary number to its equivalent hexadecimal number for converting the whole number from octal to hexadecimal. See this bellow.
However, here we can ignore or take necessary zeros at right side at the time of our conversion. Now, we will see a full example to convert a number from octal to hexadecimal. We will convert the whole number at a time. Let’s try to understand the example bellow.
Example: Conversion of 343.4058 to equivalent hexadecimal number
To convert this number we will write the equivalent binary number first. Every digit of octal number will be converted to three digits binary number. After that we will convert the binary number again to the equivalent hexadecimal number.
At the time to these two conversion the general rule of taking or ignoring zeros will be applied. We can write 101 instead of 0101 because the value of zero at the left side of integer or right side of the fraction part should be ignored.
That means, we have got (E3.828)16 after converting the given octal number to the equivalent hexadecimal number. Obviously you can convert any other octal to hexadecimal using this rule. So, try this.
Please tell us bellow in the comment section if you find this article helpful.