The table at the bottom of this gist was copied from: http://software77.net/cidr-101.html
10.0.0.0 is a 32 bit number split into four 8 bit groups (8, 16, 24, 32)
Note: 1 byte == 8 bits (so
10representing a single byte)
Where n (below) is given the value 8, 16, 24, or 32
10.0.0.0/n
8 states the first 8 bits is accounted for (by the 10 we’ve specified).
Meaning the rest can be added up to their max of 255 (10.255.255.255)
16 states the first 16 bits is accounted for (by the 10.0 we’ve specified).
Meaning the rest can be added up to their max of 255 (10.0.255.255)
24 states the first 24 bits is accounted for (by the 10.0.0 we’ve specified).
Meaning the rest can be added up to their max of 255 (10.0.0.255)
32 states the first 32 bits is accounted for (by the 10.0.0.0 we’ve specified).
Meaning the rest can be added up to their max of 255 (10.0.0.0)
10.0.0.1| IP | 10 | 0 | 0 | 1 | ||||||||||||||||||||||||||||
| 8 Bit Blocks | 8 bits [24-31] | 8 bits [16-23] | 8 bits [08-15] | 8 bits [00-07] | ||||||||||||||||||||||||||||
| Bit # | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00 |
| Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Binary | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Notice the binary row marks
1for the decimal numbers that add up to the specified byte
e.g. if you want254then you have1in all of the binary columns (under decimal) except the1at the end