Title: CSE 351 23au / LS5 Integers II

Q: Arithmetic on fixed-width binary numbers is performed using ___
A: Modular arithmetic

Q: In modular arithmetic, what gets dropped?
A: All bits of the result that are past the fixed-width

Q: When the result of a calculation can’t be represented in the current encoding scheme and leads to the use of an incorrect value, it is known as ___
A: Arithmetic overflow

Q: With ___, some effects are:
- Changes in bit-widths (e.g., short to int),
- Changes in interpretations (e.g., int to unsigned int, long int to char*)
- Full changes in representations (e.g., int to float).
A: type casting

Q: Given a type mismatch but a well-defined conversion between the two types,  compilers will perform an ___
A: implicit cast

Q: The programmer can force a different interpretation or representation of an expression with an ___
A: explicit cast

Q: When extending unsigned values, padding extra zeros on the left to keep the value unchanged is known as ___
A: zero extension

Q: When extending signed values, padding copies of the most significant bit on the left to keep the sign and value unchanged is known as ___
A: sign extension

Q: What shift will fill zeros on the right? (e.g. x << n)
A: Left shift

Q: For unsigned integers, what shift will fill zeros on the left? (e.g. x >> n , x is unsigned)
A: Logical right shfit

Q: For signed numbers, what shift will fill with copies of the most significant bit on the left? (e.g. x >> n , x is signed)
A: Arithmetic right shift

Q: ___ can be interpreted as multiplying (left shift) or dividing (right shift)
A: Shifting arithmetic