Online Calculators and Tools | Calculators Toolbox
Our free binary converter turns decimal numbers into binary and binary back into decimal, with the full division or place-value working shown. Every result also includes the hexadecimal and octal equivalents.
Binary is a number system that uses only two digits, 0 and 1. It's also called base 2. Our everyday decimal system is base 10: each place is worth ten times the one to its right (ones, tens, hundreds). In binary, each place is worth twice the one to its right: ones, twos, fours, eights, sixteens and so on.
Computers use binary because their circuits have two stable states, on and off, which map perfectly onto 1 and 0. With a binary converter you can see how every number, letter, photo and video on your device is ultimately stored: as long strings of binary digits, or bits. Eight bits make a byte, which can represent any value from 0 to 255.
Divide the number by 2 repeatedly and record the remainders. Reading the remainders from the last one to the first gives the binary number.
For 156: 156 ÷ 2 = 78 r 0, 78 ÷ 2 = 39 r 0, 39 ÷ 2 = 19 r 1, 19 ÷ 2 = 9 r 1, 9 ÷ 2 = 4 r 1, 4 ÷ 2 = 2 r 0, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1. Reading upward gives 10011100. To go back, add the place values where there's a 1: 128 + 16 + 8 + 4 = 156.
Every instruction a CPU runs and every number it adds is handled in binary at the transistor level.
Network engineers convert IP addresses like 192.168.1.1 to binary (11000000.10101000.00000001.00000001) to work out subnet masks.
Each red, green and blue channel of a screen pixel is stored as one byte, a value from 00000000 to 11111111.
The letter A is 65 in ASCII, which is 01000001 in binary.
Software stores yes/no settings as individual bits, packing eight options into a single byte.
Binary conversion is a core skill in intro programming, digital logic and IT certification courses.
A bit is one binary digit. A byte is 8 bits and can hold 2⁸ = 256 values (0–255). A kilobyte is 1,024 bytes in binary terms, because 2¹⁰ = 1,024.
From right to left, binary places are worth 1, 2, 4, 8, 16, 32, 64, 128, and so on, each double the last.
Example: 1101₂ = 8 + 4 + 0 + 1 = 13.
Computers usually store negative numbers using two's complement: invert all the bits and add 1. In 8 bits, −5 is 11111011. This converter shows negatives with a simple minus sign, the mathematical form.
Each group of four bits matches exactly one hex digit, which is why programmers use hex as shorthand for binary. 1001 1100 = 9C. Convert directly with our hex converter.
| Decimal | Binary | Decimal | Binary |
|---|---|---|---|
| 0 | 0 | 9 | 1001 |
| 1 | 1 | 10 | 1010 |
| 2 | 10 | 15 | 1111 |
| 3 | 11 | 16 | 1 0000 |
| 4 | 100 | 32 | 10 0000 |
| 5 | 101 | 64 | 100 0000 |
| 6 | 110 | 100 | 110 0100 |
| 7 | 111 | 128 | 1000 0000 |
| 8 | 1000 | 255 | 1111 1111 |
Convert 1100 1010₂ to decimal.
Check it in reverse with the Decimal → Binary tab of the binary converter: 202 converts back to 1100 1010, and its hex value is CA.
The German mathematician Gottfried Wilhelm Leibniz described the modern binary system in 1703, fascinated by how every number could be written with just 0 and 1. More than two centuries later, Claude Shannon showed in 1937 that electrical switching circuits could carry out binary logic, laying the foundation for digital computers. Today, billions of transistors switching between two states every second make binary the language behind all modern technology.
Adding in binary follows the same carrying idea as decimal, just with smaller numbers: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1), and 1 + 1 + 1 = 11 (write 1, carry 1). For example, 0110 (6) + 0111 (7) = 1101 (13). Multiplying by 2 is even easier: shift every bit one place to the left and add a 0 at the end, so 1101 becomes 11010 (26). Computers use these simple rules billions of times a second.
The most frequent error when converting by hand is reading the remainders in the wrong order. They must be read from the last division back to the first, so the final remainder becomes the leftmost bit. Another slip is skipping a place value when converting back to decimal, especially in long numbers with several zeros in a row. Grouping bits in fours and writing the place values above them, as shown in the worked example, prevents both problems.
Our binary converter works in both directions, handles very large numbers exactly, groups bits for readability, and shows hex and octal equivalents with every result. The step-by-step explanation makes it ideal for computer science students, network engineers, programmers and anyone curious about how computers count.
Divide the number by 2 repeatedly, writing down the remainder each time. When you reach 0, read the remainders from the last to the first. For example, 13 becomes 1101.
Multiply each binary digit by 2 raised to its position, starting from 0 on the right, and add the results. 1011 = 8 + 0 + 2 + 1 = 11.
255 in binary is 11111111, eight ones. It is the largest value that fits in one byte.
Computer circuits have two reliable states, on and off, which map naturally onto the digits 1 and 0. This makes binary simple and dependable to build into hardware.
Eight bits can represent 2⁸ = 256 different values, from 0 to 255.
It is called base 2, because it uses only two digits, 0 and 1.