15-122 Principles of Imperative Computation
Lecture 3: Ints

  • Reading: 03-ints.pdf
  • Code: none
  • Concepts:
    • Binary representation of natural numbers
    • Modular arithmetic
    • Algorithm for binary addition
    • Two's complement representation
    • Mathematical laws on integers and modular integers
    • Comparisons on two's complement representation
    • Hexadecimal notation
    • (recitation)
    • Bit-wise operations on ints: and, or, xor (exclusive or)
    • (beginning of next lecture)
    • Shifting and masking
    • (beginning of next lectures
  • Previous lecture: Contracts
  • Next lecture: Arrays

[ Home | Schedule | Assignments | Resources ]
[ Piazza | Blackboard ]

fp@cs
Frank Pfenning