This account already has saved data. Do you want to keep this device's data, or use your account's saved data?
Appearance
Unit System
Temperature Format
Time Format
Number Base
Decimal
Other Bases
Decimal
Other Bases
Your Recent & Past Results
Restored a past calculation.
Compare Calculations
Side-by-Side Comparison
A comparison of your calculations' results.
Downloads
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.
Rewriting the Same Value Across Binary, Octal, Decimal, and Hex
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.
Key Factors to Consider
A single byte (8 bits) can represent exactly 256 distinct values — 0 through 255 in
decimal, or 00 through FF in hexadecimal. This is exactly why 255/FF is such a common
reference value in computing — it’s the maximum value a single byte can hold, which shows up
everywhere from RGB color channels (0-255 per channel) to networking and file formats.
Octal was historically more common than it is today, largely due to older computer word
sizes. Octal (base 8) maps cleanly onto groups of 3 binary digits, which suited computers built
around word sizes divisible by 3 bits — modern computing has largely shifted to hexadecimal
(which maps onto groups of 4 bits) since most modern hardware uses word sizes divisible by 4 and
8, though octal still appears in specific contexts like Unix file permission notation (e.g.
chmod 755).
A common programmer’s error is confusing a number’s base from context alone. The digits “10”
mean very different values depending on base — 10 in decimal, 2 in binary, 8 in octal, 16 in
hexadecimal — which is why programming languages typically require an explicit prefix (like 0x
for hex or 0b for binary) to remove any ambiguity about which base is intended.
Any whole number can theoretically be represented in ANY base, not just these four. Binary,
octal, decimal, and hexadecimal are simply the four bases with the most common real-world use in
computing and everyday math — the same positional-notation principle this calculator uses
extends to any base, like base 3, base 20, or base 60 (the basis of how time and angles are
traditionally divided).
Common Mistakes
Reading a mixed-base number without a prefix as decimal by default. “10” means ten in
decimal but only two in binary — always check (or state) which base a number is written in
before doing arithmetic with it.
Assuming leading zeros change the value. Just like in decimal, 0011 in binary is the same
value as 11 — leading zeros are only meaningful for fixed-width formatting (like showing a
full byte), not for the number’s actual value.
Forgetting that hex digits above 9 use letters, not two-digit numbers. Hexadecimal 10 is
written as A, not 10 — writing 10 in hex actually means sixteen in decimal, a common
source of off-by-a-lot errors.
Trying to convert a negative number directly. As the FAQ above notes, negative binary/hex
values depend on a chosen bit-width and two’s-complement convention — there’s no single
unambiguous conversion the way there is for non-negative whole numbers.
Useful to Know
Working with network addresses instead of arbitrary numbers? IP Subnet Calculator
applies this same binary/decimal relationship specifically to IPv4 addresses.
Need very large or very small decimal numbers in a compact form? Scientific Notation Calculator
handles that kind of conversion instead.
Curious about a much older positional-adjacent numbering system? Roman Numeral Calculator
converts to and from Roman numerals, which use a completely different (non-positional)
approach.
Reescribir el Mismo Valor en Binario, Octal, Decimal y Hexadecimal
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.
Factores Clave a Considerar
Un solo byte (8 bits) puede representar exactamente 256 valores distintos — de 0 a 255 en
decimal, o de 00 a FF en hexadecimal. Esta es exactamente la razón por la que 255/FF es un
valor de referencia tan común en informática — es el valor máximo que puede contener un solo
byte, algo que aparece en todas partes, desde los canales de color RGB (0-255 por canal) hasta
redes y formatos de archivo.
El octal era históricamente más común de lo que es hoy, en gran parte debido a los tamaños de
palabra de computadoras más antiguas. El octal (base 8) se mapea limpiamente sobre grupos de 3
dígitos binarios, lo cual convenía a computadoras construidas con tamaños de palabra divisibles
entre 3 bits — la informática moderna se ha desplazado en gran medida hacia el hexadecimal (que
se mapea sobre grupos de 4 bits) ya que la mayoría del hardware moderno usa tamaños de palabra
divisibles entre 4 y 8, aunque el octal todavía aparece en contextos específicos como la notación
de permisos de archivos de Unix (por ejemplo, chmod 755).
Un error común de programador es confundir la base de un número solo por el contexto. Los
dígitos “10” significan valores muy distintos según la base — 10 en decimal, 2 en binario, 8 en
octal, 16 en hexadecimal — razón por la cual los lenguajes de programación típicamente requieren
un prefijo explícito (como 0x para hexadecimal o 0b para binario) para eliminar cualquier
ambigüedad sobre qué base se pretende.
Cualquier número entero puede teóricamente representarse en CUALQUIER base, no solo estas
cuatro. Binario, octal, decimal y hexadecimal son simplemente las cuatro bases con el uso más
común en el mundo real de la informática y las matemáticas cotidianas — el mismo principio de
notación posicional que usa esta calculadora se extiende a cualquier base, como base 3, base 20,
o base 60 (la base de cómo se dividen tradicionalmente el tiempo y los ángulos).
Errores Comunes
Leer un número de base mixta sin prefijo como decimal por defecto. “10” significa diez en
decimal pero solo dos en binario — siempre verifica (o indica) en qué base está escrito un
número antes de hacer cálculos con él.
Suponer que los ceros a la izquierda cambian el valor. Igual que en decimal, 0011 en
binario es el mismo valor que 11 — los ceros a la izquierda solo son relevantes para el
formateo de ancho fijo (como mostrar un byte completo), no para el valor real del número.
Olvidar que los dígitos hexadecimales mayores que 9 usan letras, no números de dos dígitos.
El diez hexadecimal se escribe como A, no 10 — escribir 10 en hexadecimal en realidad
significa dieciséis en decimal, una fuente común de errores considerables.
Intentar convertir un número negativo directamente. Como señalan las preguntas frecuentes
anteriores, los valores binarios/hexadecimales negativos dependen de un ancho de bits elegido y
una convención de complemento a dos — no hay una única conversión inequívoca como la que existe
para números enteros no negativos.
Útil Saber
¿Trabajas con direcciones de red en lugar de números arbitrarios? Calculadora de Subred IP
aplica esta misma relación binario/decimal específicamente a las direcciones IPv4.
¿Necesitas números decimales muy grandes o muy pequeños en una forma compacta?
Calculadora de Notación Científica maneja ese tipo de conversión en su lugar.
¿Tienes curiosidad por un sistema de numeración posicional mucho más antiguo?
Calculadora de Números Romanos convierte hacia y desde números romanos, que usan un
enfoque completamente distinto (no posicional).
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.