🍋
Menu
How-To Beginner 1 min read 178 words

How to Convert Between Number Systems (Binary, Hex, Octal)

Developers regularly work with binary, hexadecimal, and octal numbers. Learn conversion techniques and when each number system is used.

Key Takeaways

  • Computers operate in binary (base-2), but humans find large binary numbers unreadable.
  • Hex uses digits 0-9 and letters A-F.
  • Octal (base-8) uses digits 0-7.
  • It's essential for understanding bitwise operations, subnet masks, file permissions (chmod 755 = 111 101 101), and hardware-level data representation.

Number Systems in Computing

Computers operate in binary (base-2), but humans find large binary numbers unreadable. Hexadecimal (base-16) provides a compact representation where each hex digit maps to exactly 4 binary bits.

Hexadecimal

Hex uses digits 0-9 and letters A-F. It's used for memory addresses, color codes (#FF6B35), MAC addresses (00:1A:2B:3C:4D:5E), and byte-level data representation. Two hex digits represent one byte (0x00 to 0xFF = 0 to 255).

Binary

Binary uses only 0 and 1. It's essential for understanding bitwise operations, subnet masks, file permissions (chmod 755 = 111 101 101), and hardware-level data representation.

Octal

Octal (base-8) uses digits 0-7. Its primary modern use is Unix file permissions where each digit represents read (4), write (2), and execute (1) for owner, group, and others.

Conversion Table

Decimal Binary Hex Octal
10 1010 A 12
255 11111111 FF 377
42 101010 2A 52
100 1100100 64 144

أدوات ذات صلة

صيغ ذات صلة

أدلة ذات صلة