Decimal to Binary Converter
Type a decimal number to see it in binary, with the divide-by-2 method shown and every bit displayed.
- Binary · Octal · Decimal · Hex
- Step-by-step working
- Two’s complement
- Big numbers
What is a decimal to binary converter?
Decimal to binary conversion rewrites a base-10 number using only 0 and 1. The standard method divides by 2 repeatedly and records the remainders, which are the bits from right to left. This converter does it instantly, shows each division with your number, displays the bits in a grid you can click to flip, and shows negative numbers in two’s complement for 8, 16, 32 or 64 bits.
How to convert decimal to binary
- Type a decimal number in the Decimal box. Prefixes, spaces and underscores are ignored.
- Read the binary result instantly. Binary, octal, decimal, hex and a custom base update together.
- Scroll to “How to convert decimal to binary” for the step-by-step working with your number.
- For negative numbers, tick Signed and choose a bit width to see the two’s complement form. Then copy any result.
Number base cheat sheet
- Binary (base 2) uses 0–1, octal (base 8) uses 0–7, decimal (base 10) uses 0–9 and hexadecimal (base 16) uses 0–9 then A–F for 10–15.
- One hex digit is exactly 4 bits (a nibble), so hex and binary convert digit by digit: F = 1111, A = 1010.
- Common prefixes: 0b for binary, 0o for octal and 0x for hex. They are optional here.
- In two’s complement, the top bit is the sign: 1111 1111 is −1 as a signed 8-bit number but 255 unsigned.
Why use this decimal to binary converter
- Converts as you typeNo Convert button: edit either side and the other updates immediately.
- Shows the workingStep-by-step place values or repeated division for the conversion you choose, ideal for homework and exams.
- Any size, signed or unsignedArbitrary-precision integers, plus two’s complement for 8, 16, 32 and 64-bit values.
- Private by designEverything is calculated in your browser. Nothing you type is sent to a server or saved.
Common uses
- Learning binary. See the bits and the working together.
- Bit masks. Find which bits a value sets.
- Networking. Convert 192 or 255 to 8-bit binary for subnetting.
- Negative numbers. See how −5 is stored as 11111011.
Related converters: number base converter, hex to decimal, decimal to hex, binary to decimal, hex to binary, binary to hex, binary calculator, hex calculator. Browse all encoding tools.
Example: decimal to binary
45 ÷ 2 = 22 r1 22 ÷ 2 = 11 r0 11 ÷ 2 = 5 r1 5 ÷ 2 = 2 r1 2 ÷ 2 = 1 r0 1 ÷ 2 = 0 r1 Read upwards: 101101
What to expect from the result
Whole numbers only: fractional values such as 0.1 are not converted. Very long numbers are converted exactly, but the step-by-step working is shown only for numbers up to 24 digits.
Decimal to Binary Converter questions
How do you convert decimal to binary?
Divide by 2, write down the remainder (0 or 1), and repeat with the quotient until it is 0. The remainders read from bottom to top are the binary number.
What is 10 in binary?
1010.
What is 255 in binary?
11111111, eight 1 bits. It is the largest number that fits in one byte.
How do I convert a negative number to binary?
Tick Signed and pick a bit width. −5 in 8 bits is 11111011: invert 00000101 and add 1.
Can I convert decimals like 0.5 to binary?
This converter handles whole numbers. 0.5 is 0.1 in binary, but many fractions such as 0.1 have no exact binary form.