Conversion

Hexadecimal to octal converter

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a hexadecimal number system?

The hexadecimal system is a positional numeral system with a base of 16. It uses sixteen individual symbols to represent values:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.

The letters correspond to the decimal values A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
It is widely used in computer science and digital electronics because it offers a compact representation of binary data.
Every four binary digits (bits) correspond directly to one hexadecimal digit, which simplifies reading and writing binary values.

Example of interpretation

For instance, the hexadecimal number 3F8₁₆ can be expanded as:

3F816=3×162+15×161+8×1603F8_{16} = 3 \times 16^2 + 15 \times 16^1 + 8 \times 16^0 =3×256+15×16+8=768+240+8=101610= 3 \times 256 + 15 \times 16 + 8 = 768 + 240 + 8 = 1016_{10}

So 3F8₁₆ = 1016₁₀ in decimal form.

What is the octal number system?

The octal system is a base-8 numeral system, using the digits 0 through 7 to represent all possible values.
Each digit represents a power of eight, similar to how each digit in the decimal system represents a power of ten.
This system is particularly important in older computing systems and digital devices, where octal numbers were used to simplify binary input and output.

Example of interpretation

For the octal number 113₈, its decimal equivalent is found as:

1138=1×82+1×81+3×80113_{8} = 1 \times 8^2 + 1 \times 8^1 + 3 \times 8^0 =64+8+3=7510= 64 + 8 + 3 = 75_{10}

Formula

To convert from hexadecimal to octal, follow a two-step process through the decimal system:

  1. Convert hexadecimal → decimal.
  2. Convert decimal → octal.

Step 1. Convert hexadecimal to decimal

D10=i=0n1di×16iD_{10} = \sum_{i=0}^{n-1} d_i \times 16^i

where:

  • did_i is the numeric value of the hexadecimal digit (from 0 to 15),
  • ii is the position index starting from 0 for the least significant digit.

Step 2. Convert decimal to octal

Divide the resulting decimal number repeatedly by 8, writing down each remainder until the quotient becomes 0. Then, read the remainders in reverse order to obtain the octal value.

Example

Let’s convert 4B₁₆ to the octal system.

Step 1. Convert 4B₁₆ → decimal

Each digit is expressed as a decimal value:

B16=1110B_{16} = 11_{10}

Then,

4B16=(4×161)+(11×160)=64+11=75104B_{16} = (4 \times 16^1) + (11 \times 16^0) = 64 + 11 = 75_{10}

Step 2. Convert 75₁₀ → octal

Perform repeated division by 8:

DivisionQuotientRemainder
75 ÷ 893
9 ÷ 811
1 ÷ 801

Now write the remainders in reverse order: 113₈.

Thus,

4B16=7510=11384B_{16} = 75_{10} = 113_{8}

Alternate method using binary

Take 4B₁₆:

  1. Convert each hex digit to binary:
    • 4 → 0100
    • B → 1011
      So, 4B₁₆ = 01001011₂.
  2. Divide this binary number into groups of 3 bits (from right): 01001011 → 001 001 011 (adding leading zeros where needed to bring the value to a multiple of 3 bits).
  3. Convert each group to octal:
    • 001 = 1
    • 001 = 1
    • 011 = 3

So, 01001011₂ = 113₈ (same result).

Conversion table of 4-bit groups

HexadecimalBinary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
A1010
B1011
C1100
D1101
E1110
F1111

Conversion table of 3-bit groups

BinaryOctal
0000
0011
0102
0113
1004
1015
1106
1117

Notes

  • To convert larger numbers more efficiently, you can skip the decimal step by using binary as an intermediate. Since each hexadecimal digit equals 4 binary bits, and each octal digit equals 3 binary bits, conversions can be made directly through binary grouping.
  • The converter automatically handles these steps internally, giving you an accurate octal representation within seconds.

Frequently Asked Questions

How to convert hexadecimal number 1F₁₆ to octal step by step?

First, convert to decimal:

1F16=(1×161)+(15×160)=16+15=31101F_{16} = (1 \times 16^1) + (15 \times 16^0) = 16 + 15 = 31_{10}

Now convert decimal 31 to octal: 31 ÷ 8 = 3 remainder 7,
3 ÷ 8 = 0 remainder 3.
Reverse the remainders: 37₈.

Can a hexadecimal number with a fraction be converted to octal?

Yes. Convert both the integer and fractional parts separately using the same principle. The integer part is divided by the base; the fractional part is multiplied by the new base.

Why are octal and hexadecimal systems important in computing?

Because they represent binary data in a compact, human-readable form. Octal groups bits in sets of three, and hexadecimal in sets of four, making them indispensable for programming, debugging, and digital circuit design.

Report a bug

This field is required.