You are on page 1of 15

CONFIDENTIAL

�NIVE�ITI
.'

ENDIDIl<{\N
ULTAN IDRIs
_ ... .�_ ___:::::J,),).6L �.I;.J.:..i ��)
SULT,\N IDRIS EDUCAlION UNIVERSITY

UNIVERSITI PENDIDIKAN SULTAN lORIS

F1N'Al EXAMINATION .... c···

SEMESTER 1 SESSION 2015/2016

CODE: MTN3013 COURSE : COMPUTER ARCHITECTURE


AND ORGANIZATION

DATE 2 9 DEC 2015 DURATION : 2 HOURS 30 MINUTES

INSTRUCTIONS

1. This question paper has ONE (1) section: Section A.


2. Section A has SEVEN (7) questions. Answer all questions and provide your answer in the
space given in this question booklet.
3. All candidates are not allowed to use calculator or any electronic devices to perform any
calculation.
4. This booklet will be collected by the invigilator after the exam.

This question paper contains 14 pages including the cover page and
appendices

PROGRAMME: ---------------------

YEAR: ---
CLASS GROUP: ---

REGISTRATION NUMBER: _

IDENTITY CARD NUMBER:

LECTURER: NAZRE BIN ABDUL RASHID

DO NOT OPEN THIS QUESTION PAPER UNTIL YOU ARE TOLD TO DO SO

CONFIDENTIAL
MTN3013: Computer Architecture And Organization 2

SECTION A (100 Marks)


Instruction: Answer all questions. Provide your answer in the space given in this question
booklet.

1. State the representation of number 310 and -210 based on the representation type
given in Table 1.
(Nyatakan perwakilan bagi nombor 310 dan -210 berdasarkan jenis perwakilan yang
diberi di da/am Jadua/ 1)
[6 marks]

Answer I Jawapan :

Representation type
No (Jenis perwakilan) 310 -210

8-bits sign and magnitude


1
binary
8-bits 1 's complement
2
binary
8-bits 2's complement
3
binary

Table 1 / Jadual1

Describe the major problem if the first and second representation used in the
arithmetic calculation for binary numbers.
(Nyatakan masa/ah utama sekiranya jenis perwakilan pertama dan kedua
digunakan da/am pengiraan arithmetik da/am sistem perduaan.)

[4 marks]

Answer I Jawapan :

