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 91 โ€“ 100 of 261 Questions
Page 10 of 27
Q91
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Register Architecture (FLAGS Register Structure)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 processor architecture, the __________ is bit-wise significant, meaning each individual bit holds a distinct status flag or control signal.
  1. A.AX
  2. B.FS
  3. C.IP
  4. D.Flags Register
Q92
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Register Architecture (Carry Flag Function in Addition)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When two 16-bit numbers are added, the sum can be up to 17 bits long. This extra 17th overflow bit that cannot fit in the 16-bit target register is placed in the __________.
๐Ÿ’ป assembly Snippet
mov ax, 0xFFFF
add ax, 1 ; AX becomes 0x0000, Carry Flag (CF) becomes 1
  1. A.carry flag
  2. B.Parity Flag
  3. C.Auxiliary Carry
  4. D.Zero Flag
Q93
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (Intel Syntax Destination Source Order)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: In Intel x86 assembly language syntax, machine instructions are written in the format `operation destination, source`.
๐Ÿ’ป assembly Snippet
mov ax, bx ; Destination = AX, Source = BX
  1. A.TRUE
  2. B.FALSE
Q94
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (ADD Instruction Execution)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What exact operation is performed when the assembly code `add ax, bx` is executed?
๐Ÿ’ป assembly Snippet
add ax, bx ; AX = AX + BX (AX is updated, BX is unchanged)
  1. A.Add the bx to ax and change the bx
  2. B.Add the ax to bx and change the ax
  3. C.Add the bx to ax and change the ax
  4. D.Add the bx to ax and change nothing
Q95
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (Data Definition Directive DB)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In assembly language data definitions using the `db` (Define Byte) directive (e.g., `num1: db 5`), what size of memory is allocated?
๐Ÿ’ป assembly Snippet
num1: db 5 ; Allocates 1 byte of memory initialized to 5
  1. A.1byte
  2. B.4bit
  3. C.16bit
  4. D.2byte
Q96
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (ADD Instruction Code Commenting)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider the following assembly program snippet: ```assembly [org 0x0100] mov ax, [num1] ; load first number in ax mov bx, [num2] ; load second number in bx add ax, bx ; _________________________ int 0x21 num1: dw 5 num2: dw 10 ``` Which of the following is the most appropriate code comment for line 4 (`add ax, bx`)?
๐Ÿ’ป assembly Snippet
add ax, bx ; accumulate sum in ax
  1. A.No comments will be present
  2. B.; accumulate sum in add
  3. C.; accumulate sum in ax
  4. D.; accumulate sum in bx
Q97
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (String Assembly Data Definitions)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In NASM assembly language, a string or character sequence can be defined using which of the following valid syntax forms?
๐Ÿ’ป assembly Snippet
str1: db 'abc'            ; Enclosed string literal
str2: db 'a', 'b', 'c'    ; Character list
str3: db 0x61, 0x62, 0x63 ; Hexadecimal ASCII bytes
  1. A.db 0x61, 0x61, 0x63
  2. B.db 'a', 'b', 'c'
  3. C.db 'abc'
  4. D.All of the above
Q98
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (DIV 16-Bit Division Quotient in AX)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When performing 16-bit division using `DIV reg16` (dividing the 32-bit dividend in `DX:AX`), where is the resulting 16-bit quotient stored?
๐Ÿ’ป assembly Snippet
div bx ; Quotient stored in AX (16-bit), remainder in DX (16-bit)
  1. A.16bit
  2. B.17bit
  3. C.32bit
  4. D.64bit
Q99
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (DIV Integer Division Characteristics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The division operation performed by the x86 processor via the __________ instruction is integer division (truncating remainders) and not floating-point division.
๐Ÿ’ป assembly Snippet
div bl ; Performs integer division on AX by BL
  1. A.DIV instruction
  2. B.ADC instruction
  3. C.SSB instruction
  4. D.DIVI instruction
Q100
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (MUL Unsigned Multiplication Instruction)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which x86 assembly instruction performs unsigned multiplication of a source operand with the accumulator register (`AL` or `AX`)?
๐Ÿ’ป assembly Snippet
mul bl ; AX = AL * BL (8-bit unsigned multiplication)
mul bx ; DX:AX = AX * BX (16-bit unsigned multiplication)
  1. A.Multi
  2. B.DIV
  3. C.MUL
  4. D.Move