You are on page 1of 3

Midterm Exam KE26604 Computer Architecture & Microprocessors

Semester 2/ Session 2014-15

Time : 2 hours

SECTION A: ANSWER ALL QUESTIONS (40 Marks Each 2 marks)


1.

Lists four (4) fields of an assembly language statements in .386 microprocessor

2.

What is the important of Moore's Law ?

3.

An address field in an instruction contains decimal value 14. Where is the corresponding operand
located if indirect addressing mode is used?

4.

How many number of index register in the .386 microprocessor?

5.

Name the pairs of registers used to hold the base and offset address of stack operation in .386?

6.

Lists all the data register in .386 microprocessor

7.

In real-mode, how many bits can be used in Flags register for any instructions?

8.

What is the signal name generated by processor as a respond of an interrupt request signal sending
by I/O module?

9.

What is the physical address for the logical address 1CBC:FFBD?

10.

What is the output of the instruction Mov DS, CS ?

11.

Give one example of instruction that used Immediate addressing mode

12.

What is the output of the instruction MOV AX, BL?

13.

What is the output of the instruction Mov AX,[BX]?

14.

What is the output of the instruction Mov AX, list[BX+DI]?

15.

Differentiate between the function of address, data and control bus

16.

If the address bus is 8 bit and data bus is 16 bit what are the maximum addressable memory and size
of data that can be used?

17.

What are the pairs of registers in 80386 microprocessors used to hold the address of instructions in
memory?

18.

What is the result of instruction: BSF AX, BX if given BX = 4000H?

19.

Give one (1) advantage of Indirect addressing mode compare with Direct addressing mode?

20.

If the address bus is 16 bits and data bus is 32 bits what are the maximum addressable memory and
size of data that can be used?

SECTION B - ANSWER ALL QUESTIONS (60 MARKS)


Question 1 (30 marks)
The main components of computer comprise of Central processing unit (CPU), Main memory (MM) and
Input/ Output module which are connected through data, address and control bus for fetching and
executing an instructions. With this regards, answer the following questions:
a) Explain the stored program concept
(2 marks)
b) Sketch the top level view of computer main components connection and explain the function of each
components for instruction fetch and execute
(6 marks)
c) Illustrate and explain the following instruction cycle of stored program concept based on the sketch
top level view of computer main components:
i. MBR mem[940]
(4 marks)
ii. MBR mem[941] + MBR
(4 marks)
iii. mem[941] MBR
(4 marks)
d) Compute X = (A + B x C) / (D - E x F) using 0 , 1 , 2 , and 3-address. The instructions available for
use for each four machines are as in Table 1.
0 Address
PUSH M
POP M
ADD
SUB
MUL
DIV

1 Address
LOAD M
STORE M
ADD M
SUB M
MUL M
DIV M

Table 1

2 Address
MOVE (X Y)
ADD (X X + Y)
SUB ( X X - Y)
MUL (X X x Y)
DIV (X X/Y)

3 Address
MOVE (X Y)
ADD (X Y + Z)
SUB (X Y-Z)
MUL (X Y x Z)
DIV (X Y/Z)

(10 marks)

Question 2 (30 marks)

a) Given that DS = F000H, BX = C300H, DI = 00A3H and LIST = 0100H, determine the physical
memory address accessed by each of the following instructions assuming real-mode operations and
briefly describe the operation that each instructions will performed.
i.
iii.

MOV AX, LIST[BX + DI]


MOV AX, [BX + 100]

ii. ADD CX, LIST[DI]


iv. SUB AX, [BX + DI]

(8 marks)

b) Figure 1 shows the assembly language vote.asm program for identifying the voters eligibility based on
age user input data with 28 lines of instruction. By evaluating the program, answer the following
questions:
i.
What is the size of the reserved stack memory used in the program?
(2 marks)
ii.
Identify four (4) errors in the program and justify your answer by rewriting the right coding
(4 marks)
iii.
Construct and explain the flowchart of the program
(4 marks)
iv.
Modify and construct flowchart of the program that enable the user to enter their name and
age and display both at the end with the result of their eligibility to vote
(12 marks)

Line#
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

.model medium
.stack 100h
.data
Prompt
db
13,10, Please enter your age (0 to 99)
Age
db
3,4 dup ()
Yes1
db
13,10, Congratulation, you are eligible to vote
No1
db
Sorry, you are under age
.code
START:
mov
ax, seg Prompt
mov
ds, ax
mov
ah, 9
mov
dx, offset Prompt
int
21h
mov
ah, 0ah
mov
dx, offset age
int
21h
mov
ax, offset age
mov
bh, [ax+2]
mov
bl, [ax+3]
cmp
ax, 21
jae
yes
mov
dx, offset No1
jmp
dispmessage
yes:
mov
dx, offset Yes1
dispmessage: mov
ah,9
int
21h
mov
ah, 4c00h
end start

Figure 1 vote.asm program

You might also like