Syllabus coverage
- Understand that a computer needs a network interface card (NIC) to access a network
- Understand what is meant by a media access control (MAC) address and the purpose of it
- Describe the structure of a MAC address, including that it is 48 bits long
- Understand that a MAC address is written in hexadecimal as six groups of digits
- Understand that a MAC address is created using a manufacturer code and a serial code
- Understand that a NIC is given its MAC address at the point of manufacture
Part of the O Level Computer Science syllabus 2210.
Why a computer needs a network interface card
A processor and its memory work entirely inside the case. Neither of them can put a signal onto a cable or into the air, so a computer on its own has no connection point to a network. The hardware that provides that connection is the network interface card (NIC), and without one a computer cannot access a network at all.
The NIC sits between the internal buses of the computer and the transmission medium. Towards the computer it behaves like any other peripheral: the processor sends it data and receives data back. Towards the network it is the machine's mouth and ears, turning data into the signals the medium carries and turning incoming signals back into data.
On most modern computers the NIC is built into the motherboard and you never see it as a separate item, but it is still a distinct piece of hardware with its own address. A desktop that was bought without a network connection can be given one by fitting a NIC as an expansion card into a slot on the motherboard.
What the network interface card does
On the way out, the NIC takes a block of data from the computer, adds the addressing information the network needs in order to deliver it, and converts the whole thing into signals suitable for the medium: electrical pulses on a copper cable, light on a fibre, or radio waves for a wireless link.
On the way in, it does the reverse. It receives the signals, rebuilds the data from them, checks that the data arrived without errors, discards anything addressed to a different device, and passes what is left to the processor.
The card also holds the address that identifies this device on the network. That address is the MAC address, and it belongs to the card rather than to the computer as a whole, which is why replacing a NIC gives the machine a different MAC address.
- Converts data from the computer into signals for the medium, and incoming signals back into data.
- Adds and reads the addressing information needed to deliver data on the network.
- Checks incoming data for errors and ignores data addressed to other devices.
- Holds the MAC address that identifies this interface on the network.
Wired and wireless network interface cards
A wired NIC has a socket, usually an RJ45 port, into which an Ethernet cable is plugged. It sends data as electrical pulses along the cable and is the usual choice where the machine stays in one place.
A wireless NIC has an antenna and a radio transmitter and receiver instead of a socket. It sends and receives data as radio waves, which is what a laptop, tablet or phone uses to join a Wi-Fi network. Many devices have both, and the operating system chooses which one to use.
| Wired NIC | Wireless NIC | |
|---|---|---|
| Medium | Copper cable plugged into an RJ45 port | Radio waves through an antenna |
| Typical device | Desktop computer, server, networked printer | Laptop, tablet, phone, wireless printer |
| Strength | Faster and more stable connection, harder to intercept | No cable, so the device can move around |
| Weakness | The device is tied to a cable and a port | Signal weakens with distance and walls, and is easier to intercept |
What a MAC address is and what it is for
A media access control (MAC) address is a unique identifier given to a network interface card. It is written into the card at the point of manufacture, so it is there before the computer is ever switched on and it does not change when the computer moves to a different network.
Its purpose is identification. Every NIC in the world is meant to carry a different MAC address, so a device on a network can be told apart from every other device on that network by its address alone. Data sent on a local network carries the MAC address of the card it is meant for, and a card ignores anything addressed to somebody else.
Because the address is fixed in the hardware, it is often called a physical address. A label on the card or on the outside of the case usually shows it, and the operating system can also display it.
The 48-bit structure of a MAC address
A MAC address is 48 bits long. It is not written in binary, because 48 binary digits are unreadable, and it is not written in denary, because denary does not line up with the way the bits are grouped. It is written in hexadecimal, as 12 hexadecimal digits arranged in six pairs.
The pairs are separated by colons or hyphens, for example `00:1A:2B:3C:4D:5E` or `00-1A-2B-3C-4D-5E`. Both forms describe the same address. Upper case and lower case letters mean the same thing.
The arithmetic of the structure is worth memorising, because questions ask for it directly. One hexadecimal digit represents 4 bits. A pair of digits therefore represents 8 bits, which is one byte. Six pairs give six bytes, and 6 x 8 = 48 bits.
| Grouping | Count | Bits |
|---|---|---|
| Hexadecimal digit | 12 | 4 each |
| Pair of hexadecimal digits | 6 | 8 each, one byte |
| Whole MAC address | 1 | 48 |
The manufacturer code and the serial code
The 48 bits are split into two halves of 24 bits, and each half has a different job. The first 24 bits, which is the first three pairs of hexadecimal digits, are the manufacturer code. This code is assigned to the manufacturer by the organisation that administers MAC addresses, and every NIC that manufacturer produces starts with the same three pairs.
The last 24 bits, the last three pairs, are the serial code. The manufacturer chooses this itself and gives a different value to every card it makes. Two cards from the same factory share the first half and differ in the second.
Taken together, the fixed manufacturer code and the unique serial code make the complete address unique. That is the point of the split: no manufacturer has to know what any other manufacturer is doing, because the prefix already keeps their ranges apart.
- First 24 bits (three pairs): manufacturer code, the same for every card from that maker.
- Last 24 bits (three pairs): serial code, different for every card that maker produces.
- 24 + 24 = 48 bits, so the whole address is unique.
| Address | Manufacturer code | Serial code |
|---|---|---|
| 00:1A:2B:3C:4D:5E | 00:1A:2B | 3C:4D:5E |
| A4:5E:60:11:22:33 | A4:5E:60 | 11:22:33 |
| B8:27:EB:9F:0C:71 | B8:27:EB | 9F:0C:71 |
Reading hexadecimal in a MAC address
Hexadecimal is base 16, so each digit can take sixteen values: 0 to 9 and then A to F, where A stands for 10, B for 11 and so on up to F for 15. Because 16 is 2 to the power of 4, each hexadecimal digit maps exactly onto four binary bits, with no awkward remainder. That exact fit is why hexadecimal is used for addresses of this kind.
Each pair of digits is therefore one byte, and a pair can hold any value from `00` to `FF`, which is 0 to 255 in denary. This is why a MAC address can be read byte by byte: six bytes, each written as two hexadecimal digits.
Twelve hexadecimal digits give 16 to the power of 12 possible addresses. That is 2 to the power of 48, or 281,474,976,710,656: more than 281 trillion combinations, which is far more than the number of network cards that will ever be made. The supply is not the reason addresses are ever reused.
| Hexadecimal | Binary | Denary |
|---|---|---|
| 0 | 0000 | 0 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| F | 1111 | 15 |
| FF | 11111111 | 255 |
Key terms you must be able to define
- Network interface card (NIC)
- The hardware that connects a computer to a network, converting data into signals for the medium and incoming signals back into data. A computer needs one to access a network.
- Media access control (MAC) address
- A unique 48-bit identifier given to a network interface card at the point of manufacture, written in hexadecimal and used to identify that interface on a network.
- Hexadecimal
- A base 16 number system using the digits 0 to 9 and the letters A to F, where each digit represents exactly 4 bits. MAC addresses are written in hexadecimal.
- Manufacturer code
- The first 24 bits of a MAC address, the first three pairs of hexadecimal digits, assigned to a manufacturer and shared by every NIC that manufacturer makes.
- Serial code
- The last 24 bits of a MAC address, the last three pairs of hexadecimal digits, chosen by the manufacturer so that each card it produces is different.
- Physical address
- Another name for a MAC address, because it is fixed in the hardware at manufacture rather than being allocated by a network.
- Transmission medium
- The path the signals travel along, such as a copper cable, a fibre-optic cable or the air for radio waves. The NIC is the interface between the computer and this medium.
In context
2210 sets its questions inside systems a student already uses - a school network, a phone, a supermarket till, a vending machine, a website. These show how the theory is applied to a context you have not seen before, then you answer for the system you are given.
Each desktop has a wired NIC built into the motherboard, with an RJ45 socket on the back. The cable from the socket runs to a switch in the cupboard. Without that card the machine could not send a single packet to the file server, because there would be nothing to convert the data into electrical signals and no address for the network to deliver to.
The laptop's wireless NIC has an antenna and a radio transmitter and receiver instead of a socket. It turns the data into radio waves and back again, which is how the machine joins the school Wi-Fi without a cable. The MAC address of that wireless card is still 48 bits and still fixed at manufacture, even though nothing is plugged in.
A network technician turns a desktop case around and finds a small sticker reading `00:1A:2B:3C:4D:5E`. She can tell at once that this is a MAC address because it is six pairs of hexadecimal digits, and she can read off `00:1A:2B` as the manufacturer code and `3C:4D:5E` as the serial code for that particular card.
When a desktop's NIC fails, the technician fits a new one. The computer is the same machine and sits in the same place, but its MAC address changes, because the address belongs to the card and the new card came out of the factory with its own. This is the clearest evidence that a MAC address identifies the interface, not the computer.
A school buys thirty desktops of the same model from the same supplier. All thirty NICs are likely to share the same manufacturer code, because the same company made them, but every one of the thirty has a different serial code. The first half of the address says who made the card; the second half says which card it is.
Flashcards
Click a card to flip it. Mark honestly — the tracker uses this.
Exam-style questions
6 questions, 19 marks. Write your answer and press Mark my answer — it is marked against the scheme and tells you which points you made and what would gain the next mark. You can still reveal the scheme and mark it yourself instead.
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Exam technique for this topic
- Learn the numbers as a chain: 48 bits, 12 hexadecimal digits, 6 pairs, 6 bytes. Questions often give you one of these and expect you to produce another, and a student who only knows '48 bits' runs out of answer.
- When you are asked for the structure, split the address in your answer. Say which 24 bits are the manufacturer code and which 24 bits are the serial code, and say that the manufacturer assigns the serial code so that each card is different.
- Say that the MAC address is set at the point of manufacture, not by the network and not by the user. A common wrong answer is that the network allocates it, which is what an IP address does.
- Do not describe a MAC address as random. It is structured: a manufacturer code that many cards share plus a serial code that only one card has.
- If a question asks why hexadecimal is used, the mark is about length and fit: hexadecimal is a much shorter way of writing the same bits, and each hexadecimal digit represents exactly 4 bits.
Why students lose marks here
Where this fits in O Level Computer Science 2210
This page is one topic of Cambridge O Level Computer Science 2210. O Level Computer Science 2210 is the course home: every area and every topic in Cambridge's own order, the papers you sit and what each one tests, and the exam-practice tools. The full topic list, with each topic linked to its revision page, is on the O Level Computer Science 2210 syllabus page.