Ch 06: Parameter Passing and Stack Frames

216 Questions216 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 71 โ€“ 80 of 216 Questions
Page 8 of 22
Q71
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JA Unsigned Above Logic)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In unsigned comparison (`CMP DEST, SRC`), if the result produces `ZF = 0` AND `CF = 0`, which relationship condition between unsigned destination (`UDEST`) and unsigned source (`USRC`) is satisfied?
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja label ; Jumps if CF = 0 and ZF = 0 (AX > BX unsigned)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST < USRC
  4. D.UDEST > USRC
Q72
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JAE Unsigned Above or Equal Logic)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In unsigned comparison (`CMP DEST, SRC`), if `CF = 0` (no borrow generated during subtraction), which relationship condition between unsigned destination (`UDEST`) and unsigned source (`USRC`) is satisfied?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae label ; Jumps if CF = 0 (AX >= BX unsigned)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST < USRC
  4. D.UDEST >= USRC
Q73
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JZ and JE Jump if Zero Logic)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is executed if the previous arithmetic or logical operation produced a zero result in the destination register (`ZF = 1`)?
๐Ÿ’ป assembly Snippet
sub ax, ax ; AX = 0 -> ZF = 1
jz  zero_label ; Jump is taken
  1. A.JZ / JE
  2. B.JNZ / JNE
  3. C.JC
  4. D.JNC
Q74
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JE and JZ Equality Logic)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
After executing a `CMP` instruction, which conditional jump instruction is taken if both operands are equal (`ZF = 1`)?
๐Ÿ’ป assembly Snippet
cmp ax, bx ; Compares AX and BX
je  equal_label ; Jump taken if AX == BX (ZF = 1)
  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 available
Q75
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (Multi-Word Addition via ADD and ADC)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Multi-word or arbitrarily large numbers can be added in x86 assembly language using a proper combination of which instructions?
๐Ÿ’ป assembly Snippet
; Adding 32-bit numbers stored in (DX:AX) and (CX:BX)
add ax, bx ; Add lower 16 bits
adc dx, cx ; Add higher 16 bits with carry
  1. A.ADD and ADC
  2. B.ABD and ADC
  3. C.ADC and ADC
  4. D.None of the Given
Q76
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (SBB Subtract with Borrow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Just as `ADC` performs addition with carry, which instruction performs subtraction while incorporating the borrow (Carry Flag) from a previous operation?
๐Ÿ’ป assembly Snippet
; Subtracting 32-bit numbers (DX:AX) - (CX:BX)
sub ax, bx ; Subtract lower 16 bits
sbb dx, cx ; Subtract higher 16 bits with borrow
  1. A.SwB
  2. B.SBB
  3. C.SBC
  4. D.SBBC
Q77
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Bitwise AND Bit Testing and Masking)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which logical instruction is primarily used as a masking operation to test or inspect whether specific target bits in a register or memory location are set?
๐Ÿ’ป assembly Snippet
and al, 00000001b ; Masks all bits except bit 0 to test if bit 0 is set
  1. A.AND
  2. B.OR
  3. C.XOR
  4. D.NOT
Q78
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Bitwise AND Register Operation Width)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When the 16-bit bitwise instruction `and ax, bx` is executed, how many individual bitwise `AND` logic operations occur in parallel across the register bits?
๐Ÿ’ป assembly Snippet
and ax, bx ; Performs 16 parallel bitwise AND operations
  1. A.16 AND
  2. B.17 AND
  3. C.32 AND
  4. D.8 AND
Q79
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Selective Bit Inversion via XOR)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which logical instruction can be used as a masking operation to selectively invert or toggle specific bits while leaving other bits unchanged?
๐Ÿ’ป assembly Snippet
xor al, 00001111b ; Inverts lower 4 bits of AL, leaves upper 4 bits unchanged
  1. A.AND
  2. B.OR
  3. C.XOR
  4. D.NOT
Q80
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Four Core Masking Operations)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In assembly language programming, bit masking operations are classified into which four primary operations?
  1. A.Clearing, XOR, Inversion and Testing
  2. B.Clearing, Setting, Inversion and Testing
  3. C.Clearing, XOR, AND and Testing
  4. D.None of the Given