Conversor de Bases Numéricas

Binário, octal, decimal, hexadecimal e deslocamento de bits

Required Parameters

bits

Waiting for input data...

Ad Placement
Sidebar Adaptive Ad Slot

Quick Answer

Hex maps to binary: each hex digit = 4 bits. FF = 11111111 = 255. Common values: 0xFF = 255, 0xFFFF = 65535, 0xFFFFFFFF = 4.29 billion. Convert binary to decimal by summing powers of 2. Two's complement: invert bits and add 1 for negative numbers.

Documentation

Calculadora de Conversao de Bases Numericas

Converta numeros entre binario, octal, decimal e hexadecimal.

Design Notes

Number base conversion is fundamental for embedded programming, memory addressing, register configuration, and protocol analysis. Hex is the standard for displaying binary data because it aligns perfectly with 4-bit nibble boundaries.

Common Mistakes

  • 1

    Mixing up 0x (hex prefix) with 0 (decimal) — 0x10 = 16, not 10.

  • 2

    Forgetting two's complement for signed integers — 0xFF is 255 unsigned but -1 signed (8-bit).

  • 3

    Using octal (0o prefix) accidentally in JavaScript by adding a leading zero to what should be a decimal number.

Knowledge Base

O que é FF em hexadecimal?

FF = 255 decimal = 11111111 binário. Máximo de um byte de 8 bits.

Como converter binário para decimal?

Cada dígito da direita é potência de 2: 2⁰=1, 2¹=2, 2²=4... 10110 = 22.

Por que programadores usam hexadecimal?

Hex mapeia perfeitamente para binário (1 hex = 4 bits).

O que é complemento de dois?

Para negativos: inverter bits e somar 1. 8 bits: -1 = 0xFF. Faixa: -128 a +127.

Como funcionam deslocamentos de bits?

Esquerda N = multiplicar por 2^N. Direita N = dividir por 2^N.