Includes your inputs and results for this calculation, plus any additional calculations you've compared.
Share & Print
The link includes your inputs and results, so anyone who opens it sees this exact calculation.
How This Calculator Works
A number base (or “radix”) is how many distinct digits a numeral system uses before it carries
over to the next place value — decimal uses 10 (0–9), binary uses 2 (0–1), octal uses 8 (0–7),
and hexadecimal uses 16 (0–9 then A–F). Enter a whole number in any of these four bases, and this
calculator shows the same value written in all four at once.
Binary is how computers represent every value internally (each digit is one “bit”); hexadecimal is
a common shorthand for binary in programming (each hex digit stands in for exactly 4 binary digits,
so it’s far more compact to read and type); octal shows up in older Unix file permissions and some
low-level contexts. Decimal is just the everyday base-10 system.
The Formula
Every positional numeral system works the same way: each digit is multiplied by the base raised to
its place-value power, then summed:
Value=i=0∑ndi×Basei
where di is the digit at position i (counting from 0 at the rightmost digit). Converting
to a different base repeatedly divides the decimal value by the new base, recording each
remainder — the reverse of the sum above.
Worked Example
Converting binary 11111111 to its other three bases:
Read right to left, each 1 contributes its place value: 27+26+25+24+23+22+21+20=255.
Decimal: 255.
Octal: dividing 255 by 8 repeatedly (255 ÷ 8 = 31 r7, 31 ÷ 8 = 3 r7, 3 ÷ 8 = 0 r3) reads the
remainders bottom-to-top as 377.
Hexadecimal: 255 ÷ 16 = 15 r15, 15 ÷ 16 = 0 r15 — both remainders are 15 (F in hex), giving
FF.
Cómo funciona esta calculadora
Una base numérica (o “raíz”) es la cantidad de dígitos distintos que utiliza un sistema numeral
antes de pasar al siguiente valor posicional — el decimal usa 10 (0–9), el binario usa 2 (0–1),
el octal usa 8 (0–7) y el hexadecimal usa 16 (0–9 y luego A–F). Ingresa un número entero en
cualquiera de estas cuatro bases, y esta calculadora muestra el mismo valor escrito en las cuatro
a la vez.
El binario es la forma en que las computadoras representan internamente cada valor (cada dígito es
un “bit”); el hexadecimal es una abreviatura común del binario en programación (cada dígito
hexadecimal representa exactamente 4 dígitos binarios, por lo que es mucho más compacto de leer y
escribir); el octal aparece en los permisos de archivos de sistemas Unix más antiguos y en algunos
contextos de bajo nivel. El decimal es simplemente el sistema cotidiano de base 10.
La fórmula
Todo sistema numeral posicional funciona de la misma manera: cada dígito se multiplica por la base
elevada a la potencia de su valor posicional, y luego se suman:
Valor=i=0∑ndi×Basei
donde di es el dígito en la posición i (contando desde 0 en el dígito más a la derecha).
Convertir a una base diferente divide repetidamente el valor decimal entre la nueva base,
registrando cada residuo — el proceso inverso de la suma anterior.
Ejemplo resuelto
Convirtiendo el binario 11111111 a sus otras tres bases:
Leyendo de derecha a izquierda, cada 1 aporta su valor posicional: 27+26+25+24+23+22+21+20=255.
Decimal: 255.
Octal: dividiendo 255 entre 8 repetidamente (255 ÷ 8 = 31 r7, 31 ÷ 8 = 3 r7, 3 ÷ 8 = 0 r3), los
residuos se leen de abajo hacia arriba como 377.
Hexadecimal: 255 ÷ 16 = 15 r15, 15 ÷ 16 = 0 r15 — ambos residuos son 15 (F en hexadecimal), lo
que da FF.
A number base is how many distinct digits a numeral system uses before carrying over to the next place value. Decimal (base 10) uses digits 0-9; binary (base 2) uses only 0 and 1; octal (base 8) uses 0-7; hexadecimal (base 16) uses 0-9 then the letters A-F to represent 10-15.
Why do computers use binary?
Computer hardware is built from switches that are only ever fully on or fully off, which maps naturally onto binary's two digits (1 and 0). Every value a computer stores or processes is ultimately represented in binary, even though programmers usually work with more human-readable bases like decimal or hexadecimal.
Why is hexadecimal used instead of binary in programming?
Each hexadecimal digit represents exactly 4 binary digits (bits), so a hex number is about a quarter of the length of the equivalent binary number while representing the exact same value — much easier for a person to read, type, and compare than a long string of 1s and 0s.
Can this calculator handle negative numbers?
No — representing a negative number in binary or hexadecimal requires choosing a fixed bit-width and a two's-complement convention, which varies by context (8-bit, 16-bit, 32-bit, etc.). This calculator is scoped to non-negative whole numbers, where the conversion is unambiguous.
We use cookies for analytics and ads to help support this free site. You can accept all, or decline and we'll only use what's needed for the site to work.