CONFIDENTIAL PT/JULY 2025/ CSC159
UNIVERSITI TEKNOLOGI MARA
PRACTICAL TEST
COURSE : COMPUTER ORGANIZATION
COURSE CODE : CSC159
DATE : JULY 2025
TIME : 1 HOUR 30 MINUTES
Student Name :
Student ID :
Group :
INSTRUCTIONS TO CANDIDATES:
1. This question paper consists of THREE parts:
PART A : 10 Multiple choice questions.
PART B : 5 true/false Questions.
PART C : 2 Structured Questions.
2. Answer ALL questions in this QUESTION PAPER.
Part Marks Total
A /10
B /5
C /10
/25
DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO
This Question Paper consists of 7 printed pages
PART A (10 marks)
1. Which of the following instructions contains a memory operand?
A. MOV AX, BX
B. ADD AL, 05H
C. MOV AX, [BX]
D. INC CX
2. What does the instruction set of a CPU represent?
A. The complete set of machine instructions a CPU can understand
B. The set of commands in high-level programming languages
C. All binary files a computer can execute
D. The list of devices connected to a CPU
3. When the instruction MOV AH,55 is executed, what will be the value in the AX
register?
A. 3700
B. 0037
C. 5500
D. 0055
4. Which of the following statements are TRUE about arithmetic instructions?
I. The ADD instruction places the result in the destination operand, while the source
operand remains unchanged.
II. The execution of ADD and SUB instructions will affect all status flags.
III. Destination operand for NEG instruction can be register or memory operand.
IV. INC and DEC are slower than ADD and SUB instruction.
A. I, II, III and IV
B. I, II and III
C. I, II and IV
D. I and II
5. What is the correct status of the Carry Flag and Auxiliary Flag after executing the
following instruction?
MOV AH,24h
MOV BH,77h
SUB AH, BH
I. Auxiliary Flag (AF) set to 1
II. Auxiliary Flag (AF) set to 0
III. Carry Flag (CF) set to 1
IV. Carry Flag (CF) set to 0
A. I and III
B. I and IV
C. II and III
D. II and IV
6. Which of the following logical instructions does not modify any status flags in most
CPU architectures?
A. OR
B. NOT
C. AND
D. XOR
7. NOT instruction can be used to create the 2’s complement of a number by using it
with _____________ instruction.
A. AND
B. OR
C. INC
D. DEC
8. Shift Arithmetic Right (SAR) move each bit in the destination operand one bit position
to the right. What happened to the highest bit after the shift operation?
A. Replace it with zero
B. Replace it with 1
C. Replicate the original highest bit
D. Replicate the original lowest bit
9. What is the carry flag’s value if the destination operand is less than the source
operand in signed number compare (CMP) instruction?
A. CF = 0
B. CF = 1
C. CF undefined
D. CF holds result of the operation
10. What is the purpose of the LOOP instruction in assembly language?
A. To perform logical operations on data
B. To call a function or subroutine
C. To terminate program execution
D. To repeat a set of instructions a specific number of times
Answer:
1. 6.
2. 7.
3. 8.
4. 9.
5. 10.
PART B (5 marks)
State the following statements either TRUE or FALSE.
1. The AX register cannot be used as a place to store data temporarily.
Answer: _____________
2. The order of operands in the XCHG instruction affects the result of the operation.
Answer: _____________
3. Given the assembly code:
MOV al, 05h
MOV bl, 10h
MUL bl
After the operation, the carry flag (CF) is set.
Answer: _____________
4. XOR al, bx
Result of the above operation will be stored in al register.
Answer: _____________
5. The example of assembly code that can performs the AND operation between each
pair of matching bits in two operands, set the flags accordingly, but does not modify
the destination operand is:
MOV al, 89h
MOV bl, 61h
TEST al, bl Answer: _____________
PART C (10 marks)
QUESTION 1
Convert the following arithmetic expression into assembly language instructions.
Total = [(40 / Num2) * (Num1 + 45)] + 1
Given:
Total is a word-size variable.
Num1 is a word-size variable and is assigned with 5h.
Num2 is a byte-size variable and is assigned with 4h.
QUESTION 2
Trace and indicate the value of the register and designated flag after the execution of
the following instructions. Shows your steps.
(a)
Instruction AX CX CF
MOV AL, -100
MOV CL, 3
SAL AL, CL
(2 marks)
(b)
Instruction AX CX CF
MOV CL, 2
MOV AH, 19H
SHR AH, CL
RCR AH, CL
(3 marks)
END OF QUESTIONS