---
title: "Binary and Hexadecimal Numbers"
domain: networking
level: foundations
duration: "1h 10min total"
---

# Binary and Hexadecimal Numbers

Computers count in ones and zeros, and networking is full of them: IP addresses, subnet masks and MAC addresses are just binary numbers written in a friendlier way. This module teaches you to read and convert binary and hexadecimal numbers step by step, so later modules on IP addressing and subnetting feel natural.

## Learning objectives
By the end of this module you will be able to:
1. Explain what a bit and a byte are and why computers use binary.
2. Convert numbers between decimal and binary (0 to 255).
3. Convert numbers between binary and hexadecimal, and recognize hexadecimal in a MAC address.
4. Read an IPv4 address as four 8-bit numbers.

## Prerequisites
- [02 — Your Home Network](../02-home-network/README.md).
- For the activities: paper and pencil; optionally Python 3 to check your answers. Cost: free.

## Contents
| Type | Duration |
|---|---|
| [Theory](lesson.md) | 30 min |
| [Activities: converting numbers by hand](lab.md) | 30 min |
| [Assessment (8 questions)](quiz.md) | 10 min |

## Further reading
- [RFC 791](https://www.rfc-editor.org/rfc/rfc791) — Internet Protocol (where the 32-bit IPv4 address is defined)
