About this tool
Learn binary numbers with interactive decimal-to-binary and binary-to-decimal converters, bit position visualization, and practice quizzes.
The Binary Learning Tool teaches base-2 by converting between decimal and binary and then showing the answer as eight labelled bit boxes weighted 128, 64, 32, 16, 8, 4, 2 and 1, so you can see which powers of two add up to your number. A built-in quiz asks you to write a random value from 0 to 255 in binary and grades it instantly. It suits school and college students meeting number bases for the first time, and anyone revising for a computer-science exam.
Open Binary Learning Tool on AltFTool — it loads instantly in your browser.
Keep the Decimal → Binary tab selected, type a value into Decimal Number and press Convert to Binary — the answer is padded to a full byte, so 5 reads 00000101. Switch to Binary → Decimal and press Convert to Decimal to go the other way.
Read the row of bit boxes under the result: the filled boxes are the 1s, and the small numbers beneath them are the place values 128, 64, 32, 16, 8, 4, 2 and 1. The Bit Position Reference panel lists the same weights against 2^7 down to 2^0.
In the Binary Quiz panel press New Question for a random number from 0 to 255, type its binary form into the answer box and press Check Answer — a wrong try replies Not quite! together with the correct binary for that number.
Each output bit is drawn above its weight — 128 down to 1 — so the conversion becomes visible arithmetic rather than a black box.
Results are padded to a full byte, so 5 appears as 00000101 and you learn to read fixed-width patterns the way real memory stores them.
A wrong quiz answer reveals the correct binary for that exact number straight away, so the mistake is fixed while the question is still in mind.
Subtract the largest power of two that fits, write a 1 in that position, and repeat with the remainder. For a byte the positions are 128, 64, 32, 16, 8, 4, 2 and 1 — so 42 is 32 + 8 + 2, giving 00101010.
Output is padded to 8 bits because a byte is 8 bits, the smallest unit most computers address. The leading zeros carry no value — 00000101 and 101 are both 5 — but fixed width makes patterns easier to compare.
The quiz picks a whole number from 0 to 255, which is exactly the range one unsigned 8-bit byte can hold (2^8 = 256 distinct values). Answers are checked as base-2, so leading zeros are optional.
255, when all eight bits are 1: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1. Add a ninth bit and the maximum doubles plus one to 511, which is why byte-sized fields overflow at 256.