COS2621
EXAM PACK
, Oct/Nov2021
90 marks
This paper consists of 7 pages plus an appendix.
INSTRUCTIONS
1. Answer all questions on word document/answer sheet, convert to pdf before submitting
2. The mark for each question is given in brackets next to the question.
3. The appendix contains a list of x86 Assembly Language instructions
ALL THE BEST!
1
, COS2621
2 Oct/Nov 2021
Question 1: General knowledge [30]
Choose from alternatives (1) to (5) the correct one. Each question counts 2 marks.
a). The exists in one of two states and, in the absence of input, remains in that state.
(1) assert
(2) complex PLD
(3) decoder
(4) flip-flop
(5) oscillator
b). instructions provide computational capabilities for processing numeric data.
(1) Boolean
(2) Logic
(3) Memory
(4) Arithmetic
(5) Comparison
c). NASM is a(n) while DEBUG is a(n) .
(1) compiler, linker and loader
(2) assembler, assembler
(3) assembler, utility to assemble and debug programs
(4) translator, interpreter
(5) compiler, assembler
d). Consider the following assembly language program fragment:
org 0x100
label1: dw 0x76EF
nop
mov ax,ax
nop
Which one of the following statements is true?
(1) 76h is stored in position 101h and EFh is stored in position 100h.
(2) 76h is stored in position 100h and EFh is stored in position 101h.
(3) 67h is stored in position 101h and EFh is stored in position 100h.
(4) 67h is stored in position 100h and EFh is stored in position 101h.
(5) None of the above.
, COS2621
3 Oct/Nov 2021
e). Which number will be stored in the AX register if we key in the following instruction (exactly as it is) and
assemble it by using (i) NASM, and (ii) DEBUG?
mov ax,0024
(1) (i) AX = (0024)16 (ii) AX = (0024)16
(2) (i) AX = (0024)10 (ii) AX = (0024)10
(3) (i) AX = (0024)16 (ii) AX = (0024)10
(4) (i) AX = (0024)10 (ii) AX = (0024)16
(5) None of the above.
f). A logical cache stores data using _.
(1) physical addresses
(2) virtual addresses
(3) random addresses
(4) both (1) and (3)
(5) direct addresses
g). Consider the following pseudo-ops (use NASM):
org 0x100
db 'Q'
dw 213h
db 15
In which relative memory location will (i) 51h and (ii) (15)10 respectively be stored?
(1) (i) 0000h (ii) 0003h
(2) (i) 0002h (ii) 0002h
(3) (i) 0003h (ii) 0001h
(4) (i) 0001h (ii) 0002h
(5) None of the above.
h). Suppose a machine has twelve (12) general-purpose 32-bit registers. How many bits must be reserved in
the machine code instruction in order to address any one of these twelve registers?
(1) 1
(2) 2
(3) 3
(4) 4
(5) 5
i). Which one of the following instructions would you use if you want to branch to the label TEST if the
sign flag is set?
(1) JN TEST
(2) JZ TEST
(3) JS TEST
(4) JNS TEST
(5) JNP TEST
j). Which of the following are characteristics of Blu-ray DVDs?
EXAM PACK
, Oct/Nov2021
90 marks
This paper consists of 7 pages plus an appendix.
INSTRUCTIONS
1. Answer all questions on word document/answer sheet, convert to pdf before submitting
2. The mark for each question is given in brackets next to the question.
3. The appendix contains a list of x86 Assembly Language instructions
ALL THE BEST!
1
, COS2621
2 Oct/Nov 2021
Question 1: General knowledge [30]
Choose from alternatives (1) to (5) the correct one. Each question counts 2 marks.
a). The exists in one of two states and, in the absence of input, remains in that state.
(1) assert
(2) complex PLD
(3) decoder
(4) flip-flop
(5) oscillator
b). instructions provide computational capabilities for processing numeric data.
(1) Boolean
(2) Logic
(3) Memory
(4) Arithmetic
(5) Comparison
c). NASM is a(n) while DEBUG is a(n) .
(1) compiler, linker and loader
(2) assembler, assembler
(3) assembler, utility to assemble and debug programs
(4) translator, interpreter
(5) compiler, assembler
d). Consider the following assembly language program fragment:
org 0x100
label1: dw 0x76EF
nop
mov ax,ax
nop
Which one of the following statements is true?
(1) 76h is stored in position 101h and EFh is stored in position 100h.
(2) 76h is stored in position 100h and EFh is stored in position 101h.
(3) 67h is stored in position 101h and EFh is stored in position 100h.
(4) 67h is stored in position 100h and EFh is stored in position 101h.
(5) None of the above.
, COS2621
3 Oct/Nov 2021
e). Which number will be stored in the AX register if we key in the following instruction (exactly as it is) and
assemble it by using (i) NASM, and (ii) DEBUG?
mov ax,0024
(1) (i) AX = (0024)16 (ii) AX = (0024)16
(2) (i) AX = (0024)10 (ii) AX = (0024)10
(3) (i) AX = (0024)16 (ii) AX = (0024)10
(4) (i) AX = (0024)10 (ii) AX = (0024)16
(5) None of the above.
f). A logical cache stores data using _.
(1) physical addresses
(2) virtual addresses
(3) random addresses
(4) both (1) and (3)
(5) direct addresses
g). Consider the following pseudo-ops (use NASM):
org 0x100
db 'Q'
dw 213h
db 15
In which relative memory location will (i) 51h and (ii) (15)10 respectively be stored?
(1) (i) 0000h (ii) 0003h
(2) (i) 0002h (ii) 0002h
(3) (i) 0003h (ii) 0001h
(4) (i) 0001h (ii) 0002h
(5) None of the above.
h). Suppose a machine has twelve (12) general-purpose 32-bit registers. How many bits must be reserved in
the machine code instruction in order to address any one of these twelve registers?
(1) 1
(2) 2
(3) 3
(4) 4
(5) 5
i). Which one of the following instructions would you use if you want to branch to the label TEST if the
sign flag is set?
(1) JN TEST
(2) JZ TEST
(3) JS TEST
(4) JNS TEST
(5) JNP TEST
j). Which of the following are characteristics of Blu-ray DVDs?