Decimal to Binary Converter

Type a decimal number and get its binary form, plus hex and octal.

Decimal
Hex
Binary
Octal

Click a bit to flip it.

How to convert decimal to binary

Divide the number by 2 repeatedly and note each remainder. Reading the remainders from last to first gives the binary digits.

Worked example

Convert 182: 182 ÷ 2 = 91 r 0; 91 ÷ 2 = 45 r 1; 45 ÷ 2 = 22 r 1; 22 ÷ 2 = 11 r 0; 11 ÷ 2 = 5 r 1; 5 ÷ 2 = 2 r 1; 2 ÷ 2 = 1 r 0; 1 ÷ 2 = 0 r 1. Reading upward: 10110110.

Word size

The result is padded with leading zeros to the chosen word size. A value that does not fit is wrapped around and the page tells you so, which is how a real fixed-width register behaves.

Other conversions