Number Bases
Binary, octal, hexadecimal, and decimal. Converting between bases. Why binary is fundamental to computing.
Lessons
1. Intro
Why number bases matter
2. What Is a Number Base?
Core concept
3. Decimal System Review
Base-10 familiar ground
4. Binary Fundamentals
Base-2 system
5. Why Computers Use Binary
Physical limitations
6. Binary to Decimal Conversion
Reading binary numbers
7. Quiz: Binary Reading
Knowledge check
8. Decimal to Binary Conversion
Writing binary numbers
9. Powers of Two Reference
Memorize these
10. Hexadecimal Fundamentals
Base-16 system
11. Hexadecimal Digit Reference
Hex to decimal mapping
12. Hex in Programming
Real-world usage
13. Binary to Hex Conversion
Grouping by fours
14. Quiz: Hex Conversion
Knowledge check
15. Octal System
Base-8 basics
16. Converting Between Any Bases
Universal method
17. Binary Addition
Arithmetic in base-2
18. Binary Subtraction
Borrowing in base-2
19. Representing Negative Numbers
Sign magnitude approach
20. Two's Complement
Standard for negatives
21. Reading Two's Complement
Decoding negative values
22. Quiz: Two's Complement
Knowledge check
23. Problem - Number of 1 Bits
LeetCode 191
24. Count Bits - Checking Each Bit
Shift and mask
25. Count Bits - Brian Kernighan Trick
Flip rightmost 1
26. Count Bits - Implementation
Pseudocode solution
27. Problem - Reverse Bits
LeetCode 190
28. Reverse Bits - Building the Result
Shift and accumulate
29. Reverse Bits - Implementation
Pseudocode solution
30. Bitwise Operations Reference
AND OR XOR NOT
31. Quiz: Bitwise Operations
Knowledge check
32. Common Bit Tricks
Useful patterns
33. Problem - Power of Two
LeetCode 231
34. Power of Two - The Bit Pattern
Single 1 bit
35. Power of Two - Implementation
One-line check
36. Problem - Add Binary
LeetCode 67
37. Add Binary - Digit-by-Digit Addition
Managing carry
38. Add Binary - Implementation
Pseudocode solution
39. Base Conversion in Code
Built-in functions
40. Lessons from Number Bases
summary
41. Section Recap
What we learned