Binary & Hex Conversion Drill — timed binary/decimal/hex practice game
Practise converting between binary, decimal and hexadecimal in six directions at 4, 8 or 16 bits, with place-value and nibble explanations, personal bests and a shareable challenge link with the same numbers.
🔒 Runs entirely in your browser. Your input and output are never sent to a server or stored — fully private.
Learn the eight bit weights 128 64 32 16 8 4 2 1 and the sixteen nibbles 0000–1111 = 0–F; every conversion here is built from those two tables. Subnet masks, MAC and IPv6 addresses and colour codes all read faster once they are automatic.
About this tool
This binary and hex conversion drill turns number-base conversion into a ten-question game against the clock. Choose a direction — binary to decimal, decimal to binary, hex to decimal, decimal to hex, binary to hex, hex to binary, or a mix — and a size of 4, 8 or 16 bits, then type each answer; 0b and 0x prefixes, spaces and lower-case hex are all accepted. After each question you see the working: the bit weights that add up to the number, the hex digits times their place values, or the 4-bit nibble groups. Your best time is kept in this browser and the share link sends friends the very same numbers. Everything runs in your browser.
Frequently asked questions
How do I convert binary to decimal quickly?
Add up the weights of the 1 bits. From the right, 8-bit positions are worth 1, 2, 4, 8, 16, 32, 64 and 128, so 1010 1001 is 128 + 32 + 8 + 1 = 169. For decimal to binary, go the other way: subtract the largest weight that fits, write a 1, and carry on — 200 is 128 + 64 + 8, which is 1100 1000. Once the eight weights are memorised, you no longer need repeated division by two.
Why does each hex digit equal exactly four bits?
Because 16 is 2 to the power of 4, so the sixteen hex digits 0–F match the sixteen possible 4-bit patterns 0000–1111 one to one. That makes binary ↔ hex a lookup rather than arithmetic: split the binary into groups of four from the right and replace each group — 1010 1001 is A9. It is why hex is used for MAC addresses, IPv6, memory dumps and colour codes: two hex digits are always exactly one byte.
How do I convert hex to decimal in my head?
Multiply each digit by its place value — 1, 16, 256, 4096 from the right — and add. A9 is 10 × 16 + 9 = 169, and 1F4 is 1 × 256 + 15 × 16 + 4 = 500. For two digits it helps to know the multiples of 16 up to 240 (F0). Going from decimal to hex, divide by 16: the quotient is the first digit and the remainder the second, so 200 ÷ 16 = 12 remainder 8, which is C8.
Where do network engineers actually use these conversions?
Constantly. Subnet masks and wildcards are 8-bit binary patterns — 255.255.255.224 is 11100000 in the last octet. IPv6 addresses and MAC addresses are hex, and the 8-bit mode here maps directly onto one octet or two hex digits. Packet captures, ACL bit masks, DSCP values in QoS and TCP flags are all read in binary or hex. Being quick at 8-bit conversions is what makes the subnetting drill feel easy.
What answer formats does the drill accept?
Whatever you would naturally write. Binary may include a 0b prefix, spaces or underscores and may drop leading zeros, so 0b1010_1001, 1010 1001 and 10101001 are all the same answer. Hex may use upper or lower case with a 0x prefix or a trailing h, so 0xa9, A9 and A9h all count. Decimal is plain digits. Answers are compared as numbers, so only a wrong value is marked wrong, never the formatting.