💻

Bits, Bytes and Binary Part Two: 1 + 1 = 10

Jun 25, 2024

Bits, Bytes and Binary Part Two: 1 + 1 = 10

Introduction

  • Review of binary numbers and their significance in computing.
  • Emphasis that this video involves some math, which is not typical for this course.
  • Importance of understanding binary numbers in various contexts in computing.

Counting in Decimal

  • Start with 0, add 1 to get 1.
  • Continue adding 1 to each new number.
  • Key point: Decimal system has 10 digits (0-9).
  • Example: 8 + 1 = 9, 9 + 1 = 10 (carry the 1).
  • Illustration continues up to 100, showing the concept of carrying over digits.

Counting in Binary

  • Start with 0 + 1 = 1 (same as decimal).
  • Key point: Binary system has 2 digits (0 and 1).
  • Example: 1 + 1 = 10 (carry the 1).
  • Continue adding 1, showing carrying over just like in decimal but within the binary system.
  • List of first 8 binary numbers (0 to 7 in decimal).
  • List of first 16 binary numbers (0 to 15 in decimal) and their decimal equivalents.

Distinguishing Number Systems

  • Subscripts to indicate base (e.g., 6_10 and 110_2).
  • Importance in disambiguating number systems.
  • Notation helps especially with other number systems like octal (base 8) and hexadecimal (base 16).

Conversion Between Binary and Decimal

  • Example with decimal: 1891 (explained with powers of 10).
  • Example with binary: 1101 (explained with powers of 2).
  • Highlight: Conversion understanding is helpful but not required for exams/quizzes.

Storing Information in Bits

  • One bit: 2 combinations (0 or 1) - often represents true/false.
  • Two bits: 4 combinations (00, 01, 10, 11).
  • Three bits: 8 combinations.
  • Four bits: 16 combinations.
  • Use cases: Provinces of Canada in 4 bits vs. U.S. States needing more than 4 bits.

Formula for Combinations

  • Formula: 2^n for n bits.
  • Table showing combinations for 1 to 10 bits.
  • Highlight: Bits can represent numbers, positive/negative values, or other data (e.g., dorms at Stanford).

Powers of Two in Real Life

  • Common memory sizes (64MB, 128MB, 256MB) follow powers of two.
  • Shopping for technology (like iPhones): memory sizes are powers of two.
  • Explanation: Internally, computers use the binary system (base 2).

Kilobytes, Megabytes, and Beyond

  • Distinction between powers of 10 (thousands, millions) and powers of 2.
  • Kilobytes, megabytes, gigabytes, terabytes: base 2 equivalents.
  • Higher orders: Peta, Exa, Zeta, Yotta.
  • Note on communication speeds often using base 10 (electrical engineering).

Conclusion

  • Next lecture: What goes wrong with binary numbers.