15-122 Principles of Imperative Computation
Lecture 2: Ints

  • Reading: 02-ints.pdf
  • Code: binplus.c0
  • Concepts:
    • Binary representation of natural numbers
    • Modular arithmetic
    • Two's complement representation
    • Hexadecimal notation
    • Bit-wise operations on ints: and, or, xor (exclusive or)
    • Algorithm for binary addition
    • RGB color model
    • ARGB representation of pixels in ints
    • Shifting and masking
  • Previous lecture: Overview
  • Next lecture: Binary Search

[ Home | Schedule | Assignments | Resources ]
[ Blackboard | academic.cs.15-122 ]

fp@cs
Frank Pfenning