Bytes and Integers
# Lecture 02 Bits, Bytes and Integers
# Representing information as bits
# Everything is bits
# Encoding Byte Values
# Bit-level manipulations
# Boolean Algebra
# Bit-Level Operations in C
# Logic Operations in C
# Shift Operations
Undefined Behavior
- shift amount < 0 or >= word size
# Integers
# Representation: unsigned and signed
# Encoding integers
# Numeric Ranges
# Values for Different Word Sizes
# Mapping Between Signed & Unsigned
Keep bit representations and reinterpret
# Sign Extension
# Truncation
# Unsigned Addition
# Integer Addition
# Multiplication
# Power-of-2 Multiply with Shift
编辑 (opens new window)