Ch 04: Bit Manipulation and Shifts

198 Questions198 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 121 โ€“ 130 of 198 Questions
Page 13 of 20
Q121
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Multiplication Algorithms and Bit ManipulationMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the basic concept and necessity of multiplication algorithms in 8088 assembly language for performing multi-byte arithmetic operations.
๐Ÿ’ป assembly Snippet
shl ax, 1
add dx, ax
Q122
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Logical Shift Instructions (SHR and SHL/SAL)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the bitwise operation, flag updates, and mathematical effects of Shift Logical Right (SHR) and Shift Logical Left (SHL / SAL) instructions in 8088 assembly language.
๐Ÿ’ป assembly Snippet
shr ax, 1
shl bx, 1
Q123
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Shift Arithmetic Right (SAR) and Sign ExtensionMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Differentiate between Shift Arithmetic Right (SAR) and Shift Logical Right (SHR) in 8088 assembly language, specifically addressing sign preservation for signed integers.
๐Ÿ’ป assembly Snippet
sar ax, 1
shr bx, 1
Q124
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Extended Precision Multiplication AlgorithmHardโญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the software shift-and-add algorithm used in 8088 assembly language to perform 16-bit by 16-bit unsigned multiplication to produce a 32-bit result without using the MUL instruction.
๐Ÿ’ป assembly Snippet
shr bx, 1
jnc skip_add
add ax, cx
adc dx, bp
Q125
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Bitwise Logical Operations (AND, OR, XOR, NOT)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the four basic bitwise logical instructions (AND, OR, XOR, NOT) in 8088 assembly language, specifying operand counts and truth behavior for each.
๐Ÿ’ป assembly Snippet
and ax, bx
or ax, bx
xor ax, bx
not ax
Q126
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Masking Operations and Selective Bit ClearingMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the concept of Masking in 8088 assembly language, detailing how Selective Bit Clearing is performed using the AND instruction.
๐Ÿ’ป assembly Snippet
and al, 0x0F
Q127
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Selective Bit Setting (OR) vs Selective Bit Inversion (XOR)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Compare Selective Bit Setting using the OR instruction with Selective Bit Inversion using the XOR instruction in 8088 assembly language.
๐Ÿ’ป assembly Snippet
or al, 0x80
xor al, 0xFF
Q128
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Selective Bit Testing using AND and TEST InstructionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how the AND or TEST instruction is used for Selective Bit Testing in 8088 assembly language, comparing it with bit testing via bitwise shifts and the Carry Flag.
๐Ÿ’ป assembly Snippet
test al, 0x08
jnz bit3_set
Q129
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Bitwise Shift Operations (SHL) and Arithmetic MultiplicationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Suppose register AL contains the decimal value 5. What decimal value will AL hold after executing two bitwise logical left shifts (SHL AL, 2)?
๐Ÿ’ป assembly Snippet
mov al, 5
shl al, 2
  1. A.5
  2. B.10
  3. C.15
  4. D.20
Q130
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Unsigned Division (DIV) Register RulesMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
For the execution of the 8-bit division instruction 'DIV BL', where is the implied dividend stored prior to division?
๐Ÿ’ป assembly Snippet
mov ax, 100
mov bl, 5
div bl
  1. A.AX register
  2. B.BX register
  3. C.CX register
  4. D.DX register