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 41 โ€“ 50 of 216 Questions
Page 5 of 22
Q41
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Carry Flag Unsigned Borrow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When an unsigned source operand is subtracted from a smaller unsigned destination operand (`CMP DEST, SRC`), a borrow is required. Which flag condition is set?
๐Ÿ’ป assembly Snippet
mov ax, 3
cmp ax, 5 ; 3 < 5 -> Sets CF = 1
  1. A.carry flag i.e CF = 0
  2. B.carry flag i.e CF = 1
  3. C.Carry Flag + ZF = 1
  4. D.None of the Given
Q42
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JBE Unsigned Comparison Logic)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When performing unsigned comparison (`CMP DEST, SRC`), if the resulting flags satisfy `ZF = 1 OR CF = 1`, what relationship exists between the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe target_label ; Jumps if AX <= BX (ZF == 1 OR CF == 1)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST <= SRC
  4. D.DEST > SRC
Q43
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JA Unsigned Above Comparison)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When performing unsigned comparison (`CMP UDEST, USRC`), if the resulting flags satisfy `ZF = 0 AND CF = 0`, what relationship exists between the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja label ; Jumps if AX > BX unsigned (ZF == 0 AND CF == 0)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST < USRC
  4. D.UDEST > USRC
Q44
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JAE Unsigned Above or Equal Comparison)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When performing unsigned comparison (`CMP UDEST, USRC`), if the Carry Flag is cleared (`CF = 0`), what relationship exists between the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae label ; Jumps if AX >= BX unsigned (CF == 0)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST < USRC
  4. D.UDEST >= USRC
Q45
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JZ Jump if Zero Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken if the last arithmetic or logical operation produced a result of zero in its destination register (`ZF = 1`)?
๐Ÿ’ป assembly Snippet
sub ax, bx
jz destination_is_zero ; Jumps if AX - BX == 0 (ZF == 1)
  1. A.JZ / JE
  2. B.JNZ / JNE
  3. C.JC
  4. D.JNC
Q46
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JE and JZ Equality Condition)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Following a `CMP` comparison instruction, which conditional jump instruction is triggered if both operands are equal (`ZF = 1`)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
je equal_label ; Jumps if AX == BX (synonymous with JZ)
  1. A.Jump if zero (JZ) / Jump if equal (JE)
  2. B.Jump if equal (JE)
  3. C.Jump if zero (JZ)
  4. D.No Jump for This
Q47
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JBE / JNA Unsigned Comparison)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken after a `CMP` instruction if the unsigned destination operand is smaller than or equal to the unsigned source operand (`DEST <= SRC`)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe label ; Jumps if AX <= BX (CF == 1 OR ZF == 1)
  1. A.JBE (Jump if Below or Equal)
  2. B.JNA (Jump if Not Above) / JBE (Jump if Below or Equal)
  3. C.JNA (Jump if Not Above)
  4. D.No Jump for This
Q48
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (ADD and ADC Extended Precision Addition)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Multi-word numbers of arbitrarily large bit length can be added using a proper combination of which instructions?
๐Ÿ’ป assembly Snippet
add ax, cx ; Add lower 16 bits
adc bx, dx ; 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
Q49
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (SBB Subtract with Borrow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Analogous to addition with carry (`ADC`), which x86 assembly instruction performs subtraction while subtracting the Carry Flag (borrow)?
๐Ÿ’ป assembly Snippet
sub ax, cx ; Subtract lower 16 bits
sbb bx, dx ; Subtract higher 16 bits with borrow
  1. A.SwB
  2. B.SBB
  3. C.SBC
  4. D.SBBC
Q50
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Bitwise 16-bit AND Operation)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When executing the instruction `and ax, bx` on 16-bit registers, how many bitwise AND operations are performed simultaneously by the processor ALU?
๐Ÿ’ป 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