Conversor de Base Numérica

O Conversor de Base Numérica converte um valor entre as quatro bases numéricas mais comuns em programação: binária (base 2), octal (base 8), decimal (base 10) e hexadecimal (base 16). Útil para entender bitmasks, permissões Unix em octal, cores em HEX, e qualquer trabalho com sistemas de baixo nível.

Como usar

  1. 1

    Escolha a base de origem (2, 8, 10 ou 16).

  2. 2

    Informe o número.

  3. 3

    Veja a conversão para todas as outras bases automaticamente.

Perguntas frequentes

Ratings & Reviews

Rate this tool

Sign in to rate and review this tool.

Loading reviews…

What Number Bases Are

The decimal number system (base 10) uses 10 digits (0-9). Other systems use different counts: binary (base 2) uses 2 digits, octal (base 8) uses 8, hexadecimal (base 16) uses 16 digits including A-F. The same value can be written in any base — only the notation differs. 255 in decimal is FF in hexadecimal, 377 in octal, and 11111111 in binary.

The Microapp Number Base Converter converts any number between bases 2-36 instantly. Enter a value in one base, see equivalents in every common base (binary, octal, decimal, hex) plus any custom base from 2 to 36.

How to Use It

  1. Enter a number in any base field (binary, octal, decimal, or hex).
  2. The other base fields update instantly.
  3. Use the custom base selector to convert to/from any base from 2 to 36.
  4. Click "Copy" to put a value on your clipboard.
Worked example. Decimal 255:
• Binary: 11111111 (8 ones — that's why 255 = 2⁸-1 = max for an unsigned byte)
• Octal: 377
• Hex: FF
All four are the same number, just written in different positional systems.

Where Each Base Shows Up

BaseWhere it's used
Binary (2)Inside the CPU — every value is binary at the metal. Bit-level programming, networking flags, low-level protocol design.
Octal (8)Unix file permissions (chmod 755). C-language string escapes (\077). Largely historical otherwise.
Decimal (10)Everyday use, financial systems, science, anywhere humans count.
Hexadecimal (16)Programmer-friendly compact binary representation. Memory addresses, color codes (#FF6600), CSS, character codes (U+1F600 for emoji 😀), debugging hex dumps.
Base 36Compact alphanumeric IDs (uses 0-9 + A-Z). Some URL shorteners, base36-encoded random IDs.

How Base Conversion Works

The principle is the same for any base: each digit's position represents a power of the base. In decimal, 234 means 2×100 + 3×10 + 4×1 (powers of 10: 10², 10¹, 10⁰). In binary, 1011 means 1×8 + 0×4 + 1×2 + 1×1 (powers of 2: 2³, 2², 2¹, 2⁰) = 11 in decimal. In hex, FF means 15×16 + 15×1 (powers of 16: 16¹, 16⁰) = 255 in decimal.

To convert to a new base, divide by the base, take the remainder as the rightmost digit, divide the quotient by the base again, and so on until the quotient is zero. To convert from a base to decimal, multiply each digit by the appropriate power of the base and sum.

Hex and Binary — Why They're Friends

Each hex digit corresponds to exactly 4 binary digits (since 2⁴ = 16). This makes hex a compact, human-readable shorthand for binary — much more readable than long binary strings, but the bit-level meaning is preserved.

HexBinaryDecimal
000000
100011
501015
A101010
F111115
FF11111111255
1F40001 1111 0100500

Programmers reading a hex dump can mentally translate to binary one nibble at a time — 3A reads as 0011 1010 directly, no math required.

Common Pitfalls

Forgetting the prefix. Different languages use different prefixes to indicate base: 0b1010 (binary, modern languages), 0o755 or 0755 (octal, varies), 0x1F (hex, near-universal). Pasting a value without prefix can be ambiguous. The Microapp converter doesn't require prefixes — pick the field for the base you mean.

Negative numbers and two's complement. Negative numbers in binary use "two's complement" representation, which depends on the bit width (8-bit -1 ≠ 16-bit -1 in raw bits). The Microapp converter handles positive integers only — for negative values, use a programming language with explicit width.

Floating-point in non-decimal bases. Decimals like 0.1 don't translate cleanly to binary (it becomes a repeating binary fraction). This is the source of the famous 0.1 + 0.2 ≠ 0.3 in JavaScript. The converter handles integers; floating-point conversion requires more nuance.

Related Tools

For converting binary specifically to and from decimal, the Binary to Decimal tool is more focused. To convert HEX colors (a specialized hex use case), use the Hex to RGB converter. For converting text characters to their binary representation, see Text to Binary.