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 201 โ€“ 210 of 261 Questions
Page 21 of 27
Q201
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unconditional Jump Instruction (JMP)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
An instruction that transfers control to a target label unconditionally, regardless of the state of processor flags, is called a(n) __________.
๐Ÿ’ป assembly Snippet
jmp target_label
  1. A.Conditional jump
  2. B.Short jump only
  3. C.Unconditional jump
  4. D.Stay instruction
Q202
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ CMP Instruction and Zero Flag MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When comparing two values via 'CMP DEST, SRC', if the result of the subtraction (DEST - SRC) is zero, the Zero Flag is set (ZF = 1). What does this indicate about the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST > SRC
Q203
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Subtraction and Carry Flag (Borrow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When subtracting an unsigned source operand from an unsigned destination operand where DEST is smaller than SRC (DEST < SRC), a borrow is generated. Which flag is set?
๐Ÿ’ป assembly Snippet
cmp ax, bx
  1. A.Carry Flag is cleared (CF = 0)
  2. B.Carry Flag is set (CF = 1)
  3. C.Carry Flag and Zero Flag are set (CF = 1, ZF = 1)
  4. D.None of the given options
Q204
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JBE / JNA)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
After subtracting unsigned operands (CMP DEST, SRC), if the resulting flags satisfy 'ZF = 1 OR CF = 1', what relationship holds between DEST and SRC?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe below_or_equal
  1. A.Unsigned DEST = Unsigned SRC
  2. B.Unsigned DEST!= Unsigned SRC
  3. C.Unsigned DEST <= Unsigned SRC
  4. D.Unsigned DEST > Unsigned SRC
Q205
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JA / JNBE)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
After subtracting unsigned operands (CMP DEST, SRC), if the resulting flags satisfy 'ZF = 0 AND CF = 0', what relationship holds between DEST and SRC?
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja above_label
  1. A.Unsigned DEST = Unsigned SRC
  2. B.Unsigned DEST!= Unsigned SRC
  3. C.Unsigned DEST < Unsigned SRC
  4. D.Unsigned DEST > Unsigned SRC
Q206
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JAE / JNC)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
After subtracting unsigned operands (CMP DEST, SRC), if the Carry Flag is cleared (CF = 0), what relationship holds between DEST and SRC?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae above_or_equal
  1. A.Unsigned DEST = Unsigned SRC
  2. B.Unsigned DEST!= Unsigned SRC
  3. C.Unsigned DEST >= Unsigned SRC
  4. D.Unsigned DEST < Unsigned SRC
Q207
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Conditional Jumps (JZ / JE)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken if the previous arithmetic/logic operation produced zero, or after a CMP instruction if both operands were equal?
๐Ÿ’ป assembly Snippet
cmp ax, bx
je match_label
  1. A.JZ (Jump if Zero) / JE (Jump if Equal)
  2. B.JE (Jump if Equal) only
  3. C.JZ (Jump if Zero) only
  4. D.No jump exists for this condition
Q208
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JBE / JNA)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken after a CMP instruction if the unsigned destination operand is below or equal to the unsigned source operand?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe below_or_equal
  1. A.JBE (Jump if Below or Equal)
  2. B.JNA (Jump if Not Above) / JBE (Jump if Below or Equal)
  3. C.JNA (Jump if Not Above) only
  4. D.JNC (Jump if Not Carry)
Q209
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Multi-Word Addition (ADD and ADC)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Numbers of arbitrary bit-width (e.g., 32-bit or 64-bit) can be added on a 16-bit processor using a proper combination of which instructions?
๐Ÿ’ป assembly Snippet
add ax, bx
adc dx, cx
  1. A.ADD and ADC
  2. B.ABD and ADC
  3. C.ADC and ADC only
  4. D.None of the given options
Q210
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Multi-Word Subtraction (SBB)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Analogous to multi-word addition with carry (ADC), which instruction is used to perform multi-word subtraction with borrow?
๐Ÿ’ป assembly Snippet
sub ax, bx
sbb dx, cx
  1. A.SWB
  2. B.SBB (Subtract with Borrow)
  3. C.SBC
  4. D.SBBC