Binary, Decimal, y Hexadecimal

Understanding Number Bases

Compare Number Systems

Computers speak binary, humans think in decimal, y programmers often usar hexadecimal as un/una convenient middle ground. Understanding estos three numero sistemas es fundamental un/una computing, programming, y digital literacy.

Decimal (Base-10)

El/La sistema humans usar cada dia.

How It Works

  • 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Each position es un/una power of 10
  • Position valores: ...1000, 100, 10, 1

Ejemplo: 3,452

  • 3 × 1000 = 3000
  • 4 × 100 = 400
  • 5 × 10 = 50
  • 2 × 1 = 2
  • Total = 3452

Why Base-10?

Likely desde counting on 10 fingers. Deeply ingrained in human culture y language.

Binary (Base-2)

El/La language of computers.

How It Works

  • 2 symbols: 0 y 1
  • Each position es un/una power of 2
  • Position valores: ...128, 64, 32, 16, 8, 4, 2, 1

Ejemplo: 10110101 (binary)

Position1286432168421
Digit10110101
Valor128032160401

Total = 128 + 32 + 16 + 4 + 1 = 181 (decimal)

Why Computers Use Binary

  • Electronic switches have two states: on/off
  • Voltaje levels: high/low
  • Simple logic circuits
  • Error-resistant (clear distinction entre states)

Hexadecimal (Base-16)

Un/Una human-friendly manera un/una represent binary datos.

How It Works

  • 16 symbols: 0-9 y Un/Una-F
  • Un/Una=10, B=11, C=12, D=13, E=14, F=15
  • Each position es un/una power of 16
  • Position valores: ...4096, 256, 16, 1

Ejemplo: 2Un/Una9F (hexadecimal)

  • 2 × 4096 = 8192
  • Un/Una (10) × 256 = 2560
  • 9 × 16 = 144
  • F (15) × 1 = 15
  • Total = 10,911 (decimal)

Why Hexadecimal?

  • Each hex digit = exactamente 4 binary digits
  • Much shorter than binary (FF vs 11111111)
  • Easy un/una convertir un/una/desde binary
  • Common in programming, colors, memory addresses

Comparison Table

DecimalBinaryHexadecimal
000000
100011
501015
101010Un/Una
151111F
161000010
100110010064
25511111111FF
256100000000100
100011111010003E8

When Each System Is Used

Decimal

  • Everyday counting y arithmetic
  • Financial calculos
  • User interfaces (que humans ver)

Binary

  • Computer hardware operations
  • Network addresses (IPv4, subnet masks)
  • Bitwise operations in programming
  • Understanding computer fundamentals

Hexadecimal

  • Color codes (web design): #FF5733
  • Memory addresses in debugging
  • MAC addresses: 00:1Un/Una:2B:3C:4D:5E
  • Character encodings (Unicode)
  • Cryptography y hashes

Notation Conventions

Como identify cual base un/una numero es in:

Prefixes

  • 0b o 0B: Binary (0b1010)
  • 0x o 0X: Hexadecimal (0xFF)
  • 0o o 0: Octal (0o17 o 017)
  • No prefix: Usually decimal

Suffixes

  • : Binary (1010₂)
  • ₁₀: Decimal (10₁₀)
  • ₁₆ o h: Hexadecimal (FFh o FF₁₆)

Common Values un/una Memorize

ConceptDecimalBinaryHex
One byte (max)25511111111FF
One byte + 1256100000000100
Two bytes (max)65,53516 onesFFFF
Powers of 21,2,4,8,16,32,64,128,256,512,10241,10,100...1,2,4,8,10,20,40,80,100...

Conclusion

Understanding binary, decimal, y hexadecimal es esencial for anyone working with computers. Decimal es natural for humans, binary es natural for computers, y hexadecimal bridges el/la two—making binary datos readable while remaining compact. El/La key insight es eso estos son solo diferente maneras of representing el/la mismo valores, cada with su own advantages: decimal for human calculo, binary for hardware efficiency, y hexadecimal for programmer convenience.

Articulos relacionados

Binary, Decimal, Hexadecimal: Understanding Number Bases | YounitConverter