About the Decimal to Binary
The classic method is repeated division by 2. Divide the number by 2, write down the remainder (0 or 1), and repeat with the quotient until it reaches 0. The remainders read from the last to the first are the binary digits. For 214: 214÷2 = 107 r0, 107÷2 = 53 r1, 53÷2 = 26 r1, 26÷2 = 13 r0, 13÷2 = 6 r1, 6÷2 = 3 r0, 3÷2 = 1 r1, 1÷2 = 0 r1 — read upward, 11010110. The working table below the result does this for your number.
A second method subtracts the largest power of two that fits: 214 − 128 = 86, 86 − 64 = 22, 22 − 16 = 6, 6 − 4 = 2, 2 − 2 = 0, so bits 128, 64, 16, 4 and 2 are set. Both give the same answer; division is easier to do mechanically, subtraction is faster if you know the powers of two.
The result is grouped in nibbles (4 bits) and padded to whole bytes, which makes it easy to read against a hex dump — each nibble is one hex digit. A negative input gets a minus sign in front of the magnitude; to see how a CPU actually stores a negative integer (two's complement at a fixed width) use the number base converter. Numbers of any size are converted exactly with BigInt.
How to use it
- Type a whole decimal number (commas and spaces are ignored).
- Read the binary result and its grouped byte view.
- Follow the repeated-division table to see where each bit comes from.
- Copy the result, or use the octal and hex values below it.