Ch 03: Branching, Loops and Program Flow

261 Questions261 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS401 - Computer Architecture and Assembly Language Programming Examination Practice

Timed practice exam simulation for CS401 - Computer Architecture and Assembly Language Programming.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 11 โ€“ 20 of 261 Questions
Page 2 of 27
Q11
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When a 32-bit number is divided by a 16-bit number in x86 assembly language (DIV instruction), the quotient is stored in a register of what size?
๐Ÿ’ป assembly Snippet
mov dx, 0x0000
mov ax, 0x0020
mov bx, 0x0004
div bx
  1. A.32 bits
  2. B.16 bits
  3. C.8 bits
  4. D.4 bits
Q12
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.3. Bitwise Shift InstructionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Given initial conditions AL = 11001011b (0xCB) and Carry Flag CF = 1, determine the resulting binary and hexadecimal contents of register AL after each of the following independent instructions is executed: 1. SHL AL, 1 2. SHR AL, 1 3. ROL AL, CL (where CL = 2) 4. SAR AL, CL (where CL = 2) 5. RCR AL, CL (where CL = 3)
๐Ÿ’ป assembly Snippet
; Initial: AL = 11001011b, CF = 1
shl al, 1
shr al, 1
rol al, cl ; CL = 2
sar al, cl ; CL = 2
rcr al, cl ; CL = 3
Q13
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, the signed arithmetic instructions IMUL (Signed Multiply) and IDIV (Signed Divide) operate on numbers represented in which numeric format?
๐Ÿ’ป assembly Snippet
imul bx
idiv cx
  1. A.Two's-complement numbers
  2. B.One's-complement numbers
  3. C.All of the given options
  4. D.None of the given options
Q14
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Data Definition Directives and Memory AllocationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
To reserve or initialize 8 bits (1 byte) of memory in assembly language, which directive is used?
๐Ÿ’ป assembly Snippet
val db 5
  1. A.db
  2. B.dw
  3. C.dn
  4. D.dd
Q15
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Unconditional Jump InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In 8088/x86 assembly language, an unconditional jump (JMP) instruction can be of which type(s)?
๐Ÿ’ป assembly Snippet
JMP SHORT target
JMP NEAR PTR target
JMP FAR PTR target
  1. A.all of the given
  2. B.short
  3. C.near
  4. D.far
Q16
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Comparison and Conditional BranchingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The operation of the CMP (Compare) instruction is to internally subtract the source operand from the destination operand and update the status flags without altering either operand. (True/False)
๐Ÿ’ป assembly Snippet
CMP AX, BX
  1. A.True
  2. B.False
Q17
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Unconditional Jump InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
An unconditional jump (JMP) instruction ________.
๐Ÿ’ป assembly Snippet
JMP label
  1. A.Executes in every condition whether true or false
  2. B.Executes only if the condition is true
  3. C.Executes only if the condition is false
  4. D.None of the given
Q18
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional Jumps and Unsigned ComparisonsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly, a JA (Jump if Above) jump is NOT taken after a CMP instruction if the unsigned destination operand is larger than the unsigned source operand. (True/False)
๐Ÿ’ป assembly Snippet
CMP AX, BX
JA target
  1. A.False
  2. B.True
Q19
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Arithmetic Instructions and FlagsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When a larger number is subtracted from a smaller number during an unsigned subtraction operation, a borrow is required. Which flag is set in this condition?
๐Ÿ’ป assembly Snippet
MOV AL, 5
SUB AL, 10
  1. A.CF
  2. B.ZF
  3. C.SF
  4. D.OF
Q20
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional Jumps and Overflow HandlingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction executes if the last signed arithmetic operation unexpectedly changed the sign bit due to an overflow?
๐Ÿ’ป assembly Snippet
ADD AL, 100
JO overflow_label
  1. A.JO
  2. B.JNO
  3. C.JNZ
  4. D.JZ