ANSWER KEY
Computer Organization and Assembly Language
I. MULTIPLE CHOICE (R X 1)
Choose the letter of the best correct answer.
1. B 14. C 27. B 40. C
2. A 15. B 28. B 41. A
3. B 16. B 29. C 42. A
4. D 17. A 30. C 43. C
5. D 18. B 31. D 44. C
6. C 19. A 32. C 45. C
7. B 20. B 33. D 46. C
8. C 21. C 34. B 47. C
9. A 22. D 35. D 48. C
10. D 23. A 36. D 49. C
11. D 24. A 37. C 50. A
12. B 25. C 38. C
13. D 26. C 39. C
II. MODIFIED TRUE OR FALSE (R X 2)
1. TRUE - does not allow
2. TRUE - XCHG
3. FALSE
4. TRUE - unsigned integer
5. TRUE - BCD
6. TRUE - DAA
7. TRUE - SUB
8. FALSE
9. TRUE - NEG/Negate
10. TRUE - CMP/Compare
11. TRUE - DAA
12. FALSE
13. TRUE - DAS
14. FALSE
15. FALSE
III. PROBLEM SOLVING (R X 5)
Solve the following.
1. Determine the value of AX after the following code is executed:
MOV AX,15H
AX = 15H
AX = 0000 0000 0001 0101
ADD AX,02H
AX = 0000 0000 0001 0101
02H = 0000 0000 0000 0010
0000 0000 0001 0111
AX = 17H
2nd Semester, AY 2015 – 2016 *Property of STI
Midterm Examination Page 1 of 3
ANSWER KEY
Computer Organization and Assembly Language
MOV CX,19H
CX = 19H
CX = 0000 0000 0001 1001
ADD AX,CX
AX = 0000 0000 0001 0111
CX = 0000 0000 0001 1001
0000 0000 0011 0000
AX = 30H
2.Determine the value of AX after the following code is executed:
MOV AX, 012F
AX = 012F = 0000 0001 0010 1111
MOV BX,8749
BX = 8749 = 1000 0111 0100
1001 MOV CX,3054
CX = 3054 = 0011 0000 0101 0100
MOV DX,9312
DX = 9312 = 1001 0011 0001 0010
ADD BX,DX
BX = 1000 0111 0100 1001
DX = 1001 0011 0001 0010
0001 1001 0101 1011
BX = 1A5B
ADD AX,CX
Carry = 1
AX = 0000 0001 0010 1111
CX = 0011 0000 0101 0100
0011 0001 1000 1000
AX = 3184
2nd Semester, AY 2015 – 2016 *Property of STI
Midterm Examination Page 2 of 3
ANSWER KEY
Computer Organization and Assembly Language
3. What is the value of AX, BX, CX, and DX after the following code is executed?
AX = 001A = 0000 0000 0001 1010
BX = 001F = 0000 0000 0001 1111
CX = 0012 = 0000 0000 0001 0010
DX = 001B = 0000 0000 0001 1011
INC AX = 001A + 0001 AX = 001B
INC BX = 001F + 0001 BX = 0020
INC CX = 0012 + 0001 CX = 0013
INC DX = 001B + 0001 DX = 001C
4. Determine the value of AL after the following code is executed:
MOV AL,04
AL = 0000 0100
ADD AL,01
AL = 0000 0100
ADD AL,01= 0000 0001
0000 0101
AL = 0000 0101
AL = 05
MOV BL, FE
BL = FE
BL = 1111 11110
AND AL, BL
AL = 0000 0101
BL = 1111 1110
0000 0100
AL = 0000 0100
AL = 04
2nd Semester, AY 2015 – 2016 *Property of STI