← IGCSE Computer Science Paper 1

The limited number of IPv4 addresses

The number of possible IPv4 addresses (about 4.3 billion). It is too few for every phone and smart device online, so a new version, IPv6, was needed.

Understanding The limited number of IPv4 addresses in IGCSE Computer Science Paper 1

What it does: With 32 bits and 2 possible values for each bit, the total number of different IPv4 addresses is 2 to the power 32. The limited pool of about 4.3 billion addresses is too small for the growing number of internet-connected devices, which is why a new version was needed. IPv4 uses 32 bits. IPv6 uses 128 bits. Each of the 32 bits can be 0 or 1, so there are 2^32 combinations, about 4.3 billion. Each phone, tablet and smart device online needs an address, so demand for addresses has grown. IPv6 was created because IPv4 ran short of addresses. Manufacturer codes belong to MAC addresses.

Common mistakes: An IPv4 address has 32 bits, not 8. With 8 bits, 2 ** bits would only give 256. The line should be bits = 32, which gives about 4.3 billion addresses. The shortfall is how many more devices there are than addresses, so it is devices - total. total - devices gives a negative number and hides the problem.

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 does an IPv4 address use?
32 bits128 bits
Matches
IPv4 addresses = 2^8
↓
IPv4 addresses use 32 bits, not 8 bits. The total is 2^32. 2^8 is only 256, the range of a single number in one part of the address.
Applying
Meanings
Term
2^32
Meaning
The number of possible IPv4 addresses (about 4.3 billion). It is too few for every phone and smart device online, so a new version, IPv6, was needed.
Practice
bits = 32
Testing
Gaps
total = 2 **
Check Answer
Spots
1bits = 8
2total = 2 ** bits

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

The 'Snow Leopard' badge — Silent Debugger, 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 does an IPv4 address use?
A. 32 bits ✓
B. 128 bits
IPv4 uses 32 bits. IPv6 uses 128 bits.
2. How many different IPv4 addresses are possible in total?
A. 2^32, about 4.3 billion ✓
B. 32^2, which is 1,024
Each of the 32 bits can be 0 or 1, so there are 2^32 combinations, about 4.3 billion.
3. Which statement is true about the number of IPv4 addresses?
A. There are more than enough for every device, forever
B. There are not enough for every internet-connected device ✓
The number of devices online has grown beyond what 4.3 billion addresses can cover.
4. Which change has made IPv4 addresses run short?
A. Growth of phones, tablets and smart devices online ✓
B. Computers switching to faster processors
Each phone, tablet and smart device online needs an address, so demand for addresses has grown.
5. Why was a new version of IP needed?
A. To give every device a manufacturer code
B. To provide many more addresses than IPv4 ✓
IPv6 was created because IPv4 ran short of addresses. Manufacturer codes belong to MAC addresses.

Match the Pairs

2^32 → The number of possible IPv4 addresses, about 4.3 billion
IPv6 → The newer version of IP created because IPv4 addresses were running out
IPv4 has 32 bits, and each bit can be 0 or 1, so the total number of addresses is found like this → 2^32
The number of IPv4 addresses is about 4.3 billion, which is smaller than the number of phones and smart devices wanting to be online → 4300000000 < devices
IPv4 addresses = 2^8 → IPv4 addresses use 32 bits, not 8 bits. The total is 2^32. 2^8 is only 256, the range of a single number in one part of the address.
IPv4 has unlimited addresses → IPv4 does not have unlimited addresses. It has only about 4.3 billion, which is not enough for all the phones and smart devices now online.

Key Term

2^32
The number of possible IPv4 addresses (about 4.3 billion). It is too few for every phone and smart device online, so a new version, IPv6, was needed.

Fill in the Blanks

1. total = 2 ** 32 print(total)
Hint: Type the number of bits in an IPv4 address, used as the power.
2. addresses = 2 ** 32 print(addresses)
Hint: Type the Python operator that raises a number to a power.
3. addresses = 2 ** 32 devices = 5000000000 if devices > addresses:
Hint: Type the comparison operator that checks if there are more devices than addresses.
4. bits = 32 total = 2 ** bits print(total)
Hint: Type the variable that stores how many bits an IPv4 address has.
5. IF devices > addresses THEN OUTPUT "Use IPv6" ENDIF
Hint: Type the pseudocode keyword that follows an IF condition.

Spot the Error

Question 1
A bits = 8
B total = 2 ** bits
C print(total)
Line A — An IPv4 address has 32 bits, not 8. With 8 bits, 2 ** bits would only give 256. The line should be bits = 32, which gives about 4.3 billion addresses.
Question 2
A total = 2 ** 32
B devices = 15000000000
C shortfall = total - devices
D print(shortfall)
Line C — The shortfall is how many more devices there are than addresses, so it is devices - total. total - devices gives a negative number and hides the problem.
Question 3
A total = 32 ** 2
B if devices > total:
C print("Not enough")
Line A — 32 bits give 2 to the power 32 addresses, written 2 ** 32. 32 ** 2 is only 1024. The line should be total = 2 ** 32.
Question 4
A devices = 9000000000
B total = 2 ^ 32
C if devices > total:
D print("Use IPv6")
Line B — In Python, ^ is the XOR operator, not power. It would give 34, not about 4.3 billion. Use ** for powers: total = 2 ** 32.
Question 5
A phones = 7000000000
B tvs = "2000000000"
C devices = phones + tvs
D print(devices)
Line B — Putting the number in quotes makes it a string, so phones + tvs causes an error. The count of smart TVs should be a number: tvs = 2000000000.

Student with a class code? Join your class →