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 111 โ€“ 120 of 216 Questions
Page 12 of 22
Q111
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Unsigned Comparison JBE Condition ZF=1 OR CF=1)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When comparing unsigned destination and source operands (`CMP UDEST, USRC`), if the resulting flags satisfy `ZF = 1` OR `CF = 1`, what relationship exists between the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jbe below_or_equal ; Jumps if AX <= BX (ZF = 1 OR CF = 1)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST <= USRC
  4. D.DEST > SRC
Q112
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Unsigned Comparison JA Condition ZF=0 AND CF=0)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When comparing unsigned destination and source operands (`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 above_label ; Jumps if AX > BX (ZF = 0 AND CF = 0)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST < USRC
  4. D.UDEST > USRC
Q113
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Unsigned Comparison JAE Condition CF=0)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When comparing unsigned destination and source operands (`CMP UDEST, USRC`), if the resulting Carry Flag is cleared (`CF = 0`), what relationship holds between the operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae above_or_equal ; Jumps if AX >= BX (CF = 0)
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.UDEST < USRC
  4. D.UDEST >= USRC
Q114
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JZ and JE Instruction Equivalency)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken if the last arithmetic operation produced a zero result (`ZF = 1`), or after a `CMP` instruction if both operands were equal?
๐Ÿ’ป assembly Snippet
cmp ax, bx
je equal_label ; Synonymous with jz equal_label (branches when ZF = 1)
  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 fot This
Q115
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JAE and JNB Jump if Above or Equal)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken after a `CMP` instruction if the unsigned source operand is less than or equal to the unsigned destination operand (i.e., destination >= source)?
๐Ÿ’ป assembly Snippet
cmp ax, bx
jae above_or_equal ; Jumps if AX >= BX (source BX <= destination AX)
  1. A.JAE (Jump if Above or Equal) / JNB (Jump if Not Below)
  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
Q116
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (ADD and ADC Combination)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Numbers of arbitrary bit size (e.g. 32-bit, 64-bit, 128-bit) can be added on a 16-bit processor using a proper combination of which instructions?
๐Ÿ’ป assembly Snippet
add ax, bx ; Add lower 16 bits
adc dx, cx ; Add upper 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
Q117
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (SBB Subtract with Borrow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Like addition with carry (`ADC`), which instruction is used to perform subtraction with borrow for multi-word numbers?
๐Ÿ’ป assembly Snippet
sub ax, bx ; Subtract lower 16 bits
sbb dx, cx ; Subtract upper 16 bits with borrow
  1. A.SWB
  2. B.SBB
  3. C.SBC
  4. D.SBBC
Q118
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (16 Parallel Bitwise AND Operations)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When executing the instruction `and ax, bx` on 16-bit registers, how many individual bitwise AND operations are performed simultaneously?
๐Ÿ’ป 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
Q119
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Bitwise AND Bit Testing and Masking)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which bitwise logical operation is primarily used to test or check whether specific individual bits of a number are set (`1`) or cleared (`0`) using a mask?
๐Ÿ’ป assembly Snippet
and ax, 0x0001 ; 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
Q120
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (XOR Selective Bit Inversion / Toggling)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which bitwise logical operation can be used as a selective masking operation to invert (toggle) specific target bits of a number while leaving other bits unchanged?
๐Ÿ’ป assembly Snippet
xor ax, 0x00FF ; Inverts lower 8 bits of AX, leaves upper 8 bits unchanged
  1. A.AND
  2. B.OR
  3. C.XOR
  4. D.NOT