# Sample Exercises for Quiz 1

Overview of compilation process & C Runtime Environment

Powers of 2, von Neumann Machine, Flynn Classifications, Typical Instruction Cycle

Overview of Stack, Accumulator, Load/Store Architectures

ARM Data Types, Byte Ordering (Big-Endian vs. Little-Endian)

###
Number Conversions, Signed Integer Representations, and Binary Addition

How does one decorate a 31-year-old's birthday cake with only five candles?
Perform the following number system conversions:
1101011_{2} = ?_{10} F3A5_{16} = ?_{10}
174003_{8} = ?_{10} AB3D_{16} = ?_{10}
10110111_{2} = ?_{10} 7156_{8} = ?_{10}
Perform the following number system conversions:
1101011_{2} = ?_{16} 174003_{8} = ?_{2}
10110111_{2} = ?_{16} F3A5_{16} = ?_{2}
11011001_{2} = ?_{8} AB3D_{16} = ?_{2}
Perform the following number system conversions:
125_{10} = ?_{2} 3489_{10} = ?_{8}
209_{10} = ?_{2} 9714_{10} = ?_{8}
132_{10} = ?_{2} 23851_{10} = ?_{16}
57190_{10} = ?_{16} 1435_{10} = ?_{8}
65113_{10} = ?_{16}
Add the following pairs of binary numbers, showing all carries:
110101 101110 11011101 1110010
+11001 +100101 +1100011 +1101101
------ ------ -------- -------
Give the 8-bit signed-magnitude, one's-complement, two's-complement, and
BCD (however many bits) representation for each of the following decimal numbers:
18 115 79 -49 -3 -100
Fill in the CC (Condition Code) flags for the following 8-bit
two's-complement additions [**NZCV** bits]:
11010110 10111001 01011101 00100110
+10101001 +11010110 +00100001 +01011010
--------- --------- --------- ---------
What do each of the Condition Code bits mean?
What does it mean if the bit is a 0?
What does it mean if the bit is a 1?
Why do HFC, IBM, and TWA come before Haag, Iacocca, and Taaffe,
respectively, in the phone book?