Lecture 23: November 18, 2019


  1. Greetings and felicitations!
    1. No office hour on Friday; an office hour on Tuesday 11am–11:50am
  2. Binary arithmetic; cover addition
  3. Hexadecimal notation (base 16 numbers)
  4. Bit operations: and (&), or (|), xor (^), not (~)
  5. How computers represent numbers and characters
  6. Getting to bits (and debugging using gdb)
    1. How to extract bits
    2. Debug program: forget to make bits printable [bits1.c]
    3. Debug program: get bits but in wrong order [bits2.c]
    4. Got it [bits3.c]


UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: [email protected]
ECS 36A, Programming and Problem Solving
Version of November 18, 2019 at 7:43PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh