Address counts and masks
A /n block has 2 to the power (32 − n) addresses: a /24 has 256, a /26 has 64, a /20 has 4096. The mask is the first n bits set to 1: /24 is 255.255.255.0, /20 is 255.255.240.0.
60 seconds of quick-fire questions: is this IP inside the block, how many addresses in a /26, what's the mask for a /20… The more you get right, the harder it gets. Streaks multiply your score; wrong answers cost time.
You have 60 seconds. Right answers score points, a streak of 5 or more multiplies them, and a wrong answer costs 3 seconds. Number keys 1–4 work too.
An IPv4 address is a 32-bit number, and /24 means the first 24 bits are the network part and the rest the host part. With a few of these sums you can read the blocks behind ISPs, data centres and proxies.
A /n block has 2 to the power (32 − n) addresses: a /24 has 256, a /26 has 64, a /20 has 4096. The mask is the first n bits set to 1: /24 is 255.255.255.0, /20 is 255.255.240.0.
Clear the host bits to get the network address; set them all to get the last address. For 203.0.113.77/26, blocks run in 64s, 77 falls in 64–127, so the network is 203.0.113.64 and the last address 203.0.113.127.
Compare two addresses bit by bit from the top: the length of the shared prefix is the smallest block that contains both. When risk systems talk about the same /24 or /16, this is the prefix they compare.
Each right answer is 10 points; after a 5-answer streak each one is ×2, ×3 after 10, up to ×4. A wrong answer resets the streak and costs 3 seconds.
It starts with tidy /8, /16 and /24 blocks; once you're on a roll you'll get /20, /27 or even /19, which need real binary maths.
No one's stopping you, and the site's IP calculator would do it, but where's the fun in that?
Your best score is stored only in your browser.