Learn Binary & Hexadecimal: Expanded Project Guides

Learn Binary & Hexadecimal: Expanded Project Guides

Master the Native Language of Computers Through Hands-On Projects

This directory contains comprehensive, standalone guides for each project in the Binary & Hexadecimal learning path. Each project file is a deep-dive that gives you everything you need to complete the project while truly understanding the underlying concepts.


Learning Path Overview

Project Title Difficulty Time Estimate Core Concept
P01 Universal Number Base Converter Beginner Weekend Base Conversion Algorithms
P02 Hexadecimal Color Visualizer Beginner A Few Hours Hex in Visual Context (RGB)
P03 Bitwise Logic Calculator Intermediate Weekend Bitwise Operations (&, \|, ^, <<)
P04 File Signature (Magic Number) Identifier Intermediate A Few Hours Binary File I/O, Magic Numbers
P05 Clone of the xxd Hexdump Utility Advanced 1-2 Weeks Low-Level Data Representation

For Complete Beginners:

  1. Start with P01: Universal Number Base Converter - This builds the foundational understanding of how number systems work
  2. Then P02: Hexadecimal Color Visualizer - Immediate visual feedback makes hex feel concrete and useful
  3. Then P03: Bitwise Logic Calculator - Opens the door to understanding low-level systems programming

For Intermediate Learners:

  1. P03: Bitwise Logic Calculator - If you already know hex/binary basics
  2. P04: File Signature Identifier - Real-world application of binary concepts
  3. P05: xxd Hexdump Clone - The ultimate binary mastery project

For Advanced Learners:

  • P05: xxd Hexdump Clone - If you’re already comfortable with file I/O and want to master byte-level manipulation

What Each Project File Contains

Every project guide includes:

  1. Learning Objectives - What you’ll be able to do after completing the project
  2. Deep Theoretical Foundation - Comprehensive explanation of concepts (no external reading required)
  3. Complete Project Specification - Exactly what to build
  4. Real World Outcome - Concrete examples of what your finished project looks like
  5. The Core Question You’re Answering - The fundamental insight the project teaches
  6. Concepts You Must Understand First - Prerequisites with book references
  7. Questions to Guide Your Design - Think through implementation before coding
  8. Thinking Exercise - Build mental models on paper before writing code
  9. The Interview Questions They’ll Ask - Real-world relevance and career preparation
  10. Hints in Layers - Progressive help without spoiling the challenge
  11. Books That Will Help - Specific chapters for deeper understanding

Core Concepts Covered Across All Projects

Concept Projects Description
Positional Notation P01, P02 Understanding that any base uses powers of the base for place values
Binary (Base 2) All The native language of digital electronics
Hexadecimal (Base 16) All Human-readable shorthand for binary (1 hex digit = 4 bits)
Base Conversion Algorithms P01 Division-remainder method for decimal to other bases
RGB Color Model P02 How colors are represented as three 8-bit values
Bitwise Operations P03 AND, OR, XOR, NOT, and shift operations
Bit Masking P03 Isolating, setting, and toggling specific bits
Binary File I/O P04, P05 Reading files as raw bytes vs. text
File Signatures (Magic Numbers) P04 How files self-identify their type
ASCII Character Encoding P05 The mapping between byte values and printable characters
Memory Representation P05 How data is laid out as a sequence of bytes

Essential Reading (Before Starting)

Foundation Books (read relevant chapters before each project):

  1. “Code: The Hidden Language of Computer Hardware and Software” by Charles Petzold
    • Chapters 7-8: Binary numbers
    • Chapters 10-11: Logic gates and bitwise operations
    • Chapter 20: ASCII and character codes
  2. “Computer Systems: A Programmer’s Perspective” by Bryant & O’Hallaron
    • Chapter 2.1: Information Storage (hex, bytes, memory)
    • Chapter 2.1.7-2.1.9: Bit-level operations
  3. “The C Programming Language” by Kernighan & Ritchie
    • Chapter 7: Input and Output (for P04, P05)
    • Chapter 2.9: Bitwise Operators (for P03)

Quick Start

# Navigate to this directory
cd LEARN_BINARY_AND_HEXADECIMAL_DEEP_DIVE

# Open the first project
# On Mac:
open P01-universal-number-base-converter.md

# On Linux:
xdg-open P01-universal-number-base-converter.md

# Or view in terminal:
less P01-universal-number-base-converter.md

Success Metrics

You’ve mastered this learning path when you can:

  • Convert any number between decimal, binary, and hex in your head (for small values)
  • Look at 0xFF5733 and immediately know it’s a coral/orange-red color
  • Explain what flags |= 0x10 does in production code
  • Identify a file’s true type by reading its first few bytes
  • Build a hex dump of any file that matches the output of xxd
  • Answer all the interview questions in each project confidently

Happy Learning!

Each project is designed to give you not just skills, but deep understanding. Take your time, do the thinking exercises, and you’ll gain knowledge that lasts.