Ch 03: Branching, Loops and Program Flow

261 Questions261 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS401 - Computer Architecture and Assembly Language Programming Examination Practice

Timed practice exam simulation for CS401 - Computer Architecture and Assembly Language Programming.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 221 โ€“ 230 of 261 Questions
Page 23 of 27
Q221
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ ADC (Add with Carry) Operand CountEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, how many explicit operands does the ADC (Add with Carry) instruction take?
๐Ÿ’ป assembly Snippet
adc ax, bx
  1. A.0 Operands
  2. B.1 Operand
  3. C.2 Operands
  4. D.3 Operands
Q222
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ Far Jump Absolute AddressingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
A 'Far' jump instruction is not position-relative but is classified as:
๐Ÿ’ป assembly Snippet
jmp far ptr target_label
  1. A.Memory dependent
  2. B.Absolute
  3. C.Temporary
  4. D.Indirect
Q223
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
If AX contains decimal -2 (0xFFFE) and BX contains decimal 2 (0x0002), what will occur after executing 'CMP AX, BX' followed by 'JA label'?
๐Ÿ’ป assembly Snippet
mov ax, -2   ; AX = 0xFFFE
mov bx, 2    ; BX = 0x0002
cmp ax, bx   ; Unsigned comparison: 65534 > 2
ja target    ; Branch taken because CF = 0 and ZF = 0
  1. A.Jump will be taken
  2. B.Zero flag will set
  3. C.ZF will contain value -4
  4. D.Jump will not be taken
Q224
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.3. Unconditional JumpEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write down any two control flow instructions used in 8088 assembly language.
Q225
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Unconditional JumpMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
A Far Jump instruction is not position-relative; instead, it specifies a destination address that is:
๐Ÿ’ป assembly Snippet
jmp 0x1234:0x0100  ; Absolute Far Jump
  1. A.Memory dependent
  2. B.Absolute
  3. C.Temporary
  4. D.Indirect
Q226
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.3. Unconditional JumpMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What does the following assembly code sequence do? mov cx, 0xffff loop $
๐Ÿ’ป assembly Snippet
mov cx, 0xffff
loop $
Q227
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the primary difference between conditional jump instructions JNE (Jump if Not Equal) and JNZ (Jump if Not Zero)?
๐Ÿ’ป assembly Snippet
jne target_label
jnz target_label  ; Both assemble to opcode 0x75
  1. A.Programmer or logic readability
  2. B.Assembler opcode encoding
  3. C.Debugger execution
  4. D.iAPX88 hardware execution
Q228
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Unconditional JumpEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
An assembly instruction that transfers program execution control to a target location regardless of processor flag states is called an:
๐Ÿ’ป assembly Snippet
jmp target_label
  1. A.Jump
  2. B.Conditional jump
  3. C.Unconditional jump
  4. D.Stay
Q229
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When an unsigned source operand is subtracted from a smaller unsigned destination operand, a borrow is required. Which status flag is set as a result?
๐Ÿ’ป assembly Snippet
sub ax, bx  ; Sets CF = 1 if AX < BX
  1. A.Carry Flag cleared (CF = 0)
  2. B.Carry Flag set (CF = 1)
  3. C.Carry Flag set and Zero Flag set (CF = 1, ZF = 1)
  4. D.None of the given options
Q230
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional JumpsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When comparing operands using a CMP instruction (which subtracts the source from the destination), setting the Zero Flag (ZF = 1) indicates that:
๐Ÿ’ป assembly Snippet
cmp ax, bx  ; ZF = 1 if AX == BX
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST > SRC