O Level Computer Science 2210 · Area 1 · Computer systems

Network hardware and MAC addresses

A computer has no way onto a network without a network interface card, and every one of those cards carries its own address burnt in at the factory. This page covers what the card does, what a MAC address is for, and the exact 48-bit structure you are expected to describe: six pairs of hexadecimal digits, a manufacturer code and a serial code. Marks are lost when students call the address random, describe it as decimal, or forget that it is fixed at manufacture.

Not started

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.

Getting onto a networkA computer needs a network interface card before it can join any network.The MAC address is fixed in the hardware and is unique to that card.A network interface cardNICconnects this computer to the networkEvery NIC has a MAC addressset when it is made, not by the networkThe structure of a MAC addressNNNNNNNNNNNN48 bits, written as six pairs of hex digitsthe first three pairs identify the makerthe last three are unique to that card
A network interface card shown inside a computer case, with its RJ45 port and edge connector labelled, and its 48-bit MAC address displayed as six pairs of hexadecimal digits split into a 24-bit manufacturer code and a 24-bit serial code.

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.

The one-line answer to 'why does a computer need a NIC?' is: it is the interface between the computer and the network medium, so without it there is nothing to send or receive the signals.

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 NICWireless NIC
MediumCopper cable plugged into an RJ45 portRadio waves through an antenna
Typical deviceDesktop computer, server, networked printerLaptop, tablet, phone, wireless printer
StrengthFaster and more stable connection, harder to interceptNo cable, so the device can move around
WeaknessThe device is tied to a cable and a portSignal 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.

MAC address = unique identifier of a network interface card, set at manufacture, used to identify the device on a network. It is not allocated by the network and it is not random.

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.

GroupingCountBits
Hexadecimal digit124 each
Pair of hexadecimal digits68 each, one byte
Whole MAC address148
48 bits = 12 hexadecimal digits = 6 pairs = 6 bytes. Any question that gives you one of these can be answered from the others.

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.
AddressManufacturer codeSerial code
00:1A:2B:3C:4D:5E00:1A:2B3C:4D:5E
A4:5E:60:11:22:33A4:5E:6011:22:33
B8:27:EB:9F:0C:71B8:27:EB9F:0C:71
If a question gives you a MAC address and asks which part identifies the manufacturer, take the first three pairs; the last three are the serial code.

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.

HexadecimalBinaryDenary
000000
910019
A101010
F111115
FF11111111255
Never write a MAC address in denary or binary in an answer. It is hexadecimal, written as six pairs of digits, and the pairs are what the marker is looking for.

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.

In a school computer room

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.

On a laptop

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.

Reading the label

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.

Replacing a failed 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.

Thirty identical computers

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.

Q1Why does a computer need a network interface card?
It is the interface between the computer and the network medium. It converts data into signals for the cable or radio link and incoming signals back into data, so without a NIC the computer cannot access a network.
Q2What is a MAC address?
A unique 48-bit identifier given to a network interface card at the point of manufacture, written in hexadecimal, used to identify that interface on a network.
Q3How many bits are in a MAC address?
48 bits, written as 12 hexadecimal digits in six pairs, which is 6 bytes.
Q4How is a MAC address written?
In hexadecimal, as six pairs of digits separated by colons or hyphens, for example 00:1A:2B:3C:4D:5E.
Q5What are the two halves of a MAC address?
The first 24 bits (three pairs) are the manufacturer code, shared by every card from that maker. The last 24 bits (three pairs) are the serial code, different for every card.
Q6When is a MAC address allocated?
At the point of manufacture, when the NIC is made. It is fixed in the hardware and does not change when the device joins a different network.
Q7Why is hexadecimal used for MAC addresses?
Because each hexadecimal digit represents exactly 4 bits, so two digits make one byte. It is a much shorter way of writing the same 48 bits and it shows the byte structure clearly.
Q8What is the purpose of a MAC address?
To identify a network interface card, and so the device, on a network, so that data can be addressed to one particular device and every device can be told apart.
Q9How many bytes long is a MAC address?
6 bytes, because 48 bits divided by 8 bits per byte is 6.
Q10What happens to a computer's MAC address if its NIC is replaced?
It changes, because the address belongs to the card. The new card came from the factory with its own MAC address.
0 of 10 marked as known

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.

