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 171 โ€“ 180 of 261 Questions
Page 18 of 27
Q171
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Conditional Jumps and Mnemonic Aliases (JNE / JNZ)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, what is the actual distinction between the jump mnemonics JNE (Jump if Not Equal) and JNZ (Jump if Not Zero)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jne label1

dec cx
jnz label2
  1. A.There is no machine code difference; they are mnemonic aliases used for programmer code clarity
  2. B.JNE compares registers while JNZ checks processor flags
  3. C.JNE is a far jump while JNZ is a short jump
  4. D.They compile into completely different machine code opcodes
Q172
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unconditional Jump Instruction (JMP)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which type of jump instruction always transfers program execution to the target memory address regardless of processor flag states?
๐Ÿ’ป assembly Snippet
jmp target_label
  1. A.Conditional jump
  2. B.Indirect flag jump
  3. C.Unconditional jump (JMP)
  4. D.Loop jump
Q173
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Comparison Mechanics and Zero Flag EvaluationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When subtracting the source operand from the destination operand (DEST - SRC), the Zero Flag is set (ZF = 1). What does this indicate regarding the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST > SRC
Q174
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Comparison and Carry Flag BorrowEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When subtracting an unsigned source operand from an unsigned destination operand (DEST - SRC) where the destination is smaller than the source, a borrow occurs. Which flag state results?
๐Ÿ’ป assembly Snippet
mov ax, 5
cmp ax, 10
  1. A.Carry Flag is cleared (CF = 0)
  2. B.Carry Flag is set (CF = 1)
  3. C.Zero Flag is set (ZF = 1)
  4. D.Overflow Flag is set (OF = 1)
Q175
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JBE / JNA)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In unsigned comparison via subtraction (DEST - SRC), if the resulting flag state satisfies ZF = 1 OR CF = 1, what is the mathematical relationship between the unsigned destination (UDEST) and unsigned source (USRC)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe below_or_equal
  1. A.UDEST = USRC
  2. B.UDEST!= USRC
  3. C.UDEST <= USRC
  4. D.UDEST > USRC
Q176
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JA / JNBE)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In unsigned comparison via subtraction (DEST - SRC), if the resulting flag state satisfies ZF = 0 AND CF = 0, what is the mathematical relationship between the unsigned destination (UDEST) and unsigned source (USRC)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja above_label
  1. A.UDEST = USRC
  2. B.UDEST!= USRC
  3. C.UDEST < USRC
  4. D.UDEST > USRC
Q177
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Unsigned Conditional Jumps (JAE / JNC)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In unsigned comparison via subtraction (DEST - SRC), if the resulting Carry Flag is clear (CF = 0), what is the mathematical relationship between the unsigned destination (UDEST) and unsigned source (USRC)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae above_or_equal
  1. A.UDEST = USRC
  2. B.UDEST!= USRC
  3. C.UDEST < USRC
  4. D.UDEST >= USRC
Q178
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Conditional Jumps and Mnemonic Aliases (JZ / JE)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is executed if a preceding arithmetic operation evaluates to zero, or if a CMP instruction determines that both operands are equal?
๐Ÿ’ป assembly Snippet
cmp ax, bx
je equal_label
  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 instruction exists for this condition
Q179
โ“ 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 smaller than or equal to the unsigned source operand?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe target
  1. A.JBE (Jump if Below or Equal) / JNA (Jump if Not Above)
  2. B.JAE (Jump if Above or Equal) / JNB (Jump if Not Below)
  3. C.JA (Jump if Above) / JNBE (Jump if Not Below or Equal)
  4. D.JB (Jump if Below) / JNAE (Jump if Not Above or Equal)
Q180
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Multi-Word Addition (ADD and ADC)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Numbers of arbitrary bit-width can be added in assembly language using a proper combination of which instructions?
๐Ÿ’ป assembly Snippet
add ax, cx
adc bx, dx
  1. A.ADD and ADC
  2. B.ADD and SUB
  3. C.ADC and SBB
  4. D.INC and ADD