This course is about the numbers that say where a device is on a network. It follows How networks work, but everything it needs from there, and from binary, is here.
A network is devices joined so they can send each other data. Each device is a host. A router is the box that joins one network to another and passes data between them; at home it's the box from your internet provider. A LAN (local area network) is the network in one home or office. Data travels in small pieces called packets, each labelled with where it's from and where it's going.
Every host has an IP address, like 192.168.1.10, which says where on the internet to deliver packets. A port is a number from 0 to 65,535 that picks which program on the host gets the data: web servers listen on port 443, for example. A broadcast is a packet sent to every host on the local network at once.
Computers store everything as bits, each a 0 or a 1. Binary writes numbers with just those two digits, where each place is worth twice the one to its right: 1, 2, 4, 8, 16 and so on. To read binary, add the places that have a 1: 1011 is 8 + 2 + 1 = 11. Eight bits make a byte, which holds 0 to 255. Each extra bit doubles how many values fit, so n bits hold 2ⁿ values (2 multiplied by itself n times: 2³ = 8).
The examples use Python, a programming language, with its ipaddress module, which knows the rules of IP addresses. You only need to read them. import ipaddress loads the module, print() shows a result, and a dot reads a property, so net.num_addresses is how many addresses the network net holds. A for loop runs its indented line once for each item.
import ipaddress
net = ipaddress.ip_network("192.168.1.0/24")
print(net.num_addresses)
for n in [1, 2]:
print(n * 10)
Prints
256
10
20
Hex (hexadecimal) shows up in the IPv6 lesson: it counts in sixteens, using 0 to 9 and then A to F for 10 to 15, so one hex digit stands for exactly four bits.
Practice
What joins your home network to the internet?
More info
Quick reference
Host
Any device on a network.
Router
Joins networks and passes packets between them.
IP address
Where on the network to deliver a packet.
Port
0 to 65,535: which program on the host.
Broadcast
A packet for every host on the local network.
Bit, byte, 2ⁿ
A 0 or 1; 8 bits; how many values n bits hold.
Hex
Base 16: 0 to 9, then A to F; one digit is 4 bits.