Binary, Hexadecimal, and Decimal Converter

Easily convert between binary (base 2), hexadecimal (base 16) and decimal (base 10) number systems. Essential tool for programmers and students.

Binary/Hex/Decimal Convert

Input type:
🔢 Binary (Base 2)
---
Uses only 0 and 1
🔟 Decimal (Base 10)
---
Standard number system
🔠 Hexadecimal (Base 16)
---
Uses 0-9 and A-F

💡 Number Systems:
Binary: Base 2, used in computing (0, 1)
Decimal: Base 10, system we use daily (0-9)
Hexadecimal: Base 16, common in programming (0-9, A-F)

📖 Examples:
• Binary 1111 = Decimal 15 = Hex F
• Binary 10000 = Decimal 16 = Hex 10
• Binary 11111111 = Decimal 255 = Hex FF

Number Systems

Binary (Base 2)

Uses only: 0, 1

Language of computers

Decimal (Base 10)

Uses: 0-9

System we use in everyday life

Hexadecimal (Base 16)

Uses: 0-9, A-F

Compact and readable for programming

Conversion Examples

Decimal Binary Hexadecimal
0 0000 0
10 1010 A
15 1111 F
16 10000 10
255 11111111 FF

Why Hexadecimal?

Hexadecimal is popular in programming because each hex digit represents exactly 4 binary bits. This makes conversion easy and representation more compact.

Use Cases

Bits and Bytes

  • 1 Bit: 0 or 1
  • 4 Bits (Nibble): 1 hexadecimal digit (0-F)
  • 8 Bits (Byte): 2 hexadecimal digits (00-FF) = 0-255 decimal
  • 16 Bits (Word): 4 hex digits = 0-65535 decimal
  • 32 Bits (Double Word): 8 hex digits = ~4 billion

Common Operations

Quick Conversion

To convert binary → hex: group by 4 bits
1111 0101 → F5

Cores RGB

#RRGGBB em hex
#FF00FF = 255,0,255 = magenta

Common Prefixes

  • 0b or 0B - Binary in Python/JS: 0b1010 = 10
  • 0x or 0X - Hexadecimal: 0xFF = 255
  • # - HTML/CSS Colors: #FF0000 = red
  • U+ - Unicode: U+00A9 = ©

💡 Programmer's Tip: Get familiar with hex! Powers of 2 in hex are easy: 0x10=16, 0x100=256, 0x1000=4096. Use hex for bit masks.