Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 1120 of 261 Questions
Page 2 of 27
Q11❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When a 32-bit number is divided by a 16-bit number in x86 assembly language (DIV instruction), the quotient is stored in a register of what size?
💻 assembly Snippet
mov dx, 0x0000
mov ax, 0x0020
mov bx, 0x0004
div bx
  1. A.32 bits
  2. B.16 bits
  3. C.8 bits
  4. D.4 bits
Q12🧠 Long Problem📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
Given initial conditions AL = 11001011b (0xCB) and Carry Flag CF = 1, determine the resulting binary and hexadecimal contents of register AL after each of the following independent instructions is executed: 1. SHL AL, 1 2. SHR AL, 1 3. ROL AL, CL (where CL = 2) 4. SAR AL, CL (where CL = 2) 5. RCR AL, CL (where CL = 3)
💻 assembly Snippet
; Initial: AL = 11001011b, CF = 1
shl al, 1
shr al, 1
rol al, cl ; CL = 2
sar al, cl ; CL = 2
rcr al, cl ; CL = 3
Q13❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly language, the signed arithmetic instructions IMUL (Signed Multiply) and IDIV (Signed Divide) operate on numbers represented in which numeric format?
💻 assembly Snippet
imul bx
idiv cx
  1. A.Two's-complement numbers
  2. B.One's-complement numbers
  3. C.All of the given options
  4. D.None of the given options
Q14❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
To reserve or initialize 8 bits (1 byte) of memory in assembly language, which directive is used?
💻 assembly Snippet
val db 5
  1. A.db
  2. B.dw
  3. C.dn
  4. D.dd
Q15❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In 8088/x86 assembly language, an unconditional jump (JMP) instruction can be of which type(s)?
💻 assembly Snippet
JMP SHORT target
JMP NEAR PTR target
JMP FAR PTR target
  1. A.all of the given
  2. B.short
  3. C.near
  4. D.far
Q16❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
The operation of the CMP (Compare) instruction is to internally subtract the source operand from the destination operand and update the status flags without altering either operand. (True/False)
💻 assembly Snippet
CMP AX, BX
  1. A.True
  2. B.False
Q17❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
An unconditional jump (JMP) instruction ________.
💻 assembly Snippet
JMP label
  1. A.Executes in every condition whether true or false
  2. B.Executes only if the condition is true
  3. C.Executes only if the condition is false
  4. D.None of the given
Q18❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly, a JA (Jump if Above) jump is NOT taken after a CMP instruction if the unsigned destination operand is larger than the unsigned source operand. (True/False)
💻 assembly Snippet
CMP AX, BX
JA target
  1. A.False
  2. B.True
Q19❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When a larger number is subtracted from a smaller number during an unsigned subtraction operation, a borrow is required. Which flag is set in this condition?
💻 assembly Snippet
MOV AL, 5
SUB AL, 10
  1. A.CF
  2. B.ZF
  3. C.SF
  4. D.OF
Q20❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which conditional jump instruction executes if the last signed arithmetic operation unexpectedly changed the sign bit due to an overflow?
💻 assembly Snippet
ADD AL, 100
JO overflow_label
  1. A.JO
  2. B.JNO
  3. C.JNZ
  4. D.JZ