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 231 โ€“ 240 of 261 Questions
Page 24 of 27
Q231
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When subtracting unsigned operands, if the resulting status flags yield ZF = 1 OR CF = 1, what is the relationship between destination and source?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe target_label  ; Jumps if AX <= BX (ZF = 1 or CF = 1)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST <= SRC (Unsigned Destination <= Unsigned Source)
  4. D.DEST > SRC
Q232
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When subtracting unsigned operands, if the resulting status flags yield ZF = 0 AND CF = 0, what is the relationship between destination and source?
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja target_label  ; Jumps if AX > BX (ZF = 0 and CF = 0)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST > SRC (Unsigned Destination > Unsigned Source)
Q233
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When subtracting unsigned operands, if the resulting status flag is CF = 0 (no borrow generated), what is the relationship between destination and source?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae target_label  ; Jumps if AX >= BX (CF = 0)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST >= SRC (Unsigned Destination >= Unsigned Source)
Q234
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken if the last arithmetic operation produced zero in its destination, or after CMP if both operands were equal?
๐Ÿ’ป assembly Snippet
cmp ax, bx
je match_label  ; Jumps if AX == BX (ZF = 1)
  1. A.Jump if Zero (JZ) / Jump if Equal (JE)
  2. B.Jump if Equal (JE) only
  3. C.Jump if Zero (JZ) only
  4. D.No jump for this condition
Q235
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken after CMP if the unsigned destination is smaller than or equal to the unsigned source operand?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe lower_or_equal
  1. A.JBE (Jump if Below or Equal) only
  2. B.JNA (Jump if Not Above) / JBE (Jump if Below or Equal)
  3. C.JNA (Jump if Not Above) only
  4. D.No jump for this condition
Q236
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Unconditional JumpEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
An assembly instruction like JMP that transfers control unconditionally regardless of processor flag states is called an:
๐Ÿ’ป assembly Snippet
jmp target_label
  1. A.Jump
  2. B.Conditional jump
  3. C.Unconditional jump
  4. D.Stay
Q237
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When comparing operands using CMP (which subtracts source from destination), setting the Zero Flag (ZF = 1) indicates that:
๐Ÿ’ป assembly Snippet
cmp ax, bx  ; ZF = 1 if AX == BX
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST > SRC
Q238
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken after a CMP operation if the unsigned destination is smaller than or equal to the unsigned source?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe lower_or_equal
  1. A.JBE (Jump if Below or Equal) only
  2. B.JNA (Jump if Not Above) / JBE (Jump if Below or Equal)
  3. C.JNA (Jump if Not Above) only
  4. D.No jump for this condition
Q239
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: The conditional jump instruction JA (Jump if Above) is NOT taken after CMP if the unsigned destination operand is greater than the source operand.
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja target_label  ; Jumps if AX > BX
  1. A.TRUE
  2. B.FALSE
Q240
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In 8088/8086 assembly language, conditional jump instructions are restricted to which distance range?
๐Ÿ’ป assembly Snippet
jz short_target
  1. A.Far jumps only
  2. B.Short jumps only (-128 to +127 bytes relative to IP)
  3. C.Near jumps only
  4. D.All of the given options