Unit 3: Central Processing Unit - Practice Quiz

CSE211 — Computer Organization And Design 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 A stack follows which order of data access?

Stack Organization Easy
A. First In First Out (FIFO)
B. Last In First Out (LIFO)
C. Random Access Order (RAO)
D. First In Last Serve (FILS)

2 The two basic operations performed on a stack are:

Stack Organization Easy
A. ADD and SUB
B. READ and WRITE
C. LOAD and STORE
D. PUSH and POP

3 The register that holds the address of the top element of a stack is called the:

Stack Organization Easy
A. Memory Address Register (MAR)
B. Program Counter (PC)
C. Stack Pointer (SP)
D. Instruction Register (IR)

4 Which arithmetic expression notation is naturally suited for stack-based evaluation?

Stack Organization Easy
A. Reverse Polish Notation (postfix)
B. Infix Notation
C. Prefix Notation
D. Decimal Notation

5 In a general register organization, the connections between registers and the ALU are commonly established using:

General Register Organization Easy
A. Direct memory mapping
B. An interrupt line
C. A single dedicated wire
D. A common bus system

6 What is the main advantage of using a large number of CPU registers?

General Register Organization Easy
A. Reduced number of memory accesses
B. Increased memory size
C. Larger word length
D. Slower instruction execution

7 In immediate addressing mode, the operand is:

Addressing Modes Easy
A. Located in a memory address
B. Stored in a general register
C. Specified within the instruction itself
D. Pointed to by the stack pointer

8 In register addressing mode, the operand is present in:

Addressing Modes Easy
A. A CPU register
B. The instruction field
C. The stack
D. The main memory

9 Which addressing mode uses the address field of the instruction to point to a memory location that contains the address of the operand?

Addressing Modes Easy
A. Direct addressing mode
B. Implied addressing mode
C. Indirect addressing mode
D. Immediate addressing mode

10 The addressing mode in which the operand is implicitly defined by the instruction is called:

Addressing Modes Easy
A. Indexed addressing mode
B. Direct addressing mode
C. Implied addressing mode
D. Relative addressing mode

11 RISC stands for:

Reduced instruction set computer Easy
A. Rapid Instruction Set Computer
B. Reduced Instruction Set Computer
C. Reduced Internal System Computer
D. Random Instruction Sequence Computer

12 Which of the following is a characteristic of a RISC processor?

Reduced instruction set computer Easy
A. Large number of complex instructions
B. Instructions of variable length
C. Fixed-length instructions
D. Many different addressing modes

13 CISC stands for:

Complex instruction set computer Easy
A. Complex Instruction Set Computer
B. Compact Instruction Sequence Computer
C. Complete Internal System Computer
D. Combined Instruction Set Computer

14 Which feature is typically associated with CISC architecture?

Complex instruction set computer Easy
A. A single addressing mode
B. Only register-to-register operations
C. Variable-length instructions
D. Fixed-length simple instructions

15 The portion of an instruction that specifies the operation to be performed is called the:

Instruction formats Easy
A. Mode field
B. Opcode
C. Operand
D. Address field

16 An instruction format that uses no address field for operands and relies on a stack is called a:

Instruction formats Easy
A. Zero-address instruction
B. One-address instruction
C. Two-address instruction
D. Three-address instruction

17 Which data transfer scheme allows I/O devices to transfer data to memory without continuous CPU involvement?

Data Transfer Schemes Easy
A. Direct Memory Access (DMA)
B. Programmed I/O
C. Immediate transfer
D. Register transfer

18 The register that holds the address of the next instruction to be executed is the:

Program Control and Interrupts Easy
A. Stack Pointer (SP)
B. Program Counter (PC)
C. Accumulator (AC)
D. Instruction Register (IR)

19 An interrupt is best described as a:

Program Control and Interrupts Easy
A. Memory addressing mode
B. Signal that temporarily halts normal program execution
C. Permanent stop of the processor
D. Type of arithmetic instruction

