What is the primary function of an interrupt in a computer system?
A Pause execution
B Execute multiple instructions
C Transfer data
D Increase CPU speed
Interrupts temporarily halt the CPU’s current task to allow higher-priority tasks to be processed. Once the interrupt is handled, the CPU returns to its previous execution, ensuring prompt handling of urgent tasks.
What does Direct Memory Access (DMA) allow?
A Data transfer to RAM
B CPU to control memory
C Store data permanently
D Data transfer without CPU
DMA allows peripheral devices to transfer data directly to or from memory without involving the CPU. This reduces CPU workload and speeds up data transfers by bypassing the CPU for large data operations.
In which addressing mode are operands specified directly by a constant value?
A Register
B Immediate
C Direct
D Indirect
In the Immediate addressing mode, the operand is directly provided as a constant value within the instruction itself. This eliminates the need to reference memory or registers, simplifying the process.
What is the purpose of microprogramming in computer systems?
A Manage memory access
B Handle data transfers
C Control the CPU’s operations
D Execute instructions directly
Microprogramming allows the CPU to execute complex instructions by breaking them down into simpler micro-operations. It defines how the control unit operates and manages low-level tasks at the hardware level.
Which addressing mode uses a register to store the address of the operand?
A Register
B Direct
C Immediate
D Indirect
In Register addressing mode, the operand’s address is stored in a register. The register points to the memory location of the operand, allowing quick access to data stored in registers.
What does an exception handling mechanism in a computer system do?
A Manage memory allocation
B Handle errors or abnormal events
C Increase processor speed
D Store data permanently
Exception handling ensures that when errors or unexpected conditions occur, the system can handle them gracefully. It enables proper error recovery, ensuring that programs can continue executing without crashing.
In which addressing mode does the operand’s address appear in memory?
A Direct
B Immediate
C Register
D Indirect
In Indirect addressing mode, the instruction contains a pointer to a memory location that holds the actual address of the operand. This adds an extra level of indirection, allowing flexible access to memory.
What is the main advantage of Direct Memory Access (DMA)?
A Increases memory capacity
B Stores data permanently
C Reduces CPU workload
D Accelerates processor speed
DMA reduces CPU workload by allowing peripherals (such as disks or network cards) to transfer data directly to or from memory. This frees the CPU to perform other tasks while data is being transferred.
Which addressing mode is commonly used to access data in a loop with an incremented index?
A Indexed
B Register
C Direct
D Immediate
Indexed addressing mode uses an index register to calculate the address of an operand. It is often used in loops where the operand’s address changes based on an incrementing index, such as in array operations.
Which of the following is typically associated with microprogramming?
A Machine language instructions
B Software interrupts
C Control word generation
D Direct memory access
Microprogramming involves generating control words that guide the operations of the CPU. These control words direct the execution of micro-operations needed to execute machine instructions at a low level.
What is the function of the interrupt vector table?
A Store memory addresses
B Map interrupts to handlers
C Control program execution
D Transfer data between devices
The interrupt vector table stores memory addresses of interrupt service routines (ISRs). When an interrupt occurs, the CPU uses the table to jump to the appropriate ISR to handle the interrupt.
Which addressing mode is used when an operand is specified by a combination of a base register and an index?
A Direct
B Immediate
C Indexed
D Register
Indexed addressing mode uses a base address stored in a register and adds an index value to calculate the actual memory address. This is useful for accessing elements in arrays and data structures.
What happens when a processor encounters an interrupt during normal execution?
A It ignores the interrupt
B It stops executing instructions
C It performs a reset
D It finishes the current instruction and handles the interrupt
When an interrupt occurs, the processor typically completes the current instruction before jumping to the interrupt handler. This ensures that the system remains stable while responding to the interrupt.
Which of the following best describes the immediate addressing mode?
A Operand is a constant value
B Operand is a memory address
C Operand is stored in a register
D Operand is indirectly referenced
In Immediate addressing mode, the operand is a constant value embedded directly within the instruction. This mode eliminates the need for memory or register lookup, improving processing speed.
What does an exception represent in a computer system?
A Normal system operation
B A form of input
C A fault or abnormal condition
D Data transfer event
An exception occurs when a program or the system encounters an error or abnormal condition, such as division by zero or invalid memory access. It is handled by the exception handling mechanism to ensure proper recovery.