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 131 โ€“ 140 of 261 Questions
Page 14 of 27
Q131
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (ADD Instruction Execution)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Executing the instruction `ADD AX, BX` performs which calculation?
๐Ÿ’ป assembly Snippet
add ax, bx ; AX = AX + BX
  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
Q132
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (Data Directives db Byte Allocation)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In assembly language data definitions using the `db` (Define Byte) directive, what is the allocated memory size for each data element?
๐Ÿ’ป assembly Snippet
num1: db 5 ; Allocates 1 byte of memory
  1. A.1byte
  2. B.4bit
  3. C.16bit
  4. D.2byte
Q133
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (ADD Instruction Commenting and Execution)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider the following x86 assembly code 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 ``` What is the most appropriate inline code comment for line 4 (`add ax, bx`)?
๐Ÿ’ป assembly Snippet
add ax, bx ; accumulate sum in ax
  1. A.No comments Will be
  2. B.; accumulate sum in add
  3. C.; accumulate sum in ax
  4. D.; accumulate sum in Bx
Q134
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (String Data Definition Directives db)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following syntax declarations using the `db` directive validly defines character strings in assembly language?
๐Ÿ’ป assembly Snippet
str1: db 'abc' ; Equivalent to db 'a', 'b', 'c' or db 0x61, 0x62, 0x63
  1. A.db 0x61, 0x61, 0x63
  2. B.db 'a', 'b', 'c'
  3. C.db 'abc'
  4. D.All of the above
Q135
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (16-Bit DIV Quotient in AX)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When performing 16-bit division using `DIV reg16`, the instruction divides the 32-bit implied dividend in `DX:AX` by the 16-bit operand and stores the __________ quotient in register `AX`.
๐Ÿ’ป assembly Snippet
div bx ; DX:AX / BX -> Quotient in AX, Remainder in DX
  1. A.16bit
  2. B.17bit
  3. C.32bit
  4. D.64bit
Q136
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (DIV Unsigned Integer Division)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, division performed by the __________ instruction is integer division (truncating remainders) rather than floating-point division.
๐Ÿ’ป assembly Snippet
div cx ; Performs integer division
  1. A.DIV instruction
  2. B.ADC instruction
  3. C.SSB instruction
  4. D.DIVI instruction
Q137
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (MUL Unsigned Multiplication Instruction)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which x86 instruction performs unsigned multiplication of a source operand with the implicit accumulator register (`AL` or `AX`)?
๐Ÿ’ป assembly Snippet
mul bx ; Unsigned 16-bit multiplication: DX:AX = AX * BX
  1. A.Multi
  2. B.DIV
  3. C.MUL
  4. D.Move
Q138
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (Data Directives db 8-Bit Allocation)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
To reserve or define 8 bits (1 byte) of memory in assembly language, which data directive is used?
๐Ÿ’ป assembly Snippet
var1: db 0x55 ; Allocates 8 bits (1 byte) initialized to 0x55
  1. A.db
  2. B.dw
  3. C.dn
  4. D.dd
Q139
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (Source vs Destination Operands)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the assembly instruction `mov ax, 5`, the literal constant `5` serves as the __________ operand.
๐Ÿ’ป assembly Snippet
mov ax, 5 ; ax = destination, 5 = source operand
  1. A.source
  2. B.destination
  3. C.memory
  4. D.register
Q140
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Basic Assembly Instructions (8-Bit DIV Implied Dividend in AX)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When executing the 8-bit division instruction `DIV BL`, where must the 16-bit implied dividend be stored prior to execution?
๐Ÿ’ป assembly Snippet
mov ax, 100 ; Implied 16-bit dividend in AX
mov bl, 5   ; 8-bit divisor in BL
div bl      ; AL = AX / BL (20), AH = AX % BL (0)
  1. A.AX
  2. B.BX
  3. C.CX
  4. D.DX