Computer Architecture & Assembly Language MCQs with Answers
Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.
Chapter: 2
Q41:
What is the purpose of using mov bx, num1 in an assembly program?
A. To move a value to BX register
B. To initialize BX with a constant
C. To point BX to the first number in an array
D. To perform an arithmetic operation
Correct Answer:
C
Chapter: 2
Q42:
What does the instruction add bx, 2 do in the context of an assembly program?
A. Adds 2 to the value in BX
B. Advances BX to the next memory location
C. Increments the value in memory by 2
D. Points BX to the next byte
Correct Answer:
B
Chapter: 2
Q43:
Which register is commonly used as a counter in loops in assembly language?
A. AX
B. BX
C. CX
D. DX
Correct Answer:
C
Chapter: 2
Q44:
What does the instruction jnz l1 do?
A. Jumps to label l1 if the zero flag is not set
B. Jumps to label l1 if the zero flag is set
C. Jumps unconditionally to label l1
D. Jumps to label l1 if the carry flag is set
Correct Answer:
A
Chapter: 2
Q45:
What addressing mode is used when an array base is added to BX containing an array index?
A. Direct Addressing
B. Indirect Addressing
C. Register + Offset Addressing
D. Immediate Addressing
Correct Answer:
C
Chapter: 2
Q46:
What is the significance of the segment override prefix in assembly language?
A. It changes the operand size
B. It modifies the default segment association for an instruction
C. It changes the addressing mode
D. It alters the memory access method
Correct Answer:
B
Chapter: 2
Q47:
What happens during segment wraparound?
A. The program throws an error
B. The segment value is reset to zero
C. The effective address calculation carries over
D. Accesses beyond the segment limit wrap around to the start of the segment
Correct Answer:
D
Chapter: 2
Q48:
How many addressing modes does the iAPX88 processor support?
A. Five
B. Six
C. Seven
D. Eight
Correct Answer:
C
Chapter: 2
Q49:
What happens if you attempt to use a part of a register to access memory (e.g., BL or BH)?
A. The operation succeeds normally
B. The operation fails due to illegal instruction
C. The assembler will guess the size
D. The operation will execute with a warning
Correct Answer:
B
Chapter: 2
Q50:
What type of jump is represented by the instruction jnz in assembly language?
A. Conditional Jump
B. Unconditional Jump
C. Direct Jump
D. Indexed Jump
Correct Answer:
A
Chapter: 2
Q51:
In the context of register indirect addressing, which register was used to access the memory in the example provided?
A. AX
B. BX
C. CX
D. DX
Correct Answer:
B
Chapter: 3
Q52:
What does the CMP instruction do in assembly language?
A. Adds two operands
B. Subtracts source from destination
C. Multiplies two operands
D. Divides two operands
Correct Answer:
B
Chapter: 3
Q53:
Which flag is set when two equal numbers are subtracted using CMP?
A. Carry Flag
B. Zero Flag
C. Sign Flag
D. Overflow Flag
Correct Answer:
B
Chapter: 3
Q54:
Which flag indicates a borrow is needed during subtraction in CMP?
A. Sign Flag
B. Zero Flag
C. Carry Flag
D. Overflow Flag
Correct Answer:
C
Chapter: 3
Q55:
How are signed numbers represented in assembly language?
A. One’s complement
B. Two’s complement
C. BCD
D. ASCII
Correct Answer:
B
Chapter: 3
Q56:
What does the JZ (Jump if Zero) instruction do?
A. Jumps if the carry flag is set
B. Jumps if the zero flag is set
C. Jumps if the sign flag is set
D. Jumps if the overflow flag is set
Correct Answer:
B
Chapter: 3
Q57:
Which instruction is used to perform an unconditional jump?
A. JNZ
B. JE
C. JMP
D. JCXZ
Correct Answer:
C
Chapter: 3
Q58:
What happens when the CMP instruction is used with unsigned numbers?
A. The carry flag is ignored
B. The sign flag is used
C. The carry flag is used
D. The overflow flag is checked
Correct Answer:
C
Chapter: 3
Q59:
In a signed comparison, which flags are used to determine if a number is less?
A. Zero Flag and Carry Flag
B. Sign Flag and Overflow Flag
C. Parity Flag and Zero Flag
D. Carry Flag and Sign Flag
Correct Answer:
B
Chapter: 3
Q60:
Which instruction would you use to jump if two numbers are not equal?
A. JE
B. JZ
C. JNE
D. JG
Correct Answer:
C