π» Binary Numbers Explorer
How computers count with only 0s and 1s Β· Visual bit display Β· Grades 5β8
Inside a computer chip, each tiny switch is in one of two states, often called OFF (0) and ON (1). That's why everything in a computer is stored as binary: a series of 1s and 0s called bits.
π Flip the Bits: Binary to Decimal
Tap a box to turn that bit on (1) or off (0), or type a binary number with up to 16 digits. The decimal value is the sum of the places that are on.
π€ Your Name in Binary
Computers store letters as numbers too. In the ASCII code, capital A is 65, B is 66 and so on, and each number is saved as one byte. Type a name or word (up to 12 characters).
ASCII codes: RFC 20, ASCII format for network interchange (1969). Letters outside basic ASCII, like Γ© or emoji, use more than one byte in today's Unicode text, so this tool skips them.
Binary Numbers: How Computers Count With Two Digits
Every photo, song, game and text message on a device is stored as long strings of two digits, 0 and 1. That is the binary (base-2) number system. Each 0 or 1 is called a bit, and inside a computer chip each bit is held by a tiny electronic switch that is in one of two states, often described as off and on. Two states are easy for hardware to tell apart reliably, which is why computers count this way.
The converter above takes a whole number from 0 to 255 and shows it as 8 bits, one full byte. Each bit sits in a box labeled with its place value (128, 64, 32, 16, 8, 4, 2, 1). Boxes that are "on" light up green, and the line underneath adds up the lit values so students can check the conversion themselves. For a number above 255, the tool shows its full binary and how many bits it needs, because 255 is the biggest number 8 bits can hold. The quiz below the converter asks four short questions and loops back to the start.
Place Value, Just With Twos
Binary is the same idea as our everyday base-10 system, only with a different multiplier. In base 10, each place is worth 10 times the place to its right: ones, tens, hundreds, thousands. In base 2, each place is worth 2 times the place to its right: ones, twos, fours, eights, sixteens and so on. A student who really understands why the 3 in 300 means "three hundreds" is ready for binary, and working in a new base is one of the best ways to check that place value is understood rather than memorized.
Worked example: binary to decimal
Take binary 1011. Read the places from right to left: 1 one, 1 two, 0 fours, 1 eight. Add the places that have a 1: 8 + 2 + 1 = 11. Try it in the tool by typing 11; the boxes for 8, 2 and 1 light up and the line reads "11 = 8 + 2 + 1".
Worked example: decimal to binary
To write 42 in binary, start at the biggest place that fits. 64 is too big, so that bit is 0. 32 fits: 42 − 32 = 10. 16 is too big (0). 8 fits: 10 − 8 = 2. 4 is too big (0). 2 fits: 2 − 2 = 0. The 1s place is 0. Reading the bits from 128 down gives 00101010, which is 101010 without the leading zeros. The tool opens on 42 so students can compare their answer straight away.
Why 8 bits stop at 255
With all 8 bits on, the total is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. Counting zero as well, one byte can hold 256 different values. Each extra bit doubles the count: 1 bit gives 2 values, 2 bits give 4, 3 bits give 8, and 8 bits give 28 = 256.
Using It in Class or at Home
- Start unplugged. CS Unplugged's binary lesson uses five cards with 1, 2, 4, 8 and 16 dots. Face up means 1, face down means 0. Ask a row of five students to hold the cards and show 9 (8 + 1) or 21 (16 + 4 + 1). With all five face up the total is 31.
- Move to the converter. Have students predict the bits for a number before typing it, then check. Good starting numbers are powers of two (1, 2, 4, 8, 16) because only one box lights up.
- Look for patterns. Type 1, 2, 3, 4 ... 16 in order and watch the 1s box. It flips every time, the 2s box every second number, the 4s box every fourth. Ask: which numbers always end in 1? (The odd ones.)
- Finish with the quiz. The four questions cover reading binary, writing a small number, what a byte can hold and what each place means.
A quick challenge for early finishers: what is the biggest number you can show with 4 bits? (1111 = 15.) With 5 bits? (31.) Can they spot the rule? (One less than the next power of two.)
Common Mix-Ups
- Reading "10" as ten. In binary, 10 means one two and zero ones, so it equals 2. Encourage students to say "one-zero" for binary numbers.
- Starting the places at 2. The rightmost place is the 1s place, just as in base 10. Places go 1, 2, 4, 8, not 2, 4, 8, 16.
- Thinking 8 bits count to 256. They make 256 different patterns, but one of them is zero, so the largest number is 255.
- Kilobyte confusion. In the metric (SI) system, kilo means 1,000, so a kilobyte is 1,000 bytes and a gigabyte is a billion bytes. Computers have long used "kilobyte" for 1,024 bytes (210) as well; to clear this up, the IEC created the name kibibyte (KiB) for 1,024 bytes in 1998, according to NIST. Both uses still show up on devices.
Where to Go Next
- Represent letters: in the ASCII code, capital A is 65, which is 01000001 in binary. Students can encode their initials with the converter.
- Connect to pixels: a black-and-white picture can be stored as a grid of 0s and 1s. The Pixel Art tool makes a good follow-up.
- Compare bases: build the same number with Base Ten Blocks and in binary, and talk about what changes and what stays the same.
Questions Parents and Teachers Ask
What grade is binary appropriate for?
CS Unplugged suggests its first binary lesson for ages 8 to 10, so upper elementary students can do the card activity. The full 8-bit converter and the math behind it fit grades 5 to 8 well, where students are already working with place value and exponents.
Why do computers use binary instead of base 10?
Each bit is stored by an electronic part that only needs to be in one of two clearly different states. Telling two states apart is far more reliable than telling ten levels apart, so the hardware is simpler and makes fewer errors.
Can the tool convert binary to decimal?
Yes. In Flip the Bits, tap any box to switch that bit on or off, or type a binary number such as 1011, and the decimal value appears with the place values added up. The quiz also includes a binary-to-decimal question.
Is a kilobyte 1,000 or 1,024 bytes?
Officially, kilo means 1,000, so a kilobyte is 1,000 bytes. A kibibyte (KiB) is 1,024 bytes. Many programs still use "KB" for 1,024, which is why storage sizes can look slightly different on different devices.
Standards Connections
CSTA 2-DA-07 (grades 6-8): "Represent data using multiple encoding schemes." Math connection: CCSS 5.NBT.A.1, which asks students to recognize that each place in a multi-digit number is worth 10 times the place to its right; binary is the same idea with a factor of 2.
Sources
- CS Unplugged: How binary digits work
- NIST: Prefixes for binary multiples
- CSTA K-12 Computer Science Standards (revised 2017)
- Common Core: Grade 5 Number and Operations in Base Ten
Last reviewed: November 2026 · Supports CSTA 2-DA-07 and CCSS 5.NBT.A.1
π Word Help on This Page
Look up any word from this page in our kid-friendly dictionary:
Explore more: Word Tools Hub Β· Word Safari