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 101 โ€“ 110 of 216 Questions
Page 11 of 22
Q101
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SHR Logical Right Shift Definition)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which type of shift operation is defined as: 'Inserts a zero from the left, moves every bit one position to the right, and copies the rightmost bit into the carry flag'?
๐Ÿ’ป assembly Snippet
shr ax, 1 ; Inserts 0 at MSB, shifts bits right, copies LSB to CF
  1. A.SHL
  2. B.SAL
  3. C.SAR
  4. D.None of the given
Q102
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JO Jump if Overflow Condition)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken if the last signed arithmetic operation produced an unexpected sign change (signed overflow, setting `OF = 1`)?
๐Ÿ’ป assembly Snippet
add al, bl
jo overflow_handler ; Jumps if Overflow Flag OF = 1
  1. A.JO
  2. B.JNO
  3. C.JNZ
  4. D.JZ
Q103
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (RCR Rotate through Carry Right Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which type of rotation operation is defined as: 'The carry flag is inserted from the left into the most significant bit, every bit moves one position to the right, and the rightmost bit is dropped into the carry flag'?
๐Ÿ’ป assembly Snippet
rcr ax, 1 ; Rotates AX right through Carry Flag
  1. A.RCR
  2. B.ROL
  3. C.RCL
  4. D.ROR
Q104
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JP and JPE Parity Even Jump)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is taken if the last arithmetic operation produced a result with even parity (Parity Flag PF = 1)?
๐Ÿ’ป assembly Snippet
test al, al
jpe even_parity_label ; Jumps if AL has an even number of 1 bits
  1. A.JP
  2. B.JPE
  3. C.JNP
  4. D.both JP and JPE
Q105
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SHR Shift Logical Right Diagram)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which shift operation is illustrated by the diagram: `| 0 | --> | 1 | 1 | 0 | 1 | 0 | 0 | 0 | --> | C |`?
๐Ÿ’ป assembly Snippet
shr al, 1 ; Inserts 0 at MSB, shifts bits right, copies LSB to CF
  1. A.Shl
  2. B.sar
  3. C.Shr
  4. D.Sal
Q106
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SHL Shift Logical Left Diagram)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which shift operation is illustrated by the diagram: `| C | <-- | 1 | 1 | 0 | 1 | 0 | 0 | 0 | <-- | 0 |`?
๐Ÿ’ป assembly Snippet
shl al, 1 ; Inserts 0 at LSB, shifts bits left, copies MSB to CF
  1. A.Shl
  2. B.sar
  3. C.Shr
  4. D.Sal
Q107
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Multi-Word Arithmetic (ADC Three Operands)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The `ADC` (Add with Carry) instruction operates on how many total operands (including explicit and implicit operands)?
๐Ÿ’ป assembly Snippet
adc ax, bx ; Destination = AX, Source = BX, Implicit = Carry Flag (CF)
  1. A.two
  2. B.three
  3. C.Five
  4. D.Zero
Q108
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Zero Flag ZF=1 Indicates Equality DEST = SRC)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When executing a subtraction or comparison instruction (`SUB` / `CMP`), if the Zero Flag is set (`ZF = 1`), what does this indicate regarding the destination and source operands?
๐Ÿ’ป assembly Snippet
cmp ax, bx ; Performs AX - BX; if AX == BX, ZF = 1
  1. A.DEST = SRC
  2. B.DEST!= SRC
  3. C.DEST < SRC
  4. D.DEST > SRC
Q109
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Unconditional Jump JMP Definition)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
An instruction that forces program execution to branch to a target address regardless of the state of processor flags is called a(n) __________.
๐Ÿ’ป assembly Snippet
jmp target_label ; Unconditional branch regardless of flags
  1. A.Jump
  2. B.Conditional jump
  3. C.Unconditional jump
  4. D.Stay
Q110
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Unsigned Subtraction Carry / Borrow Flag CF=1)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When an unsigned source operand is subtracted from an unsigned destination operand and the destination is strictly smaller, a borrow is required. Which flag condition is set?
๐Ÿ’ป assembly Snippet
mov ax, 5
cmp ax, 10 ; 5 < 10 -> Requires borrow -> 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