20 The Processor Status Word (PSW) primarily stores:

Processor status word Easy
A. The next instruction address
B. The current operand value
C. Status flags and control bits
D. The stack top address

21 In a general register organization, a microoperation such as is executed. Which control fields are minimally required to specify this operation in a single control word?

General Register Organization Medium
A. Two source select fields, one destination select field, and one ALU operation field
B. Three destination select fields only
C. One source select field and one ALU operation field
D. Two ALU operation fields and one source field

22 A CPU has 8 general-purpose registers. How many bits are required for each of the SELA, SELB, and SELD fields in the control word?

General Register Organization Medium
A. 4 bits each
B. 3 bits each
C. 2 bits each
D. 8 bits each

23 In a memory stack where SP points to the top item and the stack grows toward lower addresses, which sequence correctly represents a PUSH operation?

Stack Organization Medium
A. ; then
B. ; then
C. ; then
D. ; then

24 The arithmetic expression is written in Reverse Polish Notation (postfix). Which is correct?

Stack Organization Medium
A.
B.
C.
D.

25 An instruction uses register indirect addressing. If register R contains 4000 and memory location 4000 contains 6000, what is the effective address of the operand?

Addressing Modes Medium
A. 4000
B. 10000
C. R itself
D. 6000

26 A relative addressing mode instruction has an address field of 500. If the program counter (PC) holds 700 at the time of execution, what is the effective address?

Addressing Modes Medium
A. 200
B. 500
C. 1200
D. 700

27 Which addressing mode is most suitable for accessing successive elements of an array by incrementing a register between accesses?

Addressing Modes Medium
A. Direct addressing
B. Autoincrement (register indirect with increment)
C. Implied mode
D. Immediate mode

28 In indexed addressing mode, the effective address is computed as which of the following?

Addressing Modes Medium
A. Address field + content of index register
B. Address field + program counter
C. Address field only
D. Content of index register only

29 In a typical RISC architecture, which characteristic is a direct consequence of using a load/store design?

Reduced instruction set computer Medium
A. Only load and store instructions access memory; ALU operations use registers
B. All ALU operations can access memory directly
C. Complex instructions are microprogrammed
D. Instructions have variable lengths for flexibility

30 Overlapped register windows in RISC processors are used primarily to achieve which benefit?

Reduced instruction set computer Medium
A. Fast parameter passing during procedure calls
B. Direct memory addressing for all operands
C. Larger instruction opcodes
D. Variable-length instruction encoding

31 Which of the following is a defining feature of a CISC architecture compared to RISC?

Complex instruction set computer Medium
A. Fixed-length instructions and a load/store model
B. Variable-length instructions and many addressing modes
C. Single-cycle execution for all instructions
D. Very large uniform register set with windows

32 Why do CISC processors typically rely on microprogrammed control units?

Complex instruction set computer Medium
A. Microprogramming eliminates the need for registers
B. It reduces the total number of instructions to one
C. Microcode makes all instructions execute in one cycle
D. Complex, variable instructions are easier to implement with microcode

33 A computer has a 32-bit instruction with a 6-bit opcode. If the remaining bits form a single memory address field, what is the maximum directly addressable memory?

Instruction formats Medium
A. locations
B. locations
C. locations
D. locations

34 Evaluating on a zero-address (stack) machine requires which instructions in order?

Instruction formats Medium
A. LOAD A, ADD B, MUL C, STORE X
B. ADD A B, MUL C, STORE X
C. PUSH A, PUSH B, ADD, PUSH C, MUL, POP X
D. MOV A, ADD B, MUL C

35 In a three-address instruction format, the statement is typically expressed as which single instruction?

Instruction formats Medium
A. ; ;
B. ; ;
C. followed by
D.

36 In which data transfer scheme does the CPU repeatedly check a status flag to determine if a device is ready, wasting CPU cycles while waiting?

Data Transfer Schemes Medium
A. Programmed I/O
B. Interrupt-driven I/O
C. Memory-mapped I/O
D. Direct memory access (DMA)

37 During DMA transfer, how does the DMA controller obtain access to the system bus from the CPU?

Data Transfer Schemes Medium
A. By using a dedicated arithmetic instruction
B. By polling the CPU status register
C. By issuing a software interrupt instruction
D. Through bus request and bus grant handshaking signals

38 When an interrupt is acknowledged, what must the CPU save before transferring control to the interrupt service routine?

Program Control and Interrupts Medium
A. Just the interrupt vector number
B. The entire main memory contents
C. Only the accumulator content
D. The return address and processor status

39 In a vectored interrupt system, how is the address of the interrupt service routine determined?

Program Control and Interrupts Medium
A. The interrupting device supplies a vector identifying the ISR address
B. The ISR is always located at a fixed single address
C. The programmer manually enters the address at runtime
D. The CPU polls all devices sequentially to find the ISR

40 After the subtraction is performed in the ALU, which status flag in the processor status word is set?

Processor status word Medium
A. Zero (Z) flag
B. Sign (S) flag
C. Overflow (V) flag
D. Carry (C) flag

41 A stack-organized CPU evaluates the postfix expression A B C * + D - using only PUSH and arithmetic operations that pop two operands. If the stack is initially empty, what is the maximum number of elements present on the stack at any point during evaluation?

Stack Organization Hard
A. 2
B. 3
C. 4
D. 5

42 An instruction uses indexed addressing with EA = base + (index register R1). R1 holds , base field is , and memory word at contains , while contains . What value is loaded into the accumulator?

Addressing Modes Hard
A.
B.
C.
D.

43 A processor has a 32-bit instruction, 64 opcodes, and three register operand fields addressing 32 registers each. How many bits remain for an immediate/displacement field?

Instruction formats Hard
A. 11 bits
B. 7 bits
C. 9 bits
D. 13 bits

44 In a classic RISC pipeline, a load instruction is immediately followed by an instruction that uses the loaded register. Without forwarding, how many stall (bubble) cycles are typically required assuming a 5-stage pipeline where data is available only after the MEM stage?

Reduced instruction set computer Hard
A. 2
B. 1
C. 3
D. 0

45 Which characteristic most fundamentally distinguishes a CISC memory-to-memory ADD MEM1, MEM2, MEM3 instruction from a RISC equivalent?

Complex instruction set computer Hard
A. A single CISC instruction performs multiple memory accesses and the ALU operation, requiring variable multi-cycle execution
B. RISC can also directly add three memory operands in one instruction
C. CISC uses fixed-length encoding for all such instructions
D. CISC always executes such instructions in exactly one clock cycle

46 A polled interrupt system checks 8 devices in priority order every polling cycle. If the highest-priority device raises frequent requests, which problem is most likely to occur for the lowest-priority device?

Program Control and Interrupts Hard
A. Immediate service due to round-robin fairness
B. Deadlock between the two devices
C. Loss of the interrupt vector table
D. Starvation, as lower-priority devices may rarely be serviced

47 After computing in an 8-bit signed ALU, which combination of PSW flags is correctly set?

Processor status word Hard
A. Overflow=1, Sign=0, Carry=1, Zero=0
B. Overflow=1, Sign=1, Carry=0, Zero=0
C. Overflow=0, Sign=0, Carry=0, Zero=1
D. Overflow=0, Sign=1, Carry=1, Zero=0

48 In cycle-stealing DMA, a device transfers 2000 words while the CPU runs a program. Each DMA word transfer steals one bus cycle from the CPU. What is the primary effect on the CPU compared to burst-mode DMA?

Data Transfer Schemes Hard
A. CPU continues executing but is slowed, as the bus is released after each single word transfer
B. CPU speed increases due to reduced memory contention
C. CPU loses its program counter contents
D. CPU is completely halted until all 2000 words are transferred

49 A CPU has a register file with two read ports and one write port feeding an ALU whose output returns to the file. To execute R3 <- R1 + R2 in one clock, what is the minimum requirement on the bus/port structure?

General Register Organization Hard
A. Three write ports and one read port
B. Two source buses to the ALU and one destination bus back, all active in the same cycle
C. A single shared bus used sequentially three times
D. Only one read port since operands can share it

50 A branch instruction at address uses PC-relative addressing with a signed displacement of . The instruction is 4 bytes long and PC is incremented before displacement is added. What is the branch target address?

Addressing Modes Hard
A.
B.
C.
D.

51 A memory stack grows toward lower addresses with SP pointing to the last item pushed. After executing PUSH then POP once each on an initially empty stack (SP = ), what is the final value of SP, assuming word size of 1?

Stack Organization Hard
A.
B.
C.
D.

52 A machine supports zero-, one-, and two-address instructions using expanding opcodes in a 16-bit format with 4-bit register fields. If there are 14 two-address instructions and 31 one-address instructions, how many zero-address instructions can be encoded?

Instruction formats Hard
A. 32
B. 15
C. 31
D. 16

53 During a vectored interrupt, the interrupting device supplies information that the CPU uses to determine the service routine address. What is this supplied information most precisely called?

Program Control and Interrupts Hard
A. The full ISR machine code
B. The saved program counter value
C. An interrupt vector or pointer to the ISR address
D. The device's data register contents

54 RISC architectures use large register windows with overlapping registers primarily to optimize which operation?

Reduced instruction set computer Hard
A. Passing parameters during procedure calls without memory access
B. Instruction decoding of variable-length opcodes
C. Floating-point division
D. Interrupt vector lookup

55 Compare programmed I/O and interrupt-driven I/O for a slow device. Which statement is most accurate regarding CPU utilization?

Data Transfer Schemes Hard
A. Both keep the CPU equally idle during transfers
B. Interrupt-driven I/O frees the CPU during waiting, while programmed I/O wastes cycles busy-waiting on status
C. Interrupt-driven I/O requires the CPU to continuously poll the status register
D. Programmed I/O always achieves higher throughput than interrupt-driven I/O

56 A conditional branch BGT (branch if greater than, signed) tests PSW flags. Which flag condition correctly implements signed greater-than after a CMP A, B (A - B)?

Processor status word Hard
A. Zero=0 AND (Sign = Overflow)
B. Zero=1 AND Sign=0
C. Carry=0 only
D. Sign=1 AND Overflow=0

57 A microoperation control word for a general register CPU has fields SELA (3 bits), SELB (3 bits), SELD (3 bits), and OPR (5 bits). How many distinct source-register combinations and ALU operations can this word specify (SELA × SELB × OPR)?

General Register Organization Hard
A.
B.
C.
D.

58 Which addressing mode is most suitable for implementing position-independent code, where the same program can run correctly regardless of where it is loaded in memory?

Addressing Modes Hard
A. Immediate addressing
B. Absolute (direct) addressing
C. Register direct addressing
D. PC-relative addressing

59 A CISC processor implements instructions via microprogrammed control. What is the primary trade-off compared to RISC hardwired control?

Complex instruction set computer Hard
A. Microprogramming always executes faster than hardwired control
B. Microprogramming eliminates the need for an instruction decoder
C. Microprogramming eases complex instruction implementation but adds control-store access latency
D. Hardwired control cannot implement any conditional branch

60 When a maskable interrupt occurs while the interrupt-enable flag is cleared (masked), what is the correct CPU behavior?

Program Control and Interrupts Hard
A. The CPU is forced to service it immediately regardless of the mask
B. The CPU resets and clears the program counter
C. The interrupt is converted into a non-maskable interrupt
D. The request is ignored or held pending until the enable flag is set