Answer:
b) Simplify this formula (using any appropriate technique).
Answer:
c) Draw a logic gate diagram for your simplified formula.
Answer:
The clock is not shown above; it is wired into the input of each flip flop.
Using four-bit numbers, show how the addition of 3+(-2) in the signed representation is the same as adding 3+14 in the unsigned representation. What is the value of the result?
Answer:
3 is 0011
-2 is 1110
14 is also 1110
0011 +1110 ---- 0001(probably best to show the carries too)
The result is 1. This is the correct value for 3+(-2); it represents an overflow of 3+14, where the result is congruent to the right answer mod 16 (24).
Write machine-language (assembly language) instructions to assign z to be (x-y)2, if x is in register R0, y is in register R1, and z is in register R2. (To square an integer, you can just multiply it by itself, of course.)
Answer:
MOV R0, R2 SUB R1, R2 MUL R2, R2