Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 3: Octal & Hexadecimal Number Systems

Lesson 24 of 34 in the free Fundamentals of IT & Computers notes on Siksha Sarovar, written by Rohit Jangra.

Unit III — Octal & Hexadecimal Number Systems

Octal (Base-8) and Hexadecimal (Base-16) are compact representations of binary numbers. They are used extensively in computing because they map cleanly to groups of binary digits.

---

Octal Number System (Base-8)

  • Uses digits: 0, 1, 2, 3, 4, 5, 6, 7
  • Each octal digit represents exactly 3 binary bits.
  • Used in Unix/Linux file permissions (e.g., chmod 755).

Octal ↔ Binary mapping:

OctalBinary
0000
1001
2010
3011
4100
5101
6110
7111

Octal to Decimal: (347)₈ = 3×8² + 4×8¹ + 7×8⁰ = 192 + 32 + 7 = (231)₁₀

Decimal to Octal (repeated division by 8): Convert (231)₁₀:

  • 231 ÷ 8 = 28 R 7
  • 28 ÷ 8 = 3 R 4
  • 3 ÷ 8 = 0 R 3
  • Read bottom to top: (231)₁₀ = (347)₈

---

Hexadecimal Number System (Base-16)

  • Uses digits: 0–9 and A–F (where A=10, B=11, C=12, D=13, E=14, F=15).
  • Each hex digit represents exactly 4 binary bits (one nibble).
  • Used extensively for memory addresses, colour codes (#FF5733), and byte values.

Hex ↔ Decimal mapping:

HexDecimalBinary
0–90–90000–1001
A101010
B111011
C121100
D131101
E141110
F151111

Hexadecimal to Decimal: (2AF)₁₆ = 2×16² + 10×16¹ + 15×16⁰ = 512 + 160 + 15 = (687)₁₀

Decimal to Hexadecimal (repeated division by 16): Convert (687)₁₀:

  • 687 ÷ 16 = 42 R 15 (F)
  • 42 ÷ 16 = 2 R 10 (A)
  • 2 ÷ 16 = 0 R 2
  • Read bottom to top: (687)₁₀ = (2AF)₁₆

---

Binary ↔ Octal (Group 3 bits)

Binary to Octal: Group bits into sets of 3 from right; convert each group. (110101011)₂ → 110 | 101 | 011 → 6 | 5 | 3 = (653)₈

Octal to Binary: Replace each octal digit with its 3-bit equivalent. (725)₈ → 7=111 | 2=010 | 5=101 = (111010101)₂

---

Binary ↔ Hexadecimal (Group 4 bits)

Binary to Hex: Group bits into sets of 4 from right; convert each group. (1011 1101)₂ → 1011=B | 1101=D = (BD)₁₆

Hex to Binary: Replace each hex digit with its 4-bit equivalent. (3F)₁₆ → 3=0011 | F=1111 = (00111111)₂

Key Takeaway: Octal and hexadecimal are shorthand for binary — each octal digit = 3 bits, each hex digit = 4 bits. Hexadecimal is ubiquitous in computing (memory addresses, colour codes, debugging). Master the grouping technique for instant binary↔octal and binary↔hex conversions.