Branching

Lecture 8: Branching

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