All subjects · Computer Science · WCP01 Principles of Computer Science

Network addressing: IPv4, IPv6 and MAC addresses

Edexcel IAL Computer Science · WCP01 Principles of Computer Science

Every device on a network needs addresses so data can be delivered. IP addresses identify a device's location on a network; MAC addresses identify its network hardware (spec point 3.1.3).

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

IPv4

IPv6

MAC addresses and how they work together

Worked example

Convert the IPv4 address 192.168.1.25 to binary.

  1. 192 = 11000000
  2. 168 = 10101000
  3. 1 = 00000001
  4. 25 = 00011001

Answer: 11000000.10101000.00000001.00011001

Key idea: IPv4: 32 bits, four denary octets, 232 addresses. IPv6: 128 bits, eight groups of 4 hex digits, 2128. MAC: 48 bits, six hex pairs, fixed to the NIC; routers use IP, switches use MAC.

Check yourself

  1. How many bits are in an IPv4 address?
    Show answer

    32. Four 8-bit numbers: 4 x 8 = 32.

  2. What is the largest number that can appear in one part of an IPv4 address?
    Show answer

    255. Each part is 8 bits: 28 - 1 = 255.

  3. An IPv6 address has 8 groups of 4 hexadecimal digits. How many bits does each group hold?
    Show answer

    16. Each hex digit is 4 bits, so 4 x 4 = 16 bits.

  4. Convert the IPv4 part 172 to 8-bit binary.
    Show answer

    10101100. 172 = 128 + 32 + 8 + 4 = 10101100.

  5. An IPv4 octet is 11000000 in binary. What is it in denary?
    Show answer

    192. 128 + 64 = 192.

  6. Which statement about MAC addresses is correct?
    • They are 32-bit addresses assigned by the router
    • They change every time a device joins a network
    • They are used by routers to send data across the internet
    • They are 48-bit addresses assigned to a network interface card when it is made
    Show answer

    They are 48-bit addresses assigned to a network interface card when it is made. MAC addresses are physical, fixed and used within a local network.

  7. Which is a valid IPv4 address?
    • 10.0.256.17
    • 10.0.255.17
    • 10.0.17
    • 10:0:255:17
    Show answer

    10.0.255.17. Four parts, each 0 to 255, separated by dots.

  8. Explain why IPv6 was introduced.
    Show answer

    IPv4 uses 32 bits so it has only about 4.3 billion addresses, which is not enough for all the devices connected to the internet; IPv6 uses 128 bits giving a vastly larger number of addresses.. Compare the size of the address spaces.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.