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 161 โ€“ 170 of 198 Questions
Page 17 of 20
Q161
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ DIV Instruction Operands (32-bit / 16-bit Division)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When a 32-bit dividend is divided by a 16-bit divisor using the DIV instruction (DIV r/m16 with DX:AX holding the dividend), how many bits wide is the resulting quotient register (AX)?
๐Ÿ’ป assembly Snippet
div bx
  1. A.32 bits
  2. B.16 bits
  3. C.8 bits
  4. D.4 bits
Q162
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Indirect Memory Addressing for Runtime Address CalculationEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Whenever access to a memory location is required whose target address cannot be known until runtime, which addressing technique is used?
๐Ÿ’ป assembly Snippet
mov ax, [bx+si]
  1. A.Indirect addressing using base/index registers
  2. B.Direct memory addressing
  3. C.Immediate addressing
  4. D.Register direct addressing
Q163
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ Index Registers for Dynamic Memory AccessEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Whenever access to a memory location is required whose address cannot be determined until runtime, we use an ________ register.
๐Ÿ’ป assembly Snippet
mov ax, [si]
  1. A.Index
  2. B.Flag
  3. C.Accumulator
  4. D.None of the above
Q164
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ SAR (Shift Arithmetic Right) Sign PreservationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
After the execution of the SAR (Shift Arithmetic Right) instruction on a destination register, how is the Most Significant Bit (MSB) treated?
๐Ÿ’ป assembly Snippet
sar ax, 1
  1. A.The MSB is replaced by 0
  2. B.The MSB is replaced by 1
  3. C.The MSB retains its original value
  4. D.The MSB is replaced by the Carry Flag value
Q165
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ 4.1. Shift InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
During a logical or arithmetic left-shift operation (SHL/SAL), into which CPU status flag is the most significant bit (MSB) shifted?
๐Ÿ’ป assembly Snippet
shl ax, 1  ; MSB is shifted into CF
  1. A.Will drop
  2. B.Will go into CF (Carry Flag)
  3. C.Will come to the rightmost bit
  4. D.Will always become 1
Q166
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ 4.1. Shift InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Suppose a decimal number is 35. After shifting its binary representation 2 bits to the left, what is its new decimal value?
๐Ÿ’ป assembly Snippet
mov al, 35   ; AL = 00100011b
shl al, 2    ; AL = 10001100b (140)
  1. A.35
  2. B.70
  3. C.140
  4. D.17
Q167
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ 4.2. Shifting and RotationsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Suppose the decimal number 35 is shifted two bits to the left in binary. What does its new decimal value become?
๐Ÿ’ป assembly Snippet
mov al, 35   ; AL = 00100011b
shl al, 2    ; AL = 10001100b (140 decimal)
  1. A.35
  2. B.70
  3. C.140
  4. D.17
Q168
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ 4.2. Shifting and RotationsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the operation and function of the Rotate Right (ROR) instruction in assembly language.
๐Ÿ’ป assembly Snippet
ror ax, 1
Q169
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ 4.1. Shift InstructionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the key difference between the SHR (Shift Logical Right) and SAR (Shift Arithmetic Right) instructions in assembly language?
๐Ÿ’ป assembly Snippet
shr ax, 1  ; Logical shift right (0 inserted at MSB)
sar ax, 1  ; Arithmetic shift right (sign bit replicated at MSB)
Q170
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 4๐Ÿท๏ธ 4.1. Shift InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
If register BL contains decimal 5, what value will BL contain after executing a logical right shift by 1 bit ('SHR BL, 1')?
๐Ÿ’ป assembly Snippet
mov bl, 5    ; BL = 00000101b
shr bl, 1    ; BL = 00000010b (decimal 2)
  1. A.3
  2. B.2
  3. C.5
  4. D.10