Como to Converter Number Bases

Passo a Passo Conversão Guia

Learn Conversions

Converting entre number bases é a fundamental skill in computing. Whether you're trabalhando com binary, hexadecimal, octal, ou decimal, o methods são systematic e learnable. Este guia walks through cada conversão com clear steps e examples.

Decimal to Binary

Method: Repeated Division by 2

  1. Divide o number by 2
  2. Record o remainder (0 ou 1)
  3. Divide o quotient by 2
  4. Repeat until quotient é 0
  5. Read remainders bottom-to-top

Exemplo: Converter 156 to Binary

DivisionQuotientRemainder
156 ÷ 2780
78 ÷ 2390
39 ÷ 2191
19 ÷ 291
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201

Reading bottom-to-top: 156₁₀ = 10011100₂

Binary to Decimal

Method: Positional Values

  1. Write position values (powers of 2) under cada digit
  2. Multiply cada digit by its position value
  3. Add todos products

Exemplo: Converter 10011100 to Decimal

Binary digit10011100
Position value1286432168421
Product12800168400

Sum: 128 + 16 + 8 + 4 = 156₁₀

Decimal to Hexadecimal

Method: Repeated Division by 16

  1. Divide by 16, record remainder
  2. Converter remainders 10-15 to A-F
  3. Read remainders bottom-to-top

Exemplo: Converter 748 to Hexadecimal

DivisionQuotientRemainderHex Digit
748 ÷ 164612C
46 ÷ 16214E
2 ÷ 16022

Reading bottom-to-top: 748₁₀ = 2EC₁₆

Hexadecimal to Decimal

Method: Positional Values

  1. Converter A-F to 10-15
  2. Multiply cada digit by its position value (powers of 16)
  3. Add todos products

Exemplo: Converter 2EC to Decimal

  • 2 × 16² = 2 × 256 = 512
  • E (14) × 16¹ = 14 × 16 = 224
  • C (12) × 16⁰ = 12 × 1 = 12

Sum: 512 + 224 + 12 = 748₁₀

Binary to Hexadecimal

Method: Group e Converter

  1. Group binary digits into sets of 4 (from right)
  2. Pad com leading zeros if needed
  3. Converter cada group to its hex digit

Exemplo: Converter 10011100 to Hexadecimal

  • Group: 1001 | 1100
  • 1001 = 9
  • 1100 = C

Result: 10011100₂ = 9C₁₆

Hexadecimal to Binary

Method: Expand Cada Digit

  1. Converter cada hex digit to 4 binary digits
  2. Concatenate o results

Exemplo: Converter A7F to Binary

  • A = 1010
  • 7 = 0111
  • F = 1111

Result: A7F₁₆ = 101001111111₂

Octal Conversions

Binary to Octal

Group binary digits in sets of 3 (from right):

  • 110 101 011 (add leading zeros: 0 110 101 011)
  • 110 = 6, 101 = 5, 011 = 3
  • Result: 653₈

Octal to Binary

Converter cada octal digit to 3 binary digits:

  • 653₈
  • 6 = 110, 5 = 101, 3 = 011
  • Result: 110101011₂

Decimal to Octal

Divide repeatedly by 8, read remainders bottom-to-top.

Qualquer Base to Qualquer Base

General Method

  1. Converter source to decimal (intermediate step)
  2. Converter decimal to target base

Exemplo: Converter 3A₁₆ to Octal

Step 1: Hex to Decimal

  • 3 × 16 + 10 × 1 = 48 + 10 = 58₁₀

Step 2: Decimal to Octal

  • 58 ÷ 8 = 7 remainder 2
  • 7 ÷ 8 = 0 remainder 7
  • Result: 72₈

3A₁₆ = 72₈

Quick Reference Resumo

ConversãoMethod
Decimal → BinaryDivide by 2, read remainders backward
Binary → DecimalSum (digit × power of 2)
Decimal → HexDivide by 16, read remainders backward
Hex → DecimalSum (digit × power of 16)
Binary → HexGroup by 4, converter cada group
Hex → BinaryExpand cada digit to 4 bits
Binary → OctalGroup by 3, converter cada group
Octal → BinaryExpand cada digit to 3 bits

Conclusão

Converting entre number bases follows systematic methods: division for decimal to outro bases, positional multiplication for outro bases to decimal, e grouping shortcuts for binary/hex/octal conversions. Com practice, estes conversions become segundo nature. O binary-hex shortcut (4 bits per hex digit) é particularly valuable in programming e computing contexts.

Artigos Relacionados

Como to Converter Number Bases: Binary, Decimal, Hex Guia | YounitConverter