PennyPages

Binary Converter

Enter a whole number and get it in binary, octal and hexadecimal — or type a binary number and get the decimal back.

About the Binary Converter

Computers store numbers in binary — base 2, digits 0 and 1 — and programmers read them in hexadecimal (base 16) because each hex digit is exactly four binary digits. 255 in decimal is 11111111 in binary, 377 in octal and FF in hexadecimal. This page converts a decimal number into all three at once, and a binary number back into decimal, so the two directions sit side by side.

Whole numbers only, and the binary box accepts only the digits 0 and 1 — anything else is reported, not silently dropped. Negative numbers convert by their absolute value with the sign carried over. Nothing you enter leaves your browser.

Common questions

What is 255 in binary?

11111111: eight 1 bits, the largest value one byte holds. In hexadecimal it is FF and in octal 377.

How do you convert decimal to binary?

Divide by 2 repeatedly and read the remainders backwards: 13 divided down gives remainders 1, 0, 1, 1, read back as 1101.

What is 1010 in binary in decimal?

10: the bits stand for 8 + 2. Each position is worth twice the one to its right, starting at 1.

Why do programmers use hexadecimal?

One hex digit is exactly four binary digits, so a byte is always two hex digits — FF instead of 11111111 — which is far easier to read and type without error.

Put this tool on your site

Free to embed — your visitors use it without leaving your page.

PennyPages #075 · free forever · same input, same answer, every time