Lecture 23: November 18, 2019
Greetings and felicitations!
No office hour on Friday; an office hour on Tuesday 11am–11:50am
Binary arithmetic; cover addition
Hexadecimal notation (base 16 numbers)
Bit operations: and (&), or (|), xor (^), not (~)
How computers represent numbers and characters
Getting to bits (and debugging using
gdb
)
How to extract bits
Debug program: forget to make bits printable [
bits1.c
]
Debug program: get bits but in wrong order [
bits2.c
]
Got it [
bits3.c
]
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
mabishop@ucdavis.edu
ECS 36A, Programming and Problem Solving
Version of November 18, 2019 at 7:43PM
You can also obtain a PDF version of this.