Ch 03: Branching, Loops and Program Flow

261 Questions261 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 261 Questions
Page 3 of 27
Q21
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Conditional Jumps and Parity FlagEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which conditional jump is taken if the last arithmetic operation produced a result in its destination operand that has even parity (an even number of set 1-bits)?
๐Ÿ’ป assembly Snippet
TEST AL, AL
JPE even_parity_label
  1. A.Both JP and JPE
  2. B.JP
  3. C.JPE
  4. D.JNP
Q22
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Subtraction and Carry/Borrow FlagEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When a larger number is subtracted from a smaller number during unsigned subtraction, a borrow is required. Which status flag will be set?
๐Ÿ’ป assembly Snippet
MOV AL, 5
SUB AL, 10
  1. A.CF
  2. B.ZF
  3. C.SF
  4. D.OF
Q23
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Jump Instructions (Far Jump vs Near Jump)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, a FAR JUMP instruction is position relative. (True/False)
๐Ÿ’ป assembly Snippet
JMP FAR PTR target
  1. A.False
  2. B.True
Q24
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Stack Operations (PUSH and POP)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which x86 stack instruction transfers the 16-bit word from the current top of the stack (addressed by SS:SP) into the destination operand and then increments the Stack Pointer (SP) by 2?
๐Ÿ’ป assembly Snippet
POP AX
  1. A.POP
  2. B.PUSH
  3. C.POPF
  4. D.PUSHF
Q25
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Jump Instructions (Near Jump vs Far Jump)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, a NEAR jump allows branching to any target offset location anywhere within the current code segment. (True/False)
๐Ÿ’ป assembly Snippet
JMP NEAR PTR target
  1. A.True
  2. B.False
Q26
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Subroutines and RET InstructionEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The RET instruction does NOT pop the word at the top of the stack into the Instruction Pointer (IP), but merely increments SP by 2. (True/False)
๐Ÿ’ป assembly Snippet
RET
  1. A.false
  2. B.true
Q27
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Stack Operations (PUSH and POP)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The operations of placing items onto the stack and removing them from the stack are called PUSH and RET. (True/False)
๐Ÿ’ป assembly Snippet
PUSH AX
POP AX
  1. A.false
  2. B.true
Q28
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Stack Operations (PUSH and POP)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The operation of PUSH for the instruction `PUSH AX` executes as `SP <- SP + 2` followed by `[SP] <- AX`. (True/False)
๐Ÿ’ป assembly Snippet
PUSH AX
  1. A.false
  2. B.true
Q29
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Subroutines and Calling ConventionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In standard C calling convention (cdecl), parameters pushed onto the stack for a subroutine call are cleared from the stack by the ________.
๐Ÿ’ป assembly Snippet
PUSH 10
PUSH 20
CALL my_func
ADD SP, 4
  1. A.caller
  2. B.callee
  3. C.caller and callee
  4. D.none of given
Q30
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Jump Instructions (Short, Near, Far)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, what are the primary types of jump instructions available?
๐Ÿ’ป assembly Snippet
JMP SHORT target
JMP NEAR PTR target
JMP FAR PTR target
  1. A.short, near, far
  2. B.Short, near
  3. C.Near, far
  4. D.short, far