Build any IP address with four sliders, slide a divider to set the subnet mask, and watch the AND operation reveal the network address — live, in binary. No jargon, just play.
Try:
1
Build Your IP Address
An IPv4 address is just four numbers — each called an octet — separated by dots. Each octet is 8 bits (0–255). Drag the sliders to change any octet and watch the 32-bit binary representation update instantly.
192.168.1.1
Binary — each square is one bit (0 or 1), grouped by octet
2
Draw the Line — Subnet Mask
A subnet mask is another 32-bit number that splits your IP into two parts: the network bits (green — same for every device on this subnet) and the host bits (orange — unique per device). Drag the / slider to move the boundary.
/24
■ network bits■ host bits
3
AND = Your Network Address
To find which subnet an IP belongs to, routers perform a bitwise AND: every bit in the IP is ANDed with the matching mask bit. Where the mask is 1, the IP bit is kept. Where the mask is 0, the result is forced to 0 — zeroing out all host bits, leaving only the network address.
4
How Did This Page Reach You?
Every web request travels through multiple subnets before it arrives. Here is what happens when you load a page like this one.
💻
Your Device
192.168.1.x
/24 subnet
▶
📡
Home Router
203.0.113.42
public IP
NAT
▶
🏢
ISP Router
BGP peer
routes packets
▶
☁️
Internet
backbone
900k+ routes
▶
🖥️
Web Server
104.21.x.x
/24 subnet
🔄
NAT — Network Address Translation
Your device has a private IP (192.168.x.x) that only works inside your home network. Your router replaces it with its own public IP before sending each packet out. When a reply comes back, the router checks its translation table and forwards it to the right device. This is why millions of home devices can share a handful of public IPs.
🗺️
Routing hops — AND in action at every step
At each router, the destination IP is ANDed against every entry in the routing table. The longest matching prefix wins and the packet is forwarded down that path. A tier-1 ISP router does this for over 900,000 prefixes, millions of times per second, using specialised hardware called a TCAM.
How to use
Step 1 — IP sliders: Drag each of the four octets (0–255) to build any IPv4 address. Watch the 32-bit binary squares update in real time and the address-type callout change.
Step 2 — Subnet mask: Drag the / slider left or right to move the network/host boundary. Green bits are network, orange are host.
Step 3 — AND result: See the three rows — IP, mask, and network address — update together. Notice how ANDing zeroes out all the host bits.
Step 4 — Packet journey: Read how your request travels from your device through NAT, ISP routers, and the internet backbone to reach a web server.
Use the Try: preset chips to jump to common scenarios — home /24, large /8, tiny /30, or single host /32.
Frequently Asked Questions
What is a subnet mask?
A subnet mask is a 32-bit number that divides an IP address into a network part and a host part. Written as 255.255.255.0 or as a CIDR prefix like /24, it tells routers which bits identify the network and which bits identify the individual device.
What does /24 mean in an IP address?
/24 means the first 24 bits of the address are the network part, leaving 8 bits for hosts. That gives 256 addresses (2⁸), of which 254 are usable — the first is the network address and the last is the broadcast address.
Why do we need subnetting?
Subnetting divides a large address block into smaller, manageable groups. It improves security (traffic stays within a subnet), reduces broadcast traffic, and lets organisations allocate address space efficiently — for example, giving each department its own subnet.
What is the difference between network address and broadcast address?
The network address (all host bits = 0) identifies the subnet and cannot be assigned to a device. The broadcast address (all host bits = 1) delivers packets to every device in the subnet and also cannot be assigned. Every subnet loses two addresses this way.
What are private IP address ranges?
RFC 1918 reserves three ranges for private networks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Devices inside your home or office use private IPs. Your router's public IP is what the internet sees, and NAT maps between them.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) replaced the old Class A/B/C system in 1993. Instead of fixed boundaries, CIDR lets you write any prefix length after a slash — /24, /20, /16 — making it possible to allocate exactly the right number of addresses for any network.
What is NAT and why does it exist?
NAT (Network Address Translation) lets many devices share one public IP. Your router rewrites outgoing packets to use its public IP, keeps a translation table, and rewrites replies back to the correct private device. NAT was invented to slow IPv4 address exhaustion and remains the reason most home devices never need a public IP.
Did you know?
The bitwise AND trick works in hardware at line speed — routers can look up millions of routes per second by ANDing destination IPs against stored prefixes in specialised silicon called a TCAM.
The nine valid subnet mask octet values (0, 128, 192, 224, 240, 248, 252, 254, 255) come from the rule that masks must be a contiguous run of 1s. Any other value — like 253 — is not a valid subnet mask.
IPv6 uses the same /prefix notation as CIDR. A typical home IPv6 assignment is a /64, giving 2⁶⁴ ≈ 18 quintillion addresses — more than enough for every device you will ever own.
The internet's backbone routers (tier-1 ISPs) exchange routing information using BGP (Border Gateway Protocol), which carries over 900,000 prefixes in the global routing table today.