Computer Architecture & Assembly Language MCQs with Answers
Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.
Chapter: 4
Q81:
In binary multiplication, what is done if the multiplier bit is 1?
A. The multiplicand is subtracted
B. The multiplicand is added to the result
C. The multiplicand is ignored
D. The result is multiplied by 2
Correct Answer:
B
Chapter: 4
Q82:
Which instruction should be used for division by 2 for signed numbers?
A. SHR
B. SAR
C. RCL
D. SHL
Correct Answer:
B
Chapter: 4
Q83:
In the multiplication algorithm, what happens when a 0 bit is encountered in the multiplier?
A. The multiplicand is added to the result
B. The multiplicand is shifted left by one position
C. The multiplicand is multiplied by 2
D. No addition is performed
Correct Answer:
D
Chapter: 4
Q84:
Which flag is checked to determine the least significant bit (LSB) during right shifting?
A. Zero Flag
B. Carry Flag
C. Overflow Flag
D. Sign Flag
Correct Answer:
B
Chapter: 4
Q85:
What is the primary purpose of shift operations in a processor?
A. To simplify complex algorithms
B. To perform arithmetic addition
C. To invert bit values
D. To rotate bits within a register
Correct Answer:
A
Chapter: 4
Q86:
What does the SHR instruction do in assembly language?
A. Multiplies by 2
B. Divides by 2
C. Adds 1
D. Subtracts 1
Correct Answer:
B
Chapter: 4
Q87:
Which instruction is used to skip addition if the bit is zero?
A. JMP
B. ADD
C. JNZ
D. JNC
Correct Answer:
D
Chapter: 4
Q88:
How many bits are initialized for multiplication in the start label?
A. 4
B. 8
C. 16
D. 32
Correct Answer:
C
Chapter: 4
Q89:
In the context of extended multiplication, what is the purpose of the ADC instruction?
A. Adds without carry
B. Subtracts with borrow
C. Adds with carry
D. Multiplies by 2
Correct Answer:
C
Chapter: 4
Q90:
Which instruction in assembly language inverts all bits of a byte or word?
A. XOR
B. AND
C. NOT
D. OR
Correct Answer:
C
Chapter: 4
Q91:
How is the TEST instruction different from AND?
A. It changes the destination operand
B. It does not change the destination operand
C. It only sets flags
D. Both B and C
Correct Answer:
D
Chapter: 4
Q92:
What is the result of the operation XOR AX, BX when both AX and BX have the same value?
A. All bits set to 1
B. All bits set to 0
C. AX is added to BX
D. AX is subtracted from BX
Correct Answer:
B
Chapter: 4
Q93:
In the extended shifting operation, what happens to the most significant bit of the lower word during a left shift?
A. It is added to the result
B. It is pushed into the least significant bit of the next word
C. It is discarded
D. It is set to 1
Correct Answer:
B
Chapter: 4
Q94:
When performing selective bit clearing using AND, what does the mask contain?
A. 1s at positions to clear and 0s at positions to retain
B. 0s at positions to clear and 1s at positions to retain
C. 1s at positions to set and 0s at positions to clear
D. 0s at positions to set and 1s at positions to clear
Correct Answer:
B
Chapter: 4
Q95:
How does the SBB instruction function in extended subtraction?
A. Adds with carry
B. Subtracts with borrow
C. Adds with borrow
D. Subtracts without borrow
Correct Answer:
B
Chapter: 4
Q96:
In the given multiplication algorithm, why is the JNZ instruction used?
A. To terminate the program
B. To repeat the loop until bits are left
C. To skip the addition step
D. To test a specific bit
Correct Answer:
B
Chapter: 4
Q97:
What is the primary advantage of using XOR in cryptography and image processing?
A. It is a reversible operation
B. It inverts all bits
C. It is faster than other operations
D. It can clear specific bits
Correct Answer:
A
Chapter: 4
Q98:
Which operation would you use to test a specific bit in a number without altering it?
A. SHL
B. AND
C. TEST
D. JNC
Correct Answer:
C
Chapter: 4
Q99:
What happens when the MOV instruction is used to transfer data from src to dest in the extended addition algorithm?
A. The value of src is added to dest
B. The value of dest is subtracted from src
C. The value of src is transferred to dest
D. The value of dest is multiplied by src
Correct Answer:
C
Chapter: 4
Q100:
What is the purpose of the SHL instruction in assembly language?
A. Shift bits to the left
B. Shift bits to the right
C. Set all bits to 1
D. Set all bits to 0
Correct Answer:
A