Study Guide

Binary, Decimal and Hexadecimal

The number systems behind network addresses: place values, converting between binary and decimal, octets, and reading hexadecimal.

Lesson 3.4 Networking Fundamentals

Network addresses look like ordinary numbers, but the devices that use them count differently. This lesson builds three number systems from one idea you already use every day.

Stage: Think

What a digit is worth

Think it through

In the number 7,302, how much is the 3 worth?
Show the answer

Answer: B. 300: it is in the hundreds place.

Three hundred, because it sits in the hundreds place. Where a digit stands decides what it is worth. Every number system is built on that one idea.

Think it through

Suppose you could use only two digits, 0 and 1. How could you count past 1?

Show what happens

The same way decimal does after 9: start a new position. 0, 1, 10, 11, 100, and so on, with each new position worth twice the one before. That is binary.

Stage: Explain

Place value: the idea behind every number system

In everyday decimal, the position of a digit sets its value. Start here: in base 10, the positions are worth 10,000, 1,000, 100, 10 and 1, each ten times the one to its right. The number 7,302 means 7 thousands, 3 hundreds, 0 tens and 2 ones.

Every number system works the same way. Only the base changes: the number of different digits available, and so how much each position is worth.

SystemBaseDigits usedPosition values, right to left
Decimal100–91, 10, 100, 1,000 …
Binary20 and 11, 2, 4, 8, 16 …
Hexadecimal160–9 and A–F1, 16, 256, 4,096 …

Stage: Experiment

Binary: counting with two digits

Binary has only two digits, 0 and 1, so each position is worth twice the one to its right. Computers use it because a circuit can be reliably on or off. Each binary digit is a bit.

These are the eight place values of an octet, the group of eight bits used in IPv4 addresses:

128 · 64 · 32 · 16 · 8 · 4 · 2 · 1

Think it through

The eight positions of an octet are worth 128, 64, 32, 16, 8, 4, 2 and 1. What do you think 11000000 is worth?
Show the answer

Answer: C. 192: the 128 and the 64 are set.

192: the two 1s stand in the 128 and 64 places, and 128 + 64 = 192. The panel below shows it.

To read an octet, add up the place values wherever the bit is 1.

Binary to decimal: 11000000 is 192

192 in binary is 11000000: the bits for 128, 64 are 1, and 128 + 64 = 192.

128 + 64 = 192 · binary 11000000

With all eight bits set to 0 the octet is 0; with all eight set to 1 it is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. That is why every part of an IPv4 address is between 0 and 255: an octet has exactly 256 possible values.

Check your understanding

Why can no part of an IPv4 address be 300?
Show the answer

Answer: B. Because an octet can hold at most 255.

Each part is one octet, and eight bits can only represent 0 to 255.

Converting decimal to binary

Think it through

Before the worked example: how could you decide which bits to set to make 172?

Show what happens

Start at 128 and ask, at each place, whether it still fits into what is left. Set a 1 if it does and subtract; set a 0 if it does not.

Work from the largest place value down. At each place, ask whether the value still fits into what is left.

  1. 128: does 128 fit into 172? Yes. Write 1; 172 − 128 = 44 left.
  2. 64: does 64 fit into 44? No. Write 0.
  3. 32: does 32 fit into 44? Yes. Write 1; 44 − 32 = 12 left.
  4. 16: does 16 fit into 12? No. Write 0.
  5. 8: does 8 fit into 12? Yes. Write 1; 12 − 8 = 4 left.
  6. 4: does 4 fit into 4? Yes. Write 1; nothing left.
  7. 2 and 1: nothing is left, so write 0 and 0.

Reading the bits in order gives 10101100. Check it by adding back: 128 + 32 + 8 + 4 = 172.

Decimal to binary: 172 is 10101100

172 in binary is 10101100: the bits for 128, 32, 8, 4 are 1, and 128 + 32 + 8 + 4 = 172.

128 + 32 + 8 + 4 = 172 · binary 10101100

Values worth knowing

Subnet masks are built from 1 bits filled in from the left. Adding the place values left to right gives the only values a mask octet can take, and they come up constantly in the subnetting lessons:

1 bits from the leftBinaryDecimal
0000000000
110000000128
211000000192
311100000224
411110000240
511111000248
611111100252
711111110254
811111111255

Stage: Predict

Hexadecimal: sixteen digits

Think it through

A number system with sixteen digits needs symbols for ten, eleven, twelve and so on, each written as a single character. What could it use after 9?

Show what happens

Letters: A for ten up to F for fifteen. That system is hexadecimal.

Hexadecimal, often shortened to hex, is base 16. It needs sixteen digits, so after 0–9 it uses letters: A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Each position is worth 16 times the one to its right.

Take a hexadecimal value built from 64 + 10 = 74. That is hex 4A:

  • 4 is in the sixteens place: 4 × 16 = 64.
  • A is in the ones place: A = 10.
  • 64 + 10 = 74.

Hex is popular in networking because one hex digit is exactly four bits. Two hex digits therefore describe one octet, which is why MAC addresses and IPv6 addresses are written in hex.

Check your understanding

How many hexadecimal digits are needed to write one octet?
Show the answer

Answer: A. Two: each hex digit is four bits.

Two. One hex digit is exactly four bits, so two describe an octet.

HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

Consider the example MAC address 00:1A:2B:3C:4D:5E. Take its second byte, 1A.

  1. Split into hex digits: 1 and A.
  2. Convert each digit to four bits: 1 = 0001, A = 1010.
  3. Join them: 00011010.
  4. Check in decimal: 16 + 8 + 2 = 26, which matches 1 × 16 + 10 = 26.

You will meet all three systems in everyday network work. IP configuration screens show IPv4 addresses and masks in dotted decimal. MAC addresses and IPv6 addresses appear in hexadecimal. And when you need to work out which network an address belongs to, you will convert the relevant octet to binary.

Stage: Apply

Apply it in a new situation

These questions use the lesson in situations it has not shown. For the strongest test of your understanding, come back to them on another day and answer each one at the first attempt.

Apply it

What is binary 01100100 in decimal?
Show the answer

Answer: C. 100.

The 1s stand in the 64, 32 and 4 places: 64 + 32 + 4 = 100.

Apply it

One byte of a MAC address is 3C. What is it in decimal?
Show the answer

Answer: A. 60.

The 3 is in the sixteens place (3 × 16 = 48) and C is 12, so 48 + 12 = 60.

Stage: Check

Check your understanding

These questions come from the approved revision bank. Choose an answer and check it; the explanation and its sources follow.

  1. Convert the hexadecimal value 4A to decimal.

    Show answer

    Answer: 74

    Hexadecimal is base 16, so the left digit counts sixteens and the right digit counts ones, and A stands for 10. Working it through: 4 × 16 = 64, then 64 + 10 = 74. 410 writes the digits side by side as if A were decimal 10; 64 forgets the A; 50 treats the left digit as tens (4 × 10 + 10), using decimal place values instead of sixteens.

    Revision sources: Study Buddy — 23 September 2026 (Study Buddy session (supplementary))

  2. What is the binary octet 10101000 in decimal?

    Show answer

    Answer: 168

    Write each bit under the octet place values, 128, 64, 32, 16, 8, 4, 2 and 1, then add the place values where the bit is 1: 128 + 32 + 8 = 168. 84 shifts every bit one place to the right (64 + 16 + 4); 170 is 10101010, with an extra 1 under the 2; 21 reads the bits from the wrong end (16 + 4 + 1).

    Revision sources: Study Buddy — 23 September 2026 (Study Buddy session (supplementary)) · Binary, Decimal and Hexadecimal (Supplementary Study Guide explanation)

  3. Convert decimal 200 to an eight-bit binary octet.

    Show answer

    Answer: 11001000

    Work from the largest place value, 128, down to 1, asking whether each one fits into what is left. 128 fits (200 − 128 = 72), 64 fits (72 − 64 = 8), 32 and 16 do not, 8 fits (8 − 8 = 0), and 4, 2 and 1 are 0. That gives 11001000; check it by adding back 128 + 64 + 8 = 200. 11000100 is 196, 10011000 is 152 and 11001001 is 201.

    Revision sources: Study Buddy — 23 September 2026 (Study Buddy session (supplementary)) · Binary, Decimal and Hexadecimal (Supplementary Study Guide explanation)

  4. A fictional network adapter has the MAC address 02:00:00:00:00:1A. What is the decimal value of its last octet, 1A?

    Show answer

    Answer: 26

    MAC addresses are written in hexadecimal, and A = 10. The left digit counts sixteens: 1 × 16 = 16, then 16 + 10 = 26. 110 writes the digits side by side, 11 adds the digit values (1 + 10) without place value, and 16 ignores the A. Each hexadecimal digit is exactly four bits, so 1A is 0001 1010 in binary, which also adds up to 16 + 8 + 2 = 26.

    Revision sources: Session 5: Networking Fundamentals — Part 1 (Classroom session record) · Study Buddy — 23 September 2026 (Study Buddy session (supplementary)) · Binary, Decimal and Hexadecimal (Supplementary Study Guide explanation)

Study and revision

Practise the conversions through the Networking & Protocols topic: four calculation questions and a flashcard on octet place values and hexadecimal digits. Each explanation shows the working. They are learning-only. The binary skills here are applied in Subnetting.

Stage: Consolidate

What to remember

  • Place value: a digit’s position sets its value, and the base sets what each position is worth.
  • Binary positions in an octet are 128, 64, 32, 16, 8, 4, 2 and 1; add the places where the bit is 1.
  • An octet runs from 0 to 255, which is why each part of an IPv4 address does.
  • Convert decimal to binary from the largest place down, setting a 1 wherever the value still fits.
  • One hex digit is four bits, so two describe an octet; A to F stand for 10 to 15.

Key terms

Binary

A base-2 number system that uses only the digits 0 and 1. Each position is worth twice the position to its right: 1, 2, 4, 8 and so on.

Octet

A group of eight bits, which can hold a value from 0 to 255. An IPv4 address is made of four octets.

Hexadecimal

A base-16 number system using the digits 0–9 and the letters A–F, where A = 10 and F = 15. One hexadecimal digit represents exactly four bits.

Common misunderstandings

In binary, 10 means one 2 and no 1s: the value two. Always check which base a number is written in.

An octet has 256 possible values, but they run from 0 to 255.

1A and 1a are the same value. Tools display hex in either case.

Lesson sources and acknowledgements

Sources and scope

  • From the Study Buddy session on 23 September (see the entry): decimal place values, the eight octet place values, hexadecimal digits with A = 10, and the worked value 64 + 10 = 74. The session was supplementary to the course, not a numbered classroom session.
  • Taught in Session 5: the example MAC address 00:1A:2B:3C:4D:5E and that MAC addresses are written in hexadecimal.
  • Supplementary explanation: the base comparison, the conversion methods and worked examples, the mask-value and hex-to-binary tables, and the misunderstandings.

Guided version (published 1 November 2026, awaiting the site owner’s editorial review): the place-value opening questions, every question asked in the lesson with its feedback and hints, the conversion exercises and the closing summary are supplementary explanation written for the Study Guide. The settings are fictional. The questions in the lesson’s steps are not revision-bank items; those in “Check your understanding” are, unchanged.