Guide
Seeing the bits of an IPv4 address
Subnetting is much easier when you can see the bits. The decimal numbers in 192.168.1.130 hide where the network ends and the hosts begin, but eight-bit groups make it visible. The page writes each IPv4 address as 32 bits, one per line of input, and shows the other usual notations too.
Octet by octet
Each of the four numbers is between 0 and 255, so it fits in eight bits. To write 192 in binary, note that 192 = 128 + 64, so the bits for 128 and 64 are 1 and the rest are 0, which gives 11000000. The same method turns 168 into 10101000 (128 + 32 + 8), 1 into 00000001. The page pads every group to eight digits so the columns line up, which is the form used in textbooks, exams and router documentation.
Masks and prefixes at bit level
A prefix length is a count of leading ones. A /26 mask is 26 ones followed by 6 zeros: 11111111.11111111.11111111.11000000, which is 255.255.255.192 in decimal. Enter that mask as if it were an address and you will see exactly this pattern. The wildcard mask used in access lists is its mirror image, with ones where the mask has zeros. Because the network part is a run of ones, a valid mask never has a zero followed by a one; the mask 255.0.255.0 would be a pattern, not a subnet.
Using bits to compare addresses
To decide whether two hosts are on the same network, convert both and compare the first N bits, where N is the prefix. For 192.168.1.130 and 192.168.1.190 with a /26, the first 26 bits are the same, so they share the network. With 192.168.1.100 they would not: its last octet is 01100100, which starts with 01, while 130 (10000010) and 190 (10111110) start with 10, so the addresses differ within the first 26 bits. Doing this once by hand teaches more than a dozen calculator results, and the page makes it quick enough to check your work.
A worked example
For 192.168.1.1 the page returns 11000000.10101000.00000001.00000001. The same address is the decimal integer 3232235777, hexadecimal 0xC0A80101, dotted hexadecimal C0.A8.01.01, dotted octal 0300.0250.01.01, and a private address under RFC 1918. Now enter 255.255.255.192: the output is 11111111.11111111.11111111.11000000, six host bits, so each subnet has 2⁶ = 64 addresses.
Limits
The page converts text; it does not decide which part of an address is the network. For that you need the prefix and the Subnet Calculator. IPv6 addresses are 128 bits long and are not accepted here. Leading zeros inside an octet are rejected, because some systems read them as octal, which would change the value.
Masks you will keep meeting
A handful of last-octet values cover almost every subnet mask. A /25 ends in 10000000 (128), a /26 in 11000000 (192), a /27 in 11100000 (224), a /28 in 11110000 (240), a /29 in 11111000 (248) and a /30 in 11111100 (252). Each extra network bit halves the host part, so a /26 leaves six host bits and 64 addresses, a /27 leaves five and 32, and so on. Typing these masks into the page and watching the run of ones lengthen is the fastest way to make the pattern stick.
Related tools
- Binary to IP Converter rebuilds a dotted address from 32 bits.
- Subnet Calculator uses the prefix to find the network, broadcast and hosts.
- Wildcard Mask Calculator inverts a mask for access lists.
- Binary to Decimal Converter converts any single binary number with its working shown.
Checked against the current version of the IP to Binary on .