[See next page


MTN3013: Computer Architecture And Organization 3

2. Answer the following questions based on the motherboard diagram shows in


Figure 1.
(Jawab soalan berikutnya berdasarkan diagram papan induk seperti di dalam
Rajah 1.)

I 2 :I '- 5 6 7

Phonom t
'"- .. ,".-" .. - .. �

OIAM2'fAM3

� ;
; ;
§ 1 8
=:.
iIOr 1 ! !
.
"
...
II. :;;;-
�,
� �

"
;I .� 20.
� 11 li 11 .. E
! �
!
:i,
!
� <i
o 0 !' � �. §
Q 9

.IlSR0ck DDR21066
DDR31600
Dual ChanrH�J

NVIDIA
GeForce
70251
31
nForce 10
30 t>'Ct£;1
G30� II


12
"0
PCiE2 13

Supporr B·Con, CPU


29

r;::�
,-
(:;)'fOS
fto.
1<
P"CJ1

�TTt:1tY
,,:r
2S 15
El
16

27 26 25 24 23 22 z r 20 19 i B f 7

Figure 1 / Rajah 1

i. State the name of component labeled 4, 5, 6, 9, 10 and 28 in the Table 2 below


as

(Tuliskan nama komponen yang dilabelkan sebagai 4, 5, 6, 9, 10 dan 2 di da/am


Jadual2 di bawah.)

[12 marks]
Answer I Jawapan :

Label Number I Component's name I Nama Komponen


Nombor Label
4

10

28

Table 2 / Jadual 2

[See next page


MTN3013: Computer Architecture And Organization 4

ii. State the function of component labeled as 29.


(Nyatakan fungsi komponen berlabel 29.)

[4marksj
Answer I Jawapan :

[See next page


MTN3013: Computer Architecture And Organization 5

3. Complete Figure 2, respectively using the sequence of numbered arrows


3 and 4
to illustrate the processes below (Lengkapkan Rajah 2, 3 dan 4 masing-masing
dengan melukiskan jujukan anak panah bernombor untuk menggambarkan proses
di bawah) :

i. Figure 2 / Rajah 2 : Operate instruction, NOT (Arahan Operasi, NOT)

[4 marks]

Answer I Jawapan :

Register! Q_{;J/1flC

Sext

��
'-//
+
ALU
11111
IR r5:01
Memory Ila.g�a

MAR

MDR

Figure 2 / Rajah 2

[See next page


MTN3013: Computer Architecture And Organization 6

ii. Figure 3/ Rajah 3: Data loading based on 8ase+Offset addressing mode


(Pemuatan data berdasarkan mod pengalamatan 8ase+Offset)

[4 marks]

Answer IJawapan :

Register' Q'illt:f}£

Sext

ALU

IR [5:01 fill e mo ry , !..oJ;w_J.f'tfl

MAR

MDR

Figure 31 Rajah 3

[See next page


MTN3013: Computer Architecture And Organization 6

ii. Figure 3 / Rajah 3 : loading based on 8ase+Offset addressing mode


Data
(Pemuatan data berdasarkan mod pengalamatan Base+Offset)

[4 marks]

Answer IJawapan :

Register ! {2�1i..9£

Sext
'-.,/

"" +
ALU
7
IR [5:01
Memory! lJJ.IlmsuJ

MAR

MDR

Figure 3 / Rajah 3

[See next page


MTN3013: Computer Architecture And Organization 7

iii. Figure 4 / Rajah 4 : Data


storing based on PC Relative addressing mode
(Penyimpanan data berdasarkan mod penga/amatan Re/atif PC)

[4 marks]

Answer IJawapan :

PC

Register f P.§JJL9£

Sext

ALU

IR r5:01
Memory 11JJ..fI&t$!Jl

MAR

MDR

Figure 4 / Rajah 4

[See next page


MTN3013: Computer Architecture And Organization 8

4. Complete Table 3 by stating the type of control instruction and the appropriate
comments according to the instruction at x3009, x300D, x3010 and x3011.

Control Instruction Type and comment for the instruction at x3005 is done for you
as a reference.

(Lengkapkan Jadual 3 dengan menyatakan jenis arahan kawalan dan komen yang
bersesuaian berdasarkan arahan pada x3009, x300D, x3010 dan x3011.

Jenis arahan kawalan dan komen untuk arahan pada x3005 telah disediakan untuk
anda sebagai rujukan.)

[16 marks]

Answer 1 Jawapan :

Control Instruction Type.


Instruction I Arahan
I Jenis Arahan Kawalan

x3005 0000010000000010 Conditional branch If Z, go to x3008

x3009 0000101000000001

x300D 0000111111110110

x3010 1111000000100001

x3011 1111000000100101

Table 31 Jadual3

[See next page


MTN3013: Computer Architecture And Organization 9

5. The code asin Table 4 is supposed to add two (2) unsigned integers in R2 and R4.
R5 has been set as a counter. Your task is to trace the content of R2, R4 and R5

by completing Table 5. The starting content of R4 is 8 and R5 is 2.


(Keratan kod di da/am Jadua/ 4 sepatutnya menja/ankan operasi tam bah dua (2)
integer tidak bertanda di da/am R2 dan R4. R5 te/ah ditetapkan sebagai
pembi/ang. Tugas anda ada/ah dengan menjejaki kandungan bagi R2, R4 dan R5
dengan me/engkapkan Jadua/ 5. Kandungan permu/aan bagi R4 ia/ah 8 dan R5
ia/ah 2.)

Address I Alamat Instruction I Arahan


x3200 0101010010100000

x3201 0001010010000100

x3202 0001101101111111

x3203 0000011111111101

x3204 1111000000100101

Table 3/ Jadua/3

[12 marks]

Answer I Jawapan :

PC R2 R4 R5

x3200 a 8 2

Table 4 / Jadual 4

[See next page


MTN3013: Computer Architecture And Organization 10

6. Imagine yourself as programming language. Your task is to


the assembler of LC-3
assemble the code in Figure produce the symbol table for the code by
5 and
completing Table 6 and convert the code into machine language by completing
Table 7. (8ayangkan anda sebagai penghimpun bahasa pengaturcaraan LC-3.
Tugas anda adalah menghimpun kod di dalam Rajah 4 dan menghasilkan jadual
simbol untuk kod tersebut dengan melengkapkan Jadual 4 dan menterjemah baris
kod yang ke dalam bahasa mesin dengan melengkapkan Jadual 5.)

; Program to multiply a number by the constant 6

.ORIG x3051
LD R1, SIX
LD R2, NUMBER
AND R3, R3, #0 ; Clear R3. It will
; contain the product.
; The inner loop

AGAIN ADD R3, R3, R2


ADD R1, R1, #-1 ; R1 keeps track of
BRpAGAIN ; the iteration.

HALT

NUMBER .BLKW 2
SIX .FILL x0006

.END

Figure 5 / Rajah 5

[28 marks]

Answer I Jawapan :

Symbol Address

Table 6 / Jadual 6

[See next page


MTN3013: Computer Architecture And Organization 11

Statement / Pernyataan Machine Language / Bahasa Mesin

Table 7 / Jadua/7

[See next page


MTN3013: Computer Architecture And Organization 12

7. Show the final content of KBSR, KBDR, DSR and DDR when a 'Komputer' word is
typed and displayed on the monitor by completing Table 8.
(Tunjukkan kandungan terakhir bagi KBSR, KBDR, DSR dan DDR apabi/a
perkataan 'Komputer' ditaip dan dipaparkan pada monitor dengan me/engkapkan
Jadua/B.)

[8 marks]

Answer I Jawapan :

[15] [14] [13] [12] [11] [10] [9] [8] [7] [6] [5] [4] [3] [2] [1] [0]

KBSR

KBDR

DSR

DDR

Table 8 / Jadua/ B

END OF QUESTIONS
MTN3013: Computer Architecture And Organization 13

APPENDIX 1: ASCII Table

00 nul 10 die 20 sp 30 0 40 @ 50 P 60 70 P

01 soh 11 dc1 21 ! 31 1 41 A 51 Q 61 a 71 q
"
02 stx 12 dc2 22 32 2 42 B 52 R 62 b 72 r

03 etx 13 dc3 23 # 33 3 43 C 53 S 63 c 73 5

04 eot 14 dc4 24 $ 34 4 44 D 54 T 64 d 74 t

05 enq 15 nak 25 % 35 5 45 E 55 U 65 e 75 u

06 ack 16 syn 26 & 36 6 46 F 56 V 66 f 76 v

I
07 bel 17 etb 27 37 7 47 G 57 W 67 9 77 w

08 bs 18 can 28 ( 38 8 48 H 58 X 68 h 78 x

09 ht 19 em 29 ) 39 9 49 I 59 y 69 I 79 Y
*
Oa nl 1a sub 2a 3a 4a J 5a Z 6a j 7a z

Ob vt 1b esc 2b + 3b , 4b K 5b [ 6b k 7b {
Oc np 1c fs 2c , 3c < 4c L 5c \ 6c I 7c I
Od cr 1d gs 2d -
3d =
4d M 5d ] 6d m 7d }
A
Oe so 1e rs 2e 3e > 4e N 5e 6e n 7e -

Of si 1f us 2f I 3f ? 4f 0 5f -
6f 0 7f del
MTN3013: Computer Architecture And Organization 14

APPENDIX 2: ISA TABLE

'15 14 1�� 12 1'1 10 9 8 1 6 5 4 ::� 2 1 0

ADD+
I : OC?1: I :DR: :6R� I o:� I :SR�
0

ADD+
: (+1: I :DR: :SRI 11 : i�m� :
AND"
: 01,�1: I : DR: :SR� I o� I :SFf� 0

ANDt'
: 0+1: I :DR: :SR� I; : i�m� :
B'R
: O:?J: I I zip ::: �ctf8�t< : :
n

JMP
: 11�J: I : i))): �a�IR I : :0(l�:0< :
JSR
: �.J:
01
11 I : : : I P�'ffs�t11 : : : :
JSRR
: 01�J : 0
I 0:0 I �a��R I : :OOC�:»): :
+
LD
: ('J:1O : : DR: I : I : �1)ff8��< : :
LDI+
: 10:10 : :DR: I : :1 : ��Gff8�t9 : : :
LDR+
+
: 01:10 : : DR: �8�R I : :'�f �et6: :
LEA
: 11:10 : : DR: : I : �Ofi$�� : : :
NOT+
: <1i�J1 : :DR: : SR: I : :1<11:11< :
BET
: 11�.� : >:�: :11 < I : :00(::0< :
BTl
: 11�:� : ::::C�I�OOO:CIi)�.:(1 : : : :
ST
: 0):11 : : SR: I : : : F'�l)fi$��9 : : :
STJ
: 10:11 : : SRI I : : : ��OffB�� : : :
STR
: ;11 :
01
: SRI I �8�IR I : >ff�et< :
TRAP
: 11:11 : : 00:00: I : : 1�ap.��� : :
re save d
: �1 :
11
:::: I : : : : : : I

You might also like