subbing/24
Subbing › Guides › Binary & hex

Binary and hex practice

Bytes, bits and conversions. Relevant for CCNA, Network+, Security+.

Every subnetting shortcut rests on knowing what 192, 224, 240 and 248 look like in binary without thinking, and every IPv6 question rests on hex. Subbing drills single bytes both ways: decimal to 8-bit binary and back, hex to decimal and back, hex straight to binary, mask octets from a count of leading ones, and the value of a given bit.

Easy rounds use the numbers that matter: the powers of two, the mask values and a few round numbers. Medium and hard rounds use any byte.

Start drilling binary & hexGet the Android app
Five sample questions, with the working

Generated by the same code as the app. They change with every release; the app never runs out.

128 in 8-bit binary?
Answer: 10000000
  1. 128 = 128
  2. 128 64 32 16 8 4 2 1 → 10000000
How many different values can 7 bits represent?
Answer: 128
  1. 2^7 = 128
A subnet mask octet with 5 leading 1-bits (the rest 0) equals?
Answer: 248
  1. 5 ones, 3 zeros: 11111000
  2. 128 + 64 + 32 + 16 + 8 = 248
01110010 in decimal?
Answer: 114
  1. 1-bits: 64 + 32 + 16 + 2 = 114
0xD4 in decimal?
Answer: 212
  1. D = 13, 4 = 4
  2. 13 × 16 + 4 = 212
Question types in this topic
Guide

Binary and hex for networking: The place values, the eight mask bytes, hex digits and the conversions that make subnetting and IPv6 fast.

Questions people ask

What is 192 in binary?

11000000. It is 128 + 64, the two highest place values, which is why a /26 mask octet is 192.

How do you convert 0xC0 to decimal?

C is 12 and 0 is 0, so 12 × 16 + 0 = 192.

Start drilling binary & hexGet the Android app
Other topics
Subnetting practiceMasks, ranges and hostsIPv6 practiceNotation, types, EUI-64Port numbers quizWell-known ports, TCP vs UDP