You are on page 1of 3

Part A (5 marks)

1) Which mathematical operation is dominant during the execution of SCAS instruction


A. Division
B. Multiplication
C. Addition
D. Subtraction

2) A collection of 8 bits is called _____. (1 mark)


A. byte
B. word
C. record

3) The ascending order or a data Hierarchy is  (1 mark)


A. bit - bytes - fields - record - file - database
B. bit - bytes - record - field - file - database
C. bytes - bit- field - record - file - database
D. bytes -bit - record - field - file - database

4) How many address lines are needed to address each memory locations in a 2048 x 4 memory
chip? (1 mark)
A. 10
B. 11
C. 8
D. 12 

Part B1: Short Answer/ (10 Marks)


1) Six statements about assembly language are shown
Tick ( ) whether the statement is true or false.

(10 marks)
PART B2 Fill in the blanks

1) The Java interpreter translates a Java program from ______to machine language.
(3 marks)

2) Another term for ________ is information hiding. (3 marks)


3) A(n) __________ is a set of instructions that tells the basic strategery for solving a
problem. (3 marks)
4) Convert the number 2.25 to floating point. Write your answer in hex. (3 marks)

For the code above, fill in the final state of the registers and memory. (Assume big-endian)

Initial Memory
Register Final Value Initial Value Final Value
Value Address

r0 0x0 5) 0x1000 0x87A6100C 6)


r1 0x0 7) 0x1004 0x2123A789 8)
r2 0x0 9) 0x1008 0x9FF75432 10)
r3 0x0 11) 0x100C 0x23A82690 12)

(8 marks)

PART C: ESSAY in Presentation slide

1) High-level languages can be compiled or interpreted.


Give 8 differences between compiler and an interpreter.

2) What is the rules when writing assembly language?


List Five (5) main rules.

3) Arithmtic and logic instructions. The assembly language 8086 has the most common
MOV, MUL, JMP. Can you write FOUR (4) sample codes, Addition, Multiplication,
Subtraction and Division with explanation for each of them.
Example,
Addition
ORG0000h
MOV DX, #07H     // move the value 7 to the register AX//
MOV AX, #09H     // move the value 9 to accumulator AX//
Add AX, 00H         // add CX value with R0 value and stores the result in AX//
END
4) Explain Sequential, Branching and Loop structures in 8086 architecture.
Write a simple IF-THEN, IF-THEN-ELSE code with comment as explanation as in
question 3.

5) Explain NINE (9) common flag bits.


6) Write a assembly program display 7 stars on the screen. Your code must include
section .text, main, and section .data.
7) Define DEC instruction
8) Explain ADD/SUB can take place between memories.
9) Write a simple program that stores the digits in EAX and EBX register respectively.
(hardcoded is acceptable)

Presentation slide will be combined with the previous slide together and present during week 14

You might also like