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.

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.)