A binary converter turns base-2 numbers made of 0s and 1s into ordinary decimal numbers and back, and can add two binary numbers. 1010 in binary is 10 in decimal, and 11111111 is 255.
On this page

How to use the binary converter
- Enter a binary or decimal value.
- Choose binary to decimal, decimal to binary, or add two binaries.
- For addition, enter the second binary number.
- Read the result.
How the binary converter works
A binary converter works in base 2: each digit is a bit worth a power of two, starting with 1 on the right and doubling each place to the left (1, 2, 4, 8, 16, …). To convert binary to decimal, add the place values of every 1. To convert decimal to binary, divide by 2 repeatedly and read the remainders from bottom to top.
- 1010 = 8 + 0 + 2 + 0 = 10
- Decimal 13 → 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101
- Binary addition: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1)
Binary converter worked example
| Binary | Decimal |
|---|---|
| 1010 | 10 |
| 1111 | 15 |
| 11111111 | 255 |
| 10000000000 | 1,024 |
| 1111101000 | 1,000 |
| 11111101010 | 2,026 |
The default 1010 has 1s in the 8 and 2 places, so it equals 10. Eight 1s, 11111111, is 255, the largest value one byte can hold. Using the add option, 1010 + 110 = 10000, which is 10 + 6 = 16 in decimal.
Bits, bytes and ranges
A byte is 8 bits and holds 256 values, 0 to 255. Each extra bit doubles the range: 16 bits hold 65,536 values and 32 bits about 4.29 billion. That is why an IPv4 address, which is 32 bits, is written as four numbers from 0 to 255, and why colors on screens are often given as three bytes for red, green and blue.
Binary and hexadecimal
Long binary numbers are hard to read, so programmers group them into fours and write each group as one hexadecimal digit, 0–9 and A–F. 1111 is F and 1010 is A, so 11111010 is FA in hex, or 250 in decimal. Converting between binary and hex is just a matter of grouping bits, which is why hex is used for memory addresses and color codes such as #FF8800.
Negative numbers, large values and input rules
- A leading minus sign is allowed: −13 converts to −1101. This is sign-and-magnitude notation. Computers usually store negative integers with two’s complement instead, where the leftmost bit has a negative weight; in 8 bits, −1 is 11111111.
- Whole numbers of any size convert exactly, because the binary converter uses arbitrary-precision integers. 9,007,199,254,740,993, just above the limit of ordinary 64-bit numbers, converts without losing its last digit.
- Inputs are checked strictly: binary values may contain only 0 and 1, and decimal values only digits, so a typo such as 12abc is rejected instead of being read as 12.
- Fractions can be written in binary too (0.1 in binary is one half), but the tool converts whole numbers only.
Text and binary
Letters are stored as numbers too. In ASCII and UTF-8, capital A is 65, which is 01000001 in binary. To see text as bits, look up each character’s code and convert it with the binary converter.
Practice conversions
A quick way to read binary is to memorize the first eight place values: 128, 64, 32, 16, 8, 4, 2 and 1. To read 10110010, add the values above each 1: 128 + 32 + 16 + 2 = 178. To write 200 in binary, take the largest place value that fits, 128, leaving 72; then 64, leaving 8; then 8, leaving 0. Put 1s in the 128, 64 and 8 places and 0s elsewhere: 11001000. Use the binary converter to check your answers while you practise.
Binary addition follows the same carrying rules as decimal. Adding 1011 and 0110 column by column from the right: 1 + 0 = 1; 1 + 1 = 10, write 0 and carry 1; 0 + 1 + 1 = 10, write 0 and carry 1; 1 + 0 + 1 = 10, write 0 and carry 1; then bring down the carry. The answer is 10001, which is 11 + 6 = 17 in decimal. Subnet masks, file permissions and hardware registers all rely on reading bits like this, so the skill is useful well beyond the classroom.
Related converters and calculators
Related tools:
- Base64 encoder decoder: encoding
- Data storage converter: bytes
- Scientific notation calculator: large numbers
- Exponent calculator: powers of two
Sources
MDN Web Docs: Number.MAX_SAFE_INTEGER.
Formula and method
BigInt throughout. bin2dec: strict /^-?[01]+$/ then BigInt('0b'+digits). dec2bin: strict /^-?\d+$/ then BigInt(v).toString(2) with sign-magnitude minus. bin_add: sum of two parsed binaries, shown in binary and decimal.
BigInt conversion and addition with strict input checks. Negatives use sign-magnitude notation, not two's complement.
Questions about this calculator
What is 1010 in decimal?
10.
What is 255 in binary?
11111111.
How do you add binary numbers?
Column by column, where 1 + 1 = 10 (write 0, carry 1).
How many values does a byte hold?
256, from 0 to 255.
Does it convert negative numbers?
Yes, with a leading minus sign (sign-and-magnitude, not two’s complement).
Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.
Report a calculation issue