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 21 โ€“ 30 of 216 Questions
Page 3 of 22
Q21
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SHR Bit Shift Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What bit insertion occurs during a Shift Logical Right (`SHR`) operation?
๐Ÿ’ป assembly Snippet
shr ax, 1 ; Inserts 0 into MSB (left), shifts bits right
  1. A.A zero at right
  2. B.A zero at left
  3. C.A one at right
  4. D.A one at left
Q22
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JC and JNC Carry Flag Testing)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which status flag in the FLAGS register is evaluated by the conditional jump instructions `JC` (Jump if Carry) and `JNC` (Jump if No Carry)?
๐Ÿ’ป assembly Snippet
jc carry_set_label ; Jumps if CF == 1
  1. A.carry
  2. B.parity
  3. C.zero
  4. D.sign
Q23
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SAR Signed Division by 2)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
To divide a signed binary integer by 2 efficiently in assembly language, which shift instruction should be used?
๐Ÿ’ป assembly Snippet
sar ax, 1 ; Signed division of AX by 2
  1. A.SHR
  2. B.SAR
  3. C.SHL
  4. D.SAL
Q24
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Unconditional JMP Execution)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, when does an Unconditional Jump instruction (`JMP`) execute its branching control transfer?
๐Ÿ’ป assembly Snippet
jmp label ; Executes jump unconditionally
  1. A.Execute in every condition whether true or false
  2. B.If the condition is true
  3. C.If the condition is false
  4. D.None of the given
Q25
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (Rotate Right ROR Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which rotation operation moves every bit one position to the right, inserts the bit dropped from the rightmost position (LSB) into the leftmost position (MSB), and also copies that bit into the Carry Flag?
๐Ÿ’ป assembly Snippet
ror ax, 1 ; Rotates bits right, LSB copied to MSB and Carry Flag
  1. A.ROL
  2. B.RCR
  3. C.RCL
  4. D.None of the given
Q26
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JA Conditional Jump Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: When executing `JA` (Jump if Above) after a `CMP` instruction, the jump is NOT taken if the unsigned destination operand is larger than the unsigned source operand.
๐Ÿ’ป assembly Snippet
cmp ax, bx
ja label ; Jumps if AX > BX (unsigned)
  1. A.True
  2. B.False
Q27
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SHL vs SAL Identity)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: The x86 assembly instructions `SHL` (Shift Logical Left) and `SAL` (Shift Arithmetic Left) perform identical bitwise operations.
๐Ÿ’ป assembly Snippet
shl ax, 1 ; Same hardware opcode as SAL AX, 1
  1. A.True
  2. B.False
Q28
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (Carry Flag Unsigned Borrow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When performing an unsigned subtraction where a larger source number is subtracted from a smaller destination number (`CMP DEST, SRC`), a borrow is required. Which status flag will be set?
๐Ÿ’ป assembly Snippet
mov ax, 3
cmp ax, 5 ; 3 < 5 -> Requires borrow, sets CF = 1
  1. A.ZF
  2. B.CF
  3. C.SF
  4. D.OF
Q29
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Bit Manipulation (SHR Bit Shift Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which shift operation inserts a zero into the leftmost position (MSB), shifts all bits one position to the right, and copies the exiting rightmost bit (LSB) into the Carry Flag?
๐Ÿ’ป assembly Snippet
shr ax, 1 ; Inserts 0 at left (MSB), shifts right, LSB to Carry Flag
  1. A.SHL
  2. B.SAL
  3. C.SAR
  4. D.None of the given
Q30
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ 6.1. Control Flow Instructions (JO Jump if Overflow)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump instruction is executed if the previous signed arithmetic operation resulted in an unexpected sign change, indicating an overflow condition (`OF = 1`)?
๐Ÿ’ป assembly Snippet
add al, bl
jo overflow_handler ; Jumps if OF == 1 (signed overflow)
  1. A.JO
  2. B.JNO
  3. C.JNZ
  4. D.JZ