IPv4 ↔ Binary Converter & Subnet Bit Explorer
Convert IPv4 addresses and subnet masks into binary and see exactly which bits belong to the network and which remain available for hosts.
Binary Representation
Subnet Bit Explorer
Network bits = prefix portionHost bits = remaining portion
Why Binary Matters in Subnetting
IPv4 addresses contain 32 bits, divided into four 8-bit octets. A CIDR prefix tells you how many of those bits are network bits.
Example: 192.168.10.25/24
The first 24 bits identify the network. The final 8 bits identify hosts within that subnet.
The first 24 bits identify the network. The final 8 bits identify hosts within that subnet.
| Concept | Binary meaning | Example |
|---|---|---|
| Network bit | Covered by the CIDR prefix | /24 = first 24 bits |
| Host bit | Left after the prefix | /24 = last 8 bits |
| Subnet mask bit 1 | Network portion | 255.255.255.0 |
| Subnet mask bit 0 | Host portion | 0.0.0.255 in the last octet |
| Wildcard bit 0 | Must match | Cisco ACL/OSPF matching |
| Wildcard bit 1 | Ignored | Cisco ACL/OSPF matching |
Subnetting Bit Patterns
| CIDR | Last-octet mask | Binary | Total addresses | Traditional usable hosts |
|---|---|---|---|---|
| /24 | 255 | 11111111 | 256 | 254 |
| /25 | 128 | 10000000 | 128 | 126 |
| /26 | 192 | 11000000 | 64 | 62 |
| /27 | 224 | 11100000 | 32 | 30 |
| /28 | 240 | 11110000 | 16 | 14 |
| /29 | 248 | 11111000 | 8 | 6 |
| /30 | 252 | 11111100 | 4 | 2 |
