Uploaded by zain soomro

quiz1 sol 15569

advertisement
German University in Cairo
Computer Science and Engineering Department
Dr. Cherif Salama
Duration: 30 minutes
CSEN/CSIS 402 Computer Organization & System Programming Quiz1 Solution
Monday, August 4th 2014 Name: Tutorial Number: ID Number: Question 1 (4 Marks) A digital computer has 12 registers of 16 bits each. Only 7 of them can be used as source in transfers through a common data bus; however all of them can be used as destinations in such transfers. The bus is constructed with multiplexers. Question Answer a. What size of multiplexers is needed? 8x1 b. How many selection inputs are there in each multiplexer? 3 c. How many multiplexers are needed in the bus? 16 d. How many wires in total are needed to connect all the registers and multiplexers? 7x16+12*16=304 Question 2 (2 Marks) Given the attached common bus system of the Basic Computer, state whether each of the following statements represents a correct micro-­‐operation (a micro-­‐operation that can take place during a single clock cycle) Micro-­‐operation Correct (Yes/No) a. M[AR] ← AC , AC ← AC -­‐ DR Yes b. AC ← DR Yes c. TR ← M[AR] Yes d. DR ← AC, TR ← AC, PC ← AC (0-­‐11), AR ← AC (0-­‐11) Yes Question 3 (4 Marks) Represent the following conditional control statement by two register transfer statements with control functions and then a draw a single block diagram implementing them. If (x = 1) then (R1 ← R2 + R3) else if (y = 0 or z = 0) then (R1 ← R2 – R3) Solution: The RTL statements are: x: R1 ← R2 + R3 x’ (y’+z’):R1 ← R2 – R3 The block diagram should be showing an adder-­‐subtractor unit (or an ALU) whose inputs are connected to 2 registers R2 and R3. The unit output should be connected to register R1. R1 load signal should be connected to a logic circuit implementing x+x’(y’+z’). The operation select line of the adder-­‐subtractor should be connected to x’ assuming that the adder-­‐subtractor will add when the select line is 0 and will subtract when the select line is 1. Other diagrams might be acceptable too.
Appendix: Common Bus of the Basic Computer 
Download