StateAO11 mark
State the number of bits in a MAC address.

Mark scheme — tick each point you actually made

Examiner tip: This is a one-word answer. Do not write '48 bits long, split into six pairs' and then worry about space; just give the number with its unit.
DescribeAO12 marks
Describe the purpose of a network interface card in a computer.

Mark scheme — tick each point you actually made

Examiner tip: The mark is for the card's job, not for its name. Say what it connects and say what it converts, in both directions.
CalculateAO23 marks
A network interface card has the MAC address 00:1A:2B:3C:4D:5E. (a) Calculate the number of bytes used to store this address. (b) Identify the manufacturer code. (c) State the number of hexadecimal digits in the address.

Mark scheme — tick each point you actually made

Examiner tip: Show the division in part (a). For part (b) take the first three pairs, not the last three, and keep the pairs together as they are written.
ExplainAO14 marks
Explain how the structure of a MAC address makes it possible for every network interface card to have a different address.

Mark scheme — tick each point you actually made

Examiner tip: The last mark is for joining the two halves together. Naming the manufacturer code and the serial code is only half the explanation; say why the combination is unique.
DescribeAO24 marks
A school buys thirty identical desktop computers for a new computer room. Describe why each computer needs a network interface card and why the thirty MAC addresses will not be identical.

Mark scheme — tick each point you actually made

Examiner tip: Answer both halves of the question. The first two marks are about the card, the second two about the address.
ExplainAO35 marks
A network manager identifies each device on the school network by its MAC address rather than by a name the user chooses. Explain one benefit and one limitation of identifying devices in this way.

Mark scheme — tick each point you actually made

Examiner tip: This is an evaluation question, so you need both sides and a judgement. Give one benefit with a reason, one limitation with a reason, and finish with a sentence saying which matters more and why.

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

A student wroteA student wrote: 'A MAC address is 48 bytes long and is made of six groups of hexadecimal digits.'
Why it loses marksThe two halves of that sentence contradict each other. Six groups of two hexadecimal digits is 12 digits, which is 48 bits, not 48 bytes. Mixing bits and bytes is the most common arithmetic error on this topic.
The answer that scoresA MAC address is 48 bits long. It is written as 12 hexadecimal digits in six pairs, and because each pair is one byte, the whole address is 6 bytes.
A student wroteA student wrote: 'The network allocates a MAC address to a computer when it connects.'
Why it loses marksThat is what happens to an IP address. A MAC address is written into the network interface card at the point of manufacture, before the computer ever joins a network, and it does not change when the computer moves.
The answer that scoresA NIC is given its MAC address at the point of manufacture, and the address is fixed in the hardware. The network does not allocate it, which is why the MAC address stays the same on every network the device joins.
A student wroteA student wrote: 'The last three pairs of a MAC address are the manufacturer code.'
Why it loses marksThe order is the other way round. The address begins with the manufacturer code and ends with the serial code, so the first 24 bits identify the maker and the last 24 bits identify the individual card.
The answer that scoresThe first 24 bits, the first three pairs, are the manufacturer code, assigned to the maker and shared by all of its cards. The last 24 bits, the last three pairs, are the serial code, chosen by the manufacturer so that every card it makes is different.
A student wroteA student wrote: 'A computer can access a network through its processor, so a NIC is only needed for a wireless connection.'
Why it loses marksThe processor has no way to produce signals for a cable or for radio. A NIC is needed for any network connection, wired or wireless; the difference is only the medium and therefore the components on the card.
The answer that scoresA computer needs a NIC to access a network, whether the connection is wired or wireless. The card converts data into signals for the medium and converts incoming signals back into data; a wired card drives a cable, while a wireless card drives an antenna.
A student wroteA student wrote: 'MAC addresses are written in denary because computers store them as numbers.'
Why it loses marksDenary does not line up with the bits. Hexadecimal does: one hexadecimal digit is exactly 4 bits, so two digits are exactly one byte, which is why the address is written as pairs.
The answer that scoresA MAC address is written in hexadecimal, as six pairs of digits, because each hexadecimal digit represents exactly 4 bits and each pair represents one byte. The same 48 bits written in denary would be a long, unreadable number and would not show the byte structure.

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.