← IGCSE Computer Science Paper 1

Comparing IPv4 and IPv6

A 128-bit address written in hex with colons. It gives vastly more addresses than 32-bit denary IPv4, which solves the shortage of IPv4 addresses.

Understanding Comparing IPv4 and IPv6 in IGCSE Computer Science Paper 1

What it does: 32 bits gives 2^32 possible addresses, around 4.3 billion, which has run short. IPv6 uses 128 bits. IPv4 uses only 32 bits. IPv6 groups are written in hex (0-9 and A-F) and separated by colons. IPv4 has four denary numbers (each 0 to 255). Eight hex groups describe IPv6. IPv6 is 128-bit and written in hex. Its huge number of addresses fixes the IPv4 shortage. The format described is IPv4, so it was wrongly labelled as IPv6. IPv6 solves the shortage by using more bits, not fewer.

Common mistakes: IPv4 addresses are written in denary with full stops between the numbers, so it should be "192.168.0.1". Colons are used in IPv6. An IPv4 address is 32 bits long, so it should be ipv4_bits = 32. The 128-bit size belongs to IPv6.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 342–354) and word search (Modules 325–354).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
How many bits are in an IPv6 address?
32 bits128 bits
Matches
IPv6 address: 192.168.0.1 (denary with full stops, 128 bits)
↓
IPv6 does not use denary and full stops. It uses hexadecimal groups separated by colons. Denary with full stops is IPv4.
Applying
Meanings
Term
IPv6
Meaning
A 128-bit address written in hex with colons. It gives vastly more addresses than 32-bit denary IPv4, which solves the shortage of IPv4 addresses.
Practice
IPv4: 32 bits, denary, full stops
Testing
Gaps
IPv4 address size: bits
Check Answer
Spots
2ipv6_bits = 128
3ipv4 = "192:168:0:1"

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Coelacanth' badge — Living Fossil, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. How many bits are in an IPv6 address?
A. 32 bits
B. 128 bits ✓
IPv6 uses 128 bits. IPv4 uses only 32 bits.
2. Which address is written in denary, with full stops between the groups?
A. IPv4, e.g. 192.168.0.1 ✓
B. IPv6, e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329
IPv4 uses denary numbers separated by full stops. IPv6 uses hexadecimal separated by colons.
3. Which address type uses hexadecimal digits separated by colons?
A. IPv4
B. IPv6 ✓
IPv6 groups are written in hex (0-9 and A-F) and separated by colons.
4. Which version gives vastly more possible addresses?
A. IPv6, because it has 128 bits ✓
B. IPv4, because it has 32 bits
More bits means many more combinations. 128 bits gives far more addresses than 32 bits.
5. Why was IPv6 introduced?
A. IPv4 was running out of addresses ✓
B. IPv4 addresses were too long to store
IPv4 has only about 4.3 billion addresses, which is not enough for all devices. IPv6 solves this shortage.

Match the Pairs

192.168.0.1 → An IPv4 address: 32 bits written as four denary numbers separated by full stops
2001:0db8:85a3:0000:0000:8a2e:0370:7334 → An IPv6 address: 128 bits written as eight groups of hex separated by colons
IPv4 has only 32 bits, so it can give about 4.3 billion addresses, which is not enough for every device → 2^32
IPv6 has 128 bits, so it gives vastly more addresses and solves the address shortage → 2^128
IPv6 address: 192.168.0.1 (denary with full stops, 128 bits) → IPv6 does not use denary and full stops. It uses hexadecimal groups separated by colons. Denary with full stops is IPv4.
IPv4 was replaced by IPv6 because IPv6 has fewer bits, which saves addresses → IPv6 has more bits (128, not 32), so it gives far more addresses. This is why it was introduced.

Key Term

IPv6
A 128-bit address written in hex with colons. It gives vastly more addresses than 32-bit denary IPv4, which solves the shortage of IPv4 addresses.

Fill in the Blanks

1. IPv4 address size: 32 bits
Hint: Type the number of bits in an IPv4 address.
2. IPv6 address size: 128 bits
Hint: Type the number of bits in an IPv6 address.
3. IPv4 example: 192.168.0.1 Written in denary with full stops
Hint: Type the number system used to write IPv4 addresses.
4. IPv6 example: 2001:db8::ff00:42:8329 Written in hexadecimal with colons
Hint: Type the number system used to write IPv6 addresses.
5. IPv4 ran short, so IPv6 was introduced
Hint: Type the newer address version that has vastly more addresses.

Spot the Error

Question 1
A ipv4_bits = 32
B ipv6_bits = 128
C ipv4 = "192:168:0:1"
D ipv6 = "2001:db8::1"
Line C — IPv4 addresses are written in denary with full stops between the numbers, so it should be "192.168.0.1". Colons are used in IPv6.
Question 2
A ipv4_bits = 128
B ipv6_bits = 128
C print(ipv6_bits > ipv4_bits)
Line A — An IPv4 address is 32 bits long, so it should be ipv4_bits = 32. The 128-bit size belongs to IPv6.
Question 3
A ipv4_base = "denary"
B ipv6_base = "denary"
C print(ipv4_base, ipv6_base)
Line B — IPv6 addresses are written in hexadecimal, so it should be ipv6_base = "hex". Denary is used for IPv4.
Question 4
A ipv6 = "fe80.0.0.0.0.0.0.1"
B groups = ipv6.split(":")
C print(len(groups))
Line A — IPv6 groups are separated by colons, so it should be "fe80:0:0:0:0:0:0:1". With full stops, split(":") would not find the 8 groups.
Question 5
A ipv4_bits = 32
B ipv6_bits = 128
C ipv4_total = 2 ** ipv4_bits
D ipv6_total = 2 ** ipv4_bits
Line D — The number of IPv6 addresses is 2 to the power of 128, so it should use ipv6_bits. Using ipv4_bits gives the IPv4 total again.

Student with a class code? Join your class →