13

From Zero to Engineer

Octal as an intermediate step: from decimal to binary and hexadecimal

Converting a decimal number to octal, then each digit into three binary digits, and groups of four binary digits into hexadecimal. And the same route in reverse.

Converting a decimal number straight to hexadecimal is tedious. Going through octal is much faster: divide by 8 first, then write every octal digit as three binary digits, group those in fours and read them as hexadecimal. Every step is mechanical, because 8 and 16 are powers of two - that is exactly why binary works here as a common language. The same route travelled backwards turns a hexadecimal number into a decimal one.

Using octal numbers as an intermediate step

a) convert to the octal system

348.65410=534.5178348.654_{10} = 534.517_{8}
remainder
348: 84
43: 83
5: 85
0
34810=5348348_{10} = 534_{8}
0.654· 8
5.232· 8
1.856· 8
6.848· 8
6.784
we multiply only the fractional part
0.65410=0.51780.654_{10} = 0.517_{8}

The fourth digit decides how the third is rounded: 6 is more than half of eight, so 0.5166 is written as 0.517.

b) write the binary equivalent of each digit in groups of three binary digits

348.65410=534.5178=101011100.1010011112348.654_{10} = 534.517_{8} = 101011100.101001111_{2}
101
5
011
3
100
4
,
101
5
001
1
111
7

Place values - see Part 10 of this course.

c) group the binary digits into groups of four, moving away from the decimal point in both directions

0001
1
0101
5
1100
C
,
1010
A
0111
7
1000
8

Add zeros so that there are four digits in every group.

d) write the hexadecimal equivalent of each group of four binary digits

348.65410=534.5178=101011100.1010011112=15C,A7816348.654_{10} = 534.517_{8} = 101011100.101001111_{2} = 15C{,}A78_{16}

Convert to octal, binary and hexadecimal form

428.37110=654.2768428.371_{10} = 654.276_{8}
remainder
428: 84
53: 85
6: 86
0
42810=6548428_{10} = 654_{8}
0.371· 8
2.968· 8
7.744· 8
5.952· 8
7.616
we multiply only the fractional part
0.37110=0.27680.371_{10} = 0.276_{8}
110
6
101
5
100
4
,
010
2
111
7
110
6
0001
1
1010
A
1100
C
,
0101
5
1111
F
0000
0
428.37110=654.2768=110101100.0101111102=1AC,5F16428.371_{10} = 654.276_{8} = 110101100.010111110_{2} = 1AC{,}5F_{16}
163.24510=243.1758163.245_{10} = 243.175_{8}
remainder
163: 83
20: 84
2: 82
0
16310=2438163_{10} = 243_{8}
0.245· 8
1.960· 8
7.680· 8
5.440
we multiply only the fractional part
0.24510=0.17580.245_{10} = 0.175_{8}
010
2
100
4
011
3
,
001
1
111
7
101
5
0000
0
1010
A
0011
3
,
0011
3
1110
E
1000
8
163.24510=243.1758=010100011.0011111012=A3.3E816163.245_{10} = 243.175_{8} = 010100011.001111101_{2} = A3.3E8_{16}

Convert to binary, octal and decimal form - the reverse method

a)4B2.1A616=010010110010.0001101001102=2262.06468=1202.10310\text{a)}\quad 4B2.1A6_{16} = 010010110010.000110100110_{2} = 2262.0646_{8} = 1202.103_{10}

A = 10, B = 11

0100
4
1011
B
0010
2
,
0001
1
1010
A
0110
6
010
2
010
2
110
6
010
2
,
000
0
110
6
100
4
110
6
2262.06468=1202.103102262.0646_{8} = 1202.103_{10}

Integer part

28=1616+2=18188=144144+6=1501508=12001200+2=1202\begin{aligned}2 \cdot 8 &= 16 \\16 + 2 &= 18 \\18 \cdot 8 &= 144 \\144 + 6 &= 150 \\150 \cdot 8 &= 1200 \\1200 + 2 &= 1202\end{aligned}

Fractional part

08=00+6=668=4848+4=52528=416416+6=422\begin{aligned}0 \cdot 8 &= 0 \\0 + 6 &= 6 \\6 \cdot 8 &= 48 \\48 + 4 &= 52 \\52 \cdot 8 &= 416 \\416 + 6 &= 422\end{aligned}
42284=42214096=4224096=0.103422 \cdot 8^{-4} = 422 \cdot \frac{1}{4096} = \frac{422}{4096} = 0.103

correct to three decimal places

b)2E3.4D16=001011100011.010011012=1343.2328=739.30110\text{b)}\quad 2E3.4D_{16} = 001011100011.01001101_{2} = 1343.232_{8} = 739.301_{10}

D = 13, E = 14

0010
2
1110
E
0011
3
,
0100
4
1101
D
001
1
011
3
100
4
011
3
,
010
2
011
3
010
2
1343.2328=739.301101343.232_{8} = 739.301_{10}

Integer part

18=88+3=11118=8888+4=92928=736736+3=739\begin{aligned}1 \cdot 8 &= 8 \\8 + 3 &= 11 \\11 \cdot 8 &= 88 \\88 + 4 &= 92 \\92 \cdot 8 &= 736 \\736 + 3 &= 739\end{aligned}

Fractional part

28=1616+3=19198=152152+2=154\begin{aligned}2 \cdot 8 &= 16 \\16 + 3 &= 19 \\19 \cdot 8 &= 152 \\152 + 2 &= 154\end{aligned}
15483=1541512=154512=0.301154 \cdot 8^{-3} = 154 \cdot \frac{1}{512} = \frac{154}{512} = 0.301

correct to three decimal places

Frequently asked questions

Why go through octal instead of straight to hexadecimal?

Because dividing and multiplying by 8 can be done in your head, which is not always true for 16. The octal form then turns into binary one digit at a time, so the hard part disappears.

How many binary digits does one octal digit correspond to?

Exactly three, because 8 is 2³ - each of the eight values fits into three binary digits. For hexadecimal it is four digits, because 16 is 2⁴.

From which side do you group the binary digits?

Always from the point: the integer part to the left, the fractional part to the right. Fill in the outermost group with zeros - that does not change the value of the number.

How do you get back from hexadecimal to decimal?

Write every hexadecimal digit as four binary digits, regroup them in threes and read off the octal number, then convert that to decimal with the method from Part 11.

PhiBoard

A modern, interactive board for study and work. Create, teach and collaborate - completely free.

Coming soon to

Google Play

Download on the

App Store

PhiBoard

Tools

Capabilities

Knowledge base

Support

FAQ

Our mission

Contact

More

Our goalFor schoolsNews

Documents

TermsPrivacy policy

office@phiboard.com

Support the project

© 2026 PhiBoard. All rights reserved.

We Use Cookies

To improve the quality of our services, we use cookies. Cookies help us tailor our website to your preferences, analyze how you use the site, and provide a better user experience. By accepting cookies, you consent to their use for optimizing functionality and content on the site.

Octal as an intermediate step: from decimal to binary and hexadecimal | PhiBoard