Home
Calcolia

Binary, hex and decimal converter

Enter a number in any of the four bases and read it in all of them. Invalid digits are reported rather than silently ignored — many converters read 12G as 12 and never tell you.

Decimal2,026
Hexadecimal
7EA
Binary
11111101010
Octal
3752
Bits needed
11
Bytes needed
2
Bits set to 1
8
Binary in groups of four
0111 1110 1010

The formula

A number in base b with digits dₙ…d₀ has the value Σ dₖ × bᵏ. Converting out of decimal divides repeatedly by the target base and reads the remainders backwards. Each hexadecimal digit is exactly four binary digits.

Worked example

2026 in decimal is 7EA in hexadecimal, 3752 in octal and 11111101010 in binary — 11 bits, read in groups as 0111 1110 1010, which maps digit for digit to 7, E, A.

How to use it

  1. 1Prefixes 0x, 0b and 0o are accepted and ignored, as are spaces and underscores used as separators.
  2. 2Hexadecimal digits may be upper or lower case.
  3. 3Numbers up to 2⁵³, about nine quadrillion, convert exactly; larger values are refused rather than rounded.

Questions people ask

Why is hexadecimal used so much?

Because one hex digit is exactly four bits, so a byte is always two hex digits. It is the compact, human-readable way to write binary — memory addresses, colour codes, MAC addresses.

Does this handle negative numbers or fractions?

No. Negative numbers depend on a word size and a convention such as two’s complement, and fractions rarely convert exactly between bases. Both are left out rather than answered approximately.

Last reviewed: 2026-10-20