# 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:

11010112 = ?10			F3A516 = ?10
1740038 = ?10			AB3D16 = ?10
101101112 = ?10			71568 = ?10

Perform the following number system conversions:

11010112 = ?16			1740038 = ?2
101101112 = ?16			F3A516 = ?2
110110012 = ?8			AB3D16 = ?2

Perform the following number system conversions:

12510 = ?2			348910 = ?8
20910 = ?2			971410 = ?8
13210 = ?2			2385110 = ?16
5719010 = ?16			143510 = ?8
6511310 = ?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

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?

```