Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 131140 of 261 Questions
Page 14 of 27
Q131❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Executing the instruction `ADD AX, BX` performs which calculation?
💻 assembly Snippet
add ax, bx ; AX = AX + BX
  1. A.Add the bx to ax and change the bx
  2. B.Add the ax to bx and change the ax
  3. C.Add the bx to ax and change the ax
  4. D.Add the bx to ax and change nothing
Q132❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In assembly language data definitions using the `db` (Define Byte) directive, what is the allocated memory size for each data element?
💻 assembly Snippet
num1: db 5 ; Allocates 1 byte of memory
  1. A.1byte
  2. B.4bit
  3. C.16bit
  4. D.2byte
Q133❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Consider the following x86 assembly code snippet: ```assembly [org 0x0100] mov ax, [num1] ; load first number in ax mov bx, [num2] ; load second number in bx add ax, bx ; _________________________________ int 0x21 num1: dw 5 num2: dw 10 ``` What is the most appropriate inline code comment for line 4 (`add ax, bx`)?
💻 assembly Snippet
add ax, bx ; accumulate sum in ax
  1. A.No comments Will be
  2. B.; accumulate sum in add
  3. C.; accumulate sum in ax
  4. D.; accumulate sum in Bx
Q134❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which of the following syntax declarations using the `db` directive validly defines character strings in assembly language?
💻 assembly Snippet
str1: db 'abc' ; Equivalent to db 'a', 'b', 'c' or db 0x61, 0x62, 0x63
  1. A.db 0x61, 0x61, 0x63
  2. B.db 'a', 'b', 'c'
  3. C.db 'abc'
  4. D.All of the above
Q135❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When performing 16-bit division using `DIV reg16`, the instruction divides the 32-bit implied dividend in `DX:AX` by the 16-bit operand and stores the __________ quotient in register `AX`.
💻 assembly Snippet
div bx ; DX:AX / BX -> Quotient in AX, Remainder in DX
  1. A.16bit
  2. B.17bit
  3. C.32bit
  4. D.64bit
Q136❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In x86 assembly language, division performed by the __________ instruction is integer division (truncating remainders) rather than floating-point division.
💻 assembly Snippet
div cx ; Performs integer division
  1. A.DIV instruction
  2. B.ADC instruction
  3. C.SSB instruction
  4. D.DIVI instruction
Q137❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Which x86 instruction performs unsigned multiplication of a source operand with the implicit accumulator register (`AL` or `AX`)?
💻 assembly Snippet
mul bx ; Unsigned 16-bit multiplication: DX:AX = AX * BX
  1. A.Multi
  2. B.DIV
  3. C.MUL
  4. D.Move
Q138❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
To reserve or define 8 bits (1 byte) of memory in assembly language, which data directive is used?
💻 assembly Snippet
var1: db 0x55 ; Allocates 8 bits (1 byte) initialized to 0x55
  1. A.db
  2. B.dw
  3. C.dn
  4. D.dd
Q139❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
In the assembly instruction `mov ax, 5`, the literal constant `5` serves as the __________ operand.
💻 assembly Snippet
mov ax, 5 ; ax = destination, 5 = source operand
  1. A.source
  2. B.destination
  3. C.memory
  4. D.register
Q140❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When executing the 8-bit division instruction `DIV BL`, where must the 16-bit implied dividend be stored prior to execution?
💻 assembly Snippet
mov ax, 100 ; Implied 16-bit dividend in AX
mov bl, 5   ; 8-bit divisor in BL
div bl      ; AL = AX / BL (20), AH = AX % BL (0)
  1. A.AX
  2. B.BX
  3. C.CX
  4. D.DX