OA STUDY GUIDE, PRACTICE QUESTIONS &
CORRECT ANSWERS, BINARY ARITHMETIC,
PIPELINING, CPU PERFORMANCE & PARALLELISM
LATEST STUDY GUIDE GRADED A+
Computer Architecture: Characteristics of Computer
Architecture.
1. Match each term on the left to its corresponding definition on the right.
a. MIMD → e asynchronously and independently.
b. SPMD → h f. The same instruction applied to a single
data stream.
c. SIMD → g
g. The same instruction applied to multiple
d. SISD → f data streams.
h. A technique to achieve parallelism. Tasks
e. A technique to achieve parallelism. A are split up and run simultaneously on
number of processors function multiple processors with different input in
order to obtain results faster.
2. Given the following 8-bit integer binary variables:
X1 = 10011111
X2 = 01010101
What is the value in X3 after the following command:
ADDS X3, X2, X1
a. 01001010
b. Overflow or Carry Flag
c. ✅ 11110100
d. 11110010
3. Given the following 8-bit integer binary variables:
X1 = 01010101
X2 = 10011111
What is the value in X3 after the following command:
SUBS X3, X2, X1
, a. 011110100
b. 011110010
c. ✅ 01001010
d. Overflow or Carry Flag
4. Given the following 8-bit integer binary variables:
X1 = 10011111
X2 = 11010101
What is the value in X3 after the following command:
ADDS X3, X2, X1
a. ✅ Overflow or Carry Flag
b. 011110100
c. 01001010
d. 01111001
This answer is technically incorrect, but it modeled after the preassessment (and presumably
the assessment). The correct answer should be: X3 = 01110100. See:
https://www.youtube.com/watch?v=JmpQ79h_0eA and C952: Pipelining and binary problems
(around 17:00) where I discuss #9 on the pre-assessment and the difference between Overload
and Carry.
When there isn’t enough space, the extra bit value is lost and the resulting value is stored. As
the lost bit might be a problem, flags are set according to the rules below. In the problem above,
we get
X3 = 01110100
and both an “Overflow” and “Carry” flag are set (the ‘S’ in ADDS turns flags setting on). If meant
to be signed, then two negatives summed to a positive; hence the “Overflow” flag. If meant to be
unsigned, then two positives summed to a smaller positive; hence the “Carry” flag. The flags are
set, so the coder can deal with it. Whether they need to or not, depends on what they are trying
to do.
The difficulty here is that #9 on the pre-assessment incorrectly uses the informal (non-CS)
definition of Overflow. So I’m uncertain to what degree Overflow and Carry are assessed. It’s
best to be prepared for both.