The Language of Binary
How computers think in 1s and 0s
How computers think in 1s and 0s
Binary is a number system that uses only two digits: 0 and 1. Computers use binary because their circuits can only be in two states - ON or OFF, like a light switch!
👉 Click the lightbulbs to toggle them!
In our decimal system, each position is worth 10x more than the one to its right (1, 10, 100...). In binary, each position is worth 2x more (1, 2, 4, 8, 16...)!
👉 Click the bits to toggle them, or use the +/- buttons to count!
To convert binary to decimal, add up the values of all the "1" positions. Try typing a binary number below!
To convert decimal to binary, find which powers of 2 add up to your number. Start with the biggest power of 2 that fits!
Computers store letters as numbers using a system called ASCII. Each letter has a number, and that number is stored in binary!
Every color on your screen is made from Red, Green, and Blue light. Each color channel is a number from 0-255 (8 bits of binary)!
Writing 11111111 every time is tedious! Hexadecimal (hex) is a shortcut - it groups 4 bits into a single character. Instead of 16 symbols (0-15), we use 0-9 and A-F.
Click the bits to see how they group into hex!
Now you know what #FF0000 really means!
You've learned how computers use just two digits - 0 and 1 - to represent everything from numbers to text to colors!
Computers use 0 and 1 because circuits are either OFF or ON
Each binary position is worth 2x more (1, 2, 4, 8, 16...)
Letters are stored as numbers using ASCII (A = 65)
A shortcut where 4 bits = 1 hex digit (0-F), making FF = 255
Put your new knowledge into practice!