Skip to content

Conversor Binário, Hexadecimal e Decimal

Conversor Binário, Hexadecimal e Decimal gratuito - converta e compare opções instantaneamente. Sem cadastro.

Carregando calculadora

Preparando Conversor Binário Hexadecimal Decimal...

Revisão e Metodologia

Cada calculadora utiliza fórmulas padrão da indústria, validadas por fontes oficiais e revisadas por um profissional financeiro certificado. Todos os cálculos são executados de forma privada no seu navegador.

Última revisão:

Revisado por:

Escrito por:

Como Usar o Conversor Binário Hexadecimal Decimal

  1. 1. Insira seus valores - preencha os campos de entrada com seus números.
  2. 2. Ajuste as configurações - use os controles deslizantes e seletores para personalizar seu cálculo.
  3. 3. Veja os resultados instantaneamente - os cálculos são atualizados em tempo real conforme você altera os valores.
  4. 4. Compare cenários - ajuste os valores para ver como as mudanças afetam seus resultados.
  5. 5. Compartilhe ou imprima - copie o link, compartilhe os resultados ou imprima-os para seus registros.

Binary Hex Decimal Converter

Convert numbers between binary (base 2), decimal (base 10), and hexadecimal (base 16) instantly. Enter a value in any base and the other two fields update automatically. This converter is used daily by software developers reading memory addresses, web designers decoding color codes, electronics engineers analyzing register values, and computer science students working through coursework.

How Number Base Conversion Works

Every number system assigns a place value to each digit position based on the base (radix). Binary multiplies each digit by powers of 2, decimal by powers of 10, and hexadecimal by powers of 16.

Decimal to binary — divide repeatedly by 2, collect remainders bottom-up. Example: 45 / 2 = 22 r1, 22 / 2 = 11 r0, 11 / 2 = 5 r1, 5 / 2 = 2 r1, 2 / 2 = 1 r0, 1 / 2 = 0 r1. Reading remainders upward gives 101101. Check: 32 + 8 + 4 + 1 = 45. Correct.

Binary to hex — group binary digits into sets of 4 from the right, then replace each group with its hex digit. Example: 101101 becomes 0010 1101 = 2D in hex.

Hex to decimal — multiply each digit by its power of 16 and sum. Example: 2D = (2 x 16) + (13 x 1) = 32 + 13 = 45.

Worked Examples

Example 1 — Web color code. A designer sees the CSS color #1A8FE3. Split into pairs: 1A = 26 red, 8F = 143 green, E3 = 227 blue. This is a medium-bright blue used in many UI button palettes.

Example 2 — Unix file permissions. chmod 755 sets permissions. 7 in binary is 111 (read + write + execute), 5 is 101 (read + execute). Knowing binary makes it immediately clear which permission bits are set without memorizing tables.

Example 3 — Debugging a register value. A microcontroller datasheet says a status register holds 0xC4. In binary that is 11000100. Bits 7, 6, and 2 are set. If those bits correspond to “overflow,” “carry,” and “interrupt pending,” the engineer can read the state directly from the bit pattern.

Reference Table

DecimalBinaryHexadecimalNotes
000000Zero in all bases
101010AFirst letter digit in hex
151111FMaximum single hex digit
161000010One hex “column” turns over
421010102AFits in 6 bits
12711111117FMax signed 8-bit value
1281000000080Min unsigned 8-bit high half
25511111111FFMax 1-byte (8-bit) value
256100000000100First 9-bit number
655351111111111111111FFFFMax 16-bit (2-byte) value

When to Use

  • Reading or writing CSS/HTML color codes such as #FF5733 where each pair is one byte of RGB data.
  • Debugging memory dumps, hex editors, or binary files where addresses are shown in hex.
  • Setting or reading bitfields in hardware registers, network packets, or file format headers.
  • Working through computer science coursework on number systems, bitwise operations, or data representation.
  • Understanding chmod permissions in Unix, IPv4 subnet masks, or MAC address notation.

Common Mistakes

  1. Confusing hex letters with decimal. The hex digit A equals 10, not 1. Writing #FF2A00 and reading the 2A as “two-A” rather than 42 leads to wrong color math. Always translate letter digits to their decimal values first.
  2. Forgetting leading zeros in nibble grouping. When converting binary to hex, pad the leftmost group to 4 bits. The binary number 1011 must be grouped as 1011 (4 bits = B), not split incorrectly as 10 11.
  3. Mixing up base prefixes. In code, 0xFF means hex 255, 0b11111111 means binary 255, and bare 255 means decimal 255. Dropping or misreading the prefix causes silent bugs that are hard to trace.
  4. Assuming “0x” is part of the value. The 0x prefix is a notation convention, not digits. The number 0x1F is 31 in decimal — the 0x contributes nothing to the numeric value.

Quick Reference Benchmarks

BitsBytesMax DecimalMax HexCommon Use
40.5 (nibble)15FSingle hex digit
81255FFOne byte, RGB channel, ASCII
16265,535FFFFPort numbers, Unicode BMP
24316,777,215FFFFFF24-bit color (16M colors)
3244,294,967,295FFFFFFFFIPv4 address, 32-bit int

Tips

  1. Memorize the 16 hex-to-binary digit mappings: 0=0000 through 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. These 16 patterns cover everything.
  2. Powers of 2 appear as a 1 followed by zeros in binary (2=10, 4=100, 8=1000, 16=10000). They are useful sanity-check anchors when doing manual conversions.
  3. If a decimal number ends in an even digit, its binary form ends in 0. If it ends in an odd digit, its binary form ends in 1. Use this to quickly spot-check your work.
  4. One hex digit equals exactly one nibble (4 bits), and two hex digits equal exactly one byte (8 bits). A 6-digit hex color like #3A7FC1 is always exactly 3 bytes of RGB data.
  5. Most programming languages accept hex literals directly: 0xFF in C, Python, and JavaScript all equal 255. Use hex literals instead of decimal when working with bitmasks — they are easier to read and less error-prone.
  6. To convert a large binary number to hex without a calculator, split from the right into groups of 4, convert each group independently, and concatenate the hex digits. This works for any length.

Perguntas Frequentes

O que são bases numéricas e por que usamos bases diferentes?
Uma base numérica (ou raiz) determina quantos dígitos são usados para representar valores. Decimal (base 10) usa dígitos de 0-9 e é o padrão para contagem cotidiana. Binário (base 2) usa apenas 0 e 1, que mapeia diretamente para os estados ligado/desligado dos circuitos eletrônicos -- tornando-o a linguagem nativa dos computadores. Hexadecimal (base 16) usa 0-9 e A-F, e é uma forma compacta de representar dados binários, já que cada dígito hexadecimal corresponde a exatamente 4 dígitos binários.
Como se conta em binário?
A contagem binária segue o mesmo princípio do decimal, mas com apenas dois dígitos (0 e 1). Quando um dígito chega a 1, o próximo incremento é transferido para a esquerda: 0, 1, 10, 11, 100, 101, 110, 111, 1000. Cada posição representa uma potência de 2 da direita para a esquerda: 1, 2, 4, 8, 16, 32 e assim por diante. Para converter binário para decimal, multiplique cada dígito pelo seu valor posicional e some os resultados. Por exemplo, 1011 em binário = (1x8) + (0x4) + (1x2) + (1x1) = 11 em decimal.
Como os números hexadecimais são usados para cores na web?
Cores na web são representadas como valores hexadecimais de 6 dígitos precedidos por um símbolo de cerquilha, como #FF5733. Os seis dígitos são divididos em três pares: os dois primeiros representam a intensidade do vermelho (FF = 255), os dois do meio representam o verde (57 = 87) e os dois últimos representam o azul (33 = 51). Cada par varia de 00 (0, sem intensidade) a FF (255, intensidade máxima). Então #000000 é preto, #FFFFFF é branco, #FF0000 é vermelho puro e #00FF00 é verde puro.
Como converter manualmente entre binário, decimal e hexadecimal?
Para converter decimal para binário, divida repetidamente por 2 e registre os restos de baixo para cima. Por exemplo, 25: 25/2=12 r1, 12/2=6 r0, 6/2=3 r0, 3/2=1 r1, 1/2=0 r1, então 25 = 11001. Para converter binário para hexadecimal, agrupe os dígitos binários em conjuntos de 4 a partir da direita e converta cada grupo: 11001 = 0001 1001 = 19 em hex. Para converter hex para decimal, multiplique cada dígito pela sua potência de 16: 19 hex = (1x16) + (9x1) = 25 decimal.
Onde binário e hexadecimal são usados em programação?
Binário é usado para operações bit a bit (AND, OR, XOR, NOT), permissões de arquivo (chmod 755 no Unix = 111 101 101 em binário) e para entender como os dados são armazenados na memória no nível do bit. Hexadecimal é usado para endereços de memória (0x7FFF), códigos de cor (#FF5733), endereços MAC (00:1A:2B:3C:4D:5E), caracteres Unicode (U+0041 = 'A') e leitura de dumps hexadecimais de arquivos binários. A maioria das linguagens de programação suporta literais hex (0xFF) e literais binários (0b11111111) diretamente no código.
Calculadoras