Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 201210 of 261 Questions
Page 21 of 27
Q201❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
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📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
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