About the Decimal to Binary Converter
The Decimal to Binary Converter turns a whole number into base 2 and shows how many bits and bytes it needs, along with the hexadecimal and octal equivalents. Negative numbers are shown with a minus sign rather than in two’s complement.
How to use the Decimal to Binary Converter
- Enter a whole number.
- Read the binary result and the extra details.
Example
42
42 = 101010 in binary: 6 bits, which fits in 1 byte. Hex 0x2A, octal 0o52.
Frequently asked questions
How does the conversion work?
Repeatedly divide by 2 and read the remainders from bottom to top.
Are decimals (fractions) supported?
No. The fractional part is ignored.
How are negative numbers shown?
With a minus sign, for example −101. Computers usually store negatives in two’s complement, which depends on the bit width.