CST-222 Midterm
(In-class & take-home)
1. Consider the following four words of memory, expressed in hexadecimal:
e8002444
35333333
b5352444
f4232444
First, translate each word into 7-bit ASCII (ignoring sign-bit of each byte).
Treat the "null code" (all zeroes) or any other non-printing code as a blank.
Next, translate each word into a SPARC instruction; write the instructions.
Describe changes to registers or memory, as a result of executing EACH instruction.
Assume that, before execution of these instructions, each register contained
its own register number (i.e. 31 in %r31, 30 in %r30, 29 in %r29, ..., 1 in %r1)
and that each memory location used by this code contained its own memory address.
Also assume that unassigned instruction bits are ignored by the processor.
FOR TAKE-HOME ONLY:
- If each word is treated as an integer, what is its value (approximately)?
- If each word is treated as an float, what is its value (approximately)?
2. Consider the following truth-table:
A | B | C | | F
|
---|
0 | 0 | 0 | | 0
|
0 | 0 | 1 | | 1
|
0 | 1 | 0 | | 1
|
0 | 1 | 1 | | 0
|
1 | 0 | 0 | | 0
|
1 | 0 | 1 | | 0
|
1 | 1 | 0 | | 0
|
1 | 1 | 1 | | 1
|
Write a logic equation that describes F as a function of A, B, and C.
Draw a logic circuit that produces the correct F value, as a function of inputs for A, B, and C.
(You may use logic units, such as AND, OR, XOR, etc. with up to three inputs each.)
FOR TAKE-HOME ONLY:
- Do SOME minimization of your circuit, to reduce the number of components.
- Use DeMorgan's theorem to write an alternative logic function for F(A, B, C).
- (For extra credit, draw a logic function for this "DeMorgan" version, too.)