Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 121130 of 261 Questions
Page 13 of 27
Q121❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When an unsigned subtraction operation requires a borrow (i.e. subtracting a larger unsigned number from a smaller number), which status flag in the FLAGS register is set (`1`)?
💻 assembly Snippet
mov ax, 5
sub ax, 10 ; 5 - 10 requires a borrow -> sets CF = 1
  1. A.ZF
  2. B.CF
  3. C.SF
  4. D.OF
Q122❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
True or False: Register-to-register operations (such as `mov ax, bx` or `add cx, dx`) are NOT allowed in x86 assembly language.
💻 assembly Snippet
mov ax, bx ; Legal register-to-register transfer
add cx, dx ; Legal register-to-register addition
  1. A.True
  2. B.False
Q123❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When a larger unsigned number is subtracted from a smaller number, a borrow is required. Which processor status flag is set in this case?
💻 assembly Snippet
mov ax, 5
sub ax, 10 ; 5 - 10 requires borrow -> sets CF = 1
  1. A.ZF
  2. B.CF
  3. C.SF
  4. D.OF
Q124❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In the assembly code statement `total: dw 0`, what is the syntactic role of `total`?
💻 assembly Snippet
total: dw 0 ; Label 'total' marks the memory location of this word variable
  1. A.Literal
  2. B.Variable
  3. C.Label
  4. D.Starting point
Q125❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In standard assembly language curriculum (CS401), into how many main categories/groups are instructions classified?
  1. A.4
  2. B.5
  3. C.3
  4. D.2
Q126❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
True or False: Data movement instructions are specifically used to transfer data from one place to another (such as register-to-register, or register-to-memory).
💻 assembly Snippet
mov ax, bx ; Copies data from BX to AX
  1. A.TRUE
  2. B.FALSE
Q127❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which group of instructions allows changing specific processor behaviors and controlling hardware operation modes?
💻 assembly Snippet
cli ; Special instruction to clear interrupt flag
cld ; Special instruction to clear direction flag
  1. A.Special Instructions
  2. B.Data Movement Instructions
  3. C.Program Control Instructions
  4. D.Arithmetic and Logic Instructions
Q128❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which register in x86 architecture is bit-significant, with each individual bit named and assigned a distinct status or control meaning?
  1. A.AX
  2. B.FS
  3. C.IP
  4. D.Flags Register
Q129❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When two 16-bit numbers are added, the sum can be up to 17 bits long. In which register bit is this extra 17th bit (carry) placed so it can be tested and used in multi-word addition?
💻 assembly Snippet
mov ax, 0xFFFF
add ax, 0x0001 ; Sum = 0x10000 -> AX = 0x0000, CF = 1
  1. A.carry flag
  2. B.Parity Flag
  3. C.Auxiliary Carry
  4. D.Zero Flag
Q130❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
True or False: Intel x86 assembly language instruction syntax strictly follows the 'operation destination, source' convention.
💻 assembly Snippet
mov ax, bx ; Operation: MOV, Destination: AX, Source: BX
  1. A.TRUE
  2. B.FALSE