This calculator converts a decimal (base 10) number into binary (base 2). Type a whole number, a negative number or a number with a decimal point, and it shows three results: the binary number, the signed two’s complement form and the hexadecimal value.
RESULTS
Overview of Decimal to Binary Conversion
Decimal numbers use ten digits (0 to 9) and binary numbers use two (0 and 1). To convert by hand, follow the divide-by-2 steps for whole numbers and multiply by 2 for the part after a decimal point. Negative numbers use two’s complement, and a chart lists common conversions. Also, try our Binary to Decimal Calculator for smooth and precise conversions.
Decimal to Binary Conversion
Turning a decimal number into a binary number means changing it from base 10 to base 2. Computers use the binary system, which is made up of just two digits: 0 and 1. Each place in a binary number represents a power of two, just like each place in a decimal number stands for a power of ten.
To make this switch from decimal to binary, we use division and keep track of remainders. Start with the decimal value you want to convert. Divide that number by 2 and write down the remainder; it will be either 0 or 1.
Keep dividing your answer by 2 until you reach zero and stack the remainder from last to first; that’s your binary number! Take 156 as the calculation example. Each row divides by 2, and the remainder is the next binary digit, starting from the right:
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 2 | 78 | 0 |
| 78 ÷ 2 | 39 | 0 |
| 39 ÷ 2 | 19 | 1 |
| 19 ÷ 2 | 9 | 1 |
| 9 ÷ 2 | 4 | 1 |
| 4 ÷ 2 | 2 | 0 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Read the remainders from the bottom row up: 156 in binary is 10011100. To check it, add the place values of the 1s: 128 + 16 + 8 + 4 = 156.
Converting a Number With a Decimal Point
Convert the whole part with the divide-by-2 method. For the part after the point, multiply by 2 again and again, and write down the digit before the point each time:
- 0.5 × 2 = 1.0, digit 1, nothing left. So 10.5 is 1010.1.
- 0.75 × 2 = 1.5, digit 1; then 0.5 × 2 = 1.0, digit 1. So 129.75 is 10000001.11.
The calculator gives the same answers: 1010.1 for 10.5 and 10000001.11 for 129.75. Try our hexadecimal to octal calculator for the conversion of your desired number.
Importance of Decimal to Binary Conversion
Binary is how computers store numbers, so converting by hand helps you read what a computer is doing.
Applications In Computer Science and Digital Electronics
Computers use the binary numeral system to work with data. Everything inside a computer, from memory to processor instructions, uses this base-2 system of zeros and ones. It’s the language computers speak.
When we convert decimal numbers to binary, we are translating our normal counting numbers into something a computer can understand.
Decimal to Binary Chart
These common numbers are shown with the hexadecimal value the calculator also gives:
| Decimal | Binary | Hex |
|---|---|---|
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 15 | 1111 | F |
| 16 | 10000 | 10 |
| 18 | 10010 | 12 |
| 19 | 10011 | 13 |
| 35 | 100011 | 23 |
| 120 | 1111000 | 78 |
| 154 | 10011010 | 9A |
| 170 | 10101010 | AA |
| 180 | 10110100 | B4 |
| 255 | 11111111 | FF |
| 300 | 100101100 | 12C |
| 400 | 110010000 | 190 |
| 450 | 111000010 | 1C2 |
| 750 | 1011101110 | 2EE |
Understanding Binary Code
Binary code is the language that computers use to understand our commands. It’s made of only two numbers, 0 and 1. Each one or zero is called a “bit.”. Many bits together can tell the computer what to do.
Think of it like a light switch, where ‘0’ means off and ‘1’ means on.
Knowing binary helps us talk to computers better. All your videos, games, and programs start as long strings of these bits. Even letters on your keyboard get turned into binary, so the computer knows what you’re typing! For base 8, use the Decimal to Octal Calculator.
Step-by-Step Guide On How To Use A Decimal to Binary Calculator
- Type your number in the “Enter decimal number” field. Whole numbers, negative numbers and numbers with a decimal point all work.
- Tick “Digit grouping” if you want the binary result split into groups of 8 digits and the hex result into groups of 4.
- Click “Calculate”.
- Read the three results:
- Binary Number: the number in base 2. A negative number gets a minus sign, so -5 shows as -101.
- Binary Signed 2’s Complement: how a computer stores the whole number as a signed binary integer. It uses 16 bits for numbers from -32,768 to 32,767, 32 bits up to 2,147,483,647 and 64 bits up to 9,223,372,036,854,775,807. Larger numbers and numbers with a decimal point show N/A here.
- HEX Number: the number in base 16, for example 9C for 156 and A.8 for 10.5.
FAQs
1. How does the decimal number system differ from binary?
The main difference is that decimal uses ten digits (0 to 9), while binary only uses two digits (0 and 1) as it’s a base-2 numeral system.
2. What about turning decimals with points into binary?
For numbers with decimal points, you convert both sides of the point separately: divide by 2 for the part before the point and multiply by 2 for the part after it. The calculator does this for you, so 10.5 gives 1010.1.
3. How accurate is the decimal to binary calculator?
The calculator uses a big-number library instead of ordinary floating-point math, so long whole numbers convert digit for digit. For example, 70,000 gives 10001000101110000.
4. How do I write a negative number in binary?
Computers use two’s complement. Write the positive number in the full width, flip every bit, then add 1. For -5 in 16 bits: 5 is 0000000000000101, flipped it is 1111111111111010, and adding 1 gives 1111111111111011. That is the value the calculator shows in the Binary Signed 2’s Complement row.
Related Calculators: