Вы находитесь на странице: 1из 9

CONFIDENTIAL CS/OCT 2010/ITT590

UNIVERSITI TEKNOLOGI MARA


FINAL EXAMINATION

COURSE COMPUTER SYSTEMS ARCHITECTURE


COURSE CODE ITT590
EXAMINATION OCTOBER 2010
TIME 3 HOURS

INSTRUCTIONS TO CANDIDATES

1. This question paper consists of eight (8) questions.

2. Answer ALL questions in the Answer Booklet. Start eagh answer on a new page.

3. Do not bring any material into the examination room unless permission is given by the
invigilator.

4. Please check to make sure that this examination pack consists of:

i) the Question Paper


ii) an Answer Booklet - provided by the Faculty

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO


This examination paper consists of 9 printed pages
© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL
CONFIDENTIAL 2 CS/OCT 2010/ITT590

QUESTION 1

a) Define the following terms

i) source code compatibility


(2 marks)

ii) upward compatibility


(2 marks)

QUESTION 2

a) Convert the following numbers

i) 241 5 in decimal
(2 marks)

ii) 4A7n in radix 10


(2 marks)

iii) 2122 3 inhex

(2 marks)

b) Represent the following numbers to a fixed-point 8 digits with 2 decimal points.

i) 90329.10399 10
(1 mark)
ii) 184.5 10
(1 mark)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 3 CS/OCT2010/ITT590

QUESTION 3

a) Give ONE (1) reason for the important of range and precision issues in computer
architecture.
(2 marks)

b) Give TWO (2) reasons that support the development of the IEEE 754 Floating Point
Standard.
(2 marks)

c) Using IEEE 754 Floating Point Standard single precision format:

i) Determine the exponent bit pattern for a denormalised number.


(1 mark)

ii) Determine the fraction bit pattern for a denormalised number.

(1 mark)

d) Convert the following numbers according to the IEEE 754 Floating Point Standard.

i) -1883.775 x 2"106 to IEEE 754 single precision format


(3 marks)
ii) 135.535 to IEEE 754 double precision format.

(2 marks)

e) Determine the numerical value for the following IEEE 754 bit pattern.

i) 10110000100110000000000000000000
(2 marks)
ii) 10000000000001000000000000000000
(2 marks)

iii) 0111111111101000000000000000000000000000000000000000000000000000
(2 marks)

iv) 0100000010110101010000000000000000000000000000000000000000000000
(2 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 4 CS/OCT2010/ITT590

QUESTION 4

a) Determine the number of bits required to represent integers in the range -512 to 511 in
two's complement notation.
(1 mark)

b) Determine the number of integers can be uniquely represented by Residue 5794.


(1 mark)

c) Subtract 210 - 510 using a 4 bit two's complement number circle.

(2 marks)

d) Use BCD representation to perform the following arithmetic operation:-

i) Subtract 27310 - 9810.


(2 marks)
ii) Add175i 0 + 22510.

(2 marks)

e) Use Booth Algorithm representation to perform the following arithmetic operation :-

i) Use Booth Algorithm to multiply 8710 x 4210.


(3 marks)
ii) Use Modified Booth Algorithm to multiply 8710 x 4210.
(3 marks)

f) Use Residue Arithmetic 5794 representation to perform the following arithmetic


operation:-

i) Use the Residue 5794 arithmetic to multiply 2410 x 2710.


(2 marks)

ii) Use the Residue 5794 arithmetic to subtract 6710 -17 10 .


(2 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 5 CS/OCT 2010/ITT590

QUESTION 5

a) Design a 1 bit full adder.


(5 marks)

b) The block diagram shown below is a 1 bit Arithmetic Logic Circuit (ALU).

A
1 bit ALU Y
B

i i
U_ U-

Design the ALU logic circuit for performing the following functions.
FiF0 Function
00 NOT (A,B)
01 OR (A,B)
10 AND (A,B)
11 XOR (A,B)
(4 marks)

c) Using a serial multiplier, show the process of serial multiplication for 0111 2 x 11002.
(3 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 6 CS/OCT2010/ITT590

QUESTION 6

Given the function X = AB + CD(A - C)

a) Write the program to compute the function using the address instruction types below. Do
not modify the values of A, B, C, and D. You may use X or any temporary location T to
store intermediate results.

i) 3 address instructions
(3 marks)

ii) 2 address instructions


(3 marks)

iii) 1 address instruction


(3 marks)

b) Given the time to fetch, decode and execute each instruction as follows:

Instruction type Time per instruction


3 address instruction 100ns
2 address instruction 70ns
1 address instruction 50ns

Calculate the time to compute the above function.


(3 marks)

c) Compute the memory traffic


(Assume opcode = 1 byte, address and data = 2 bytes)
(3 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 7 CS/OCT2010/ITT590

QUESTION 7

The diagram shown below is a small microarchitecture. The datapath consists of 6 general
purpose registers: RO, R1, R2, R3, R4 and R5. R5 is set to +1 which cannot be change.

FiF0 Function
00 NOR(A,B)
01 A
10 ADD(A,B)
11 AND(A,B)

Output Enables

A-bus B-bus

A-bus EMius

—+
Six
Write 1 4 bit register
Enables 2

C-bus

V
I Z-

a) Write a control sequence to compute RO <- (Rl + R2)(R3 7 l)i?4.

Write Enables A-Bus Enables B-Bus Enables ALU


0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 F1 F0

(5 marks)

b) Design the microarchitecture circuit.


(4 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL 8 CS/OCT 2010/ITT590

QUESTION 8

Below is an ARC assembly program to compute x which is a function of A, B and c.

.begin
.org 1600
mula: Id [A] , %rl
Id [B], %r2
Id [C], %r3
orncc %rl, %rl, %r4
orncc %r2, %r2, %r5
andcc %r3, %r3, %r6
andcc %r4, %r2, %r7
andcc %r7, %r3, %r7
andcc %rl, %r5, %r8
andcc %r8, %r3, %r8
andcc %rl, %r2, %r9
andcc %r9, %r3, %r9
addcc %r7, %r8, %rl0
adcc %r9, %rl0, %rll
st %rll, [X]
tamat: halt

A: 1
B: 1
C: 0
X: 0

a) Write the machine code for the following instructions:


(Refer to ARC Instruction formats on page 9)

i) Id [B] , %r2
(3 marks)

ii) a n d c c %r7, % r 3 , %r7


(3 marks)

iii) st %rii, [x]


(3 marks)

b) Write the expression for x.


(2 marks)

c) Generate a symbol table for the program.


(3 marks)

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL


CONFIDENTIAL CS/OCT2010/ITT590

Sethi Format 0 0 rd op2 imm22

Branch Format 0 0 0 cond op2 disp22

Call Format 0 1 disp30

I
Arithmetic 1 0 rd op3 rs1 0 0 0 0 0 0 0 0 0 rs2
Format 1 0 rd op3 rs1 1 simm13

I
Memory 1 1 rd op3 rs1 0 0 0 0 0 0 0 0 0 rs2
Format 1 1 rd op3 rs1 1 simm13

op2 Inst op3 Inst cond branch


0 1 0 branch 0 0 0 0 0 0 Id 0 0 0 1 be
1 0 0 sethi 0 0 0 10 0 St 0 10 1 bcs
0 10 0 0 0 addcc 0 1 1 0 bneg
0 10 0 0 1 andcc 0 1 1 1 bvs
0 10 0 10 orcc 10 0 0 ba
0 10 1 1 0 omcc
10 0 1 1 0 srl
1 1 1 0 0 0 jmpl

END OF QUESTION PAPER

© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL

Вам также может понравиться