Back to Practice Microprocessors

Interrupts - Practice MCQs for CCAT

50 Questions Section C: Hardware Microprocessors

Interrupts Question Bank for C-CAT

Topic-wise Interrupts MCQs for CDAC C-CAT preparation with answers and explanations.

Q1.
Hardware interrupt is:
AGenerated by software
BGenerated by external device
CAlways ignored
DSame as exception
Show Answer & Explanation

Correct Answer: B - Generated by external device

Hardware interrupts come from external devices (keyboard, timer).

Q2.
Software interrupt is:
AFrom external device
BCannot be executed
CGenerated by instruction (INT n)
DHardware signal
Show Answer & Explanation

Correct Answer: C - Generated by instruction (INT n)

Software interrupts are executed by INT instruction.

Q3.
Maskable interrupt can be:
ANever disabled
BDisabled by software
CAlways active
DNot available
Show Answer & Explanation

Correct Answer: B - Disabled by software

Maskable interrupts can be enabled/disabled by software.

Q4.
Non-maskable interrupt (NMI):
ACan be disabled
BNever occurs
CIs software interrupt
DCannot be disabled
Show Answer & Explanation

Correct Answer: D - Cannot be disabled

NMI cannot be disabled - highest priority hardware interrupt.

Q5.
Interrupt vector table stores:
AData
BAddresses of ISRs
CProgram code
DStack
Show Answer & Explanation

Correct Answer: B - Addresses of ISRs

IVT contains addresses of Interrupt Service Routines.

Q6.
In 8086, IVT is at:
AEnd of memory
BROM only
CRandom location
DStarting at address 0
Show Answer & Explanation

Correct Answer: D - Starting at address 0

8086 IVT is at memory locations 00000H to 003FFH.

Q7.
Each interrupt vector in 8086 is:
A2 bytes
B1 byte
C8 bytes
D4 bytes
Show Answer & Explanation

Correct Answer: D - 4 bytes

Each vector is 4 bytes (2 bytes offset + 2 bytes segment).

Q8.
8086 has how many interrupt types?
A128
B256
C512
D64
Show Answer & Explanation

Correct Answer: B - 256

8086 supports 256 interrupt types (0-255).

Q9.
IRET instruction:
AReturns from ISR
BCalls interrupt
CMasks interrupt
DGenerates interrupt
Show Answer & Explanation

Correct Answer: A - Returns from ISR

IRET returns from interrupt service routine.

Q10.
CLI instruction:
AClears interrupt flag (disables interrupts)
BClears carry flag
CClears direction flag
DCalls interrupt
Show Answer & Explanation

Correct Answer: A - Clears interrupt flag (disables interrupts)

CLI clears IF, disabling maskable interrupts.

Q11.
What is a software interrupt?
AInterrupt triggered by executing an instruction
BInterrupt from external device
CInterrupt from timer
DInterrupt during software installation
Show Answer & Explanation

Correct Answer: A - Interrupt triggered by executing an instruction

Software interrupt is generated by executing specific instructions (like INT in x86) rather than external hardware.

Q12.
What happens when an interrupt occurs?
AProgram terminates
BCPU saves state and jumps to ISR
CComputer restarts
DInterrupt is ignored
Show Answer & Explanation

Correct Answer: B - CPU saves state and jumps to ISR

When interrupt occurs, CPU saves current state (flags, PC), then jumps to the Interrupt Service Routine.

Q13.
What is interrupt priority?
AOrder of interrupt wiring
BInterrupt importance to user
CSpeed of interrupt handling
DOrder in which multiple simultaneous interrupts are handled
Show Answer & Explanation

Correct Answer: D - Order in which multiple simultaneous interrupts are handled

Interrupt priority determines which interrupt is serviced first when multiple interrupts occur simultaneously.

Q14.
What is the purpose of the Interrupt Flag (IF)?
AIndicates interrupt occurred
BEnables or disables maskable interrupts
CShows interrupt type
DCounts interrupts
Show Answer & Explanation

Correct Answer: B - Enables or disables maskable interrupts

Interrupt Flag controls whether maskable interrupts are enabled (IF=1) or disabled (IF=0).

Q15.
What are the RST instructions in 8085?
AReset instructions
BSoftware interrupts that jump to fixed locations
CRegister storage
DReturn stack
Show Answer & Explanation

Correct Answer: B - Software interrupts that jump to fixed locations

RST (Restart) are 1-byte software interrupt instructions that jump to specific memory locations (RST 0-7).

Q16.
What is interrupt latency?
ATime between two interrupts
BInterrupt waiting time in queue
CTime to complete ISR
DTime from interrupt request to ISR execution start
Show Answer & Explanation

Correct Answer: D - Time from interrupt request to ISR execution start

Interrupt latency is the delay between interrupt assertion and when ISR begins executing.

Q17.
What is nested interrupt?
AInterrupt inside a loop
BMultiple interrupts at same time
CHigher priority interrupt interrupting current ISR
DInterrupt in nested function
Show Answer & Explanation

Correct Answer: C - Higher priority interrupt interrupting current ISR

Nested interrupt occurs when a higher priority interrupt interrupts an ISR that is already executing.

Q18.
What is the function of PIC (Programmable Interrupt Controller)?
AManages multiple interrupt requests and prioritizes them
BGenerates interrupts
CPrograms interrupt handlers
DCounts interrupts
Show Answer & Explanation

Correct Answer: A - Manages multiple interrupt requests and prioritizes them

PIC accepts interrupt requests from multiple devices, prioritizes them, and sends one interrupt to CPU.

Q19.
What is polling in interrupt handling?
ACPU checking devices sequentially to find interrupt source
BAutomatic interrupt detection
CVoting for interrupt priority
DInterrupt sampling
Show Answer & Explanation

Correct Answer: A - CPU checking devices sequentially to find interrupt source

Polling is when CPU sequentially checks each device to identify which one caused the interrupt.

Q20.
What is vectored interrupt?
AInterrupt with multiple targets
BInterrupt where device provides address of its ISR
CInterrupt in vector processor
DInterrupt using vector table
Show Answer & Explanation

Correct Answer: B - Interrupt where device provides address of its ISR

In vectored interrupt, the interrupting device provides the address or vector number of its ISR.

Q21.
What is the purpose of the EI instruction in 8085?
AEnd Interrupt
BExecute Immediately
CEnable Interrupts
DExit Instruction
Show Answer & Explanation

Correct Answer: C - Enable Interrupts

EI (Enable Interrupt) sets the interrupt enable flip-flop, allowing maskable interrupts to be recognized.

Q22.
What is the purpose of the DI instruction in 8085?
ADisable Interrupts
BDirect Interrupt
CDelay Interrupt
DDivide Immediate
Show Answer & Explanation

Correct Answer: A - Disable Interrupts

DI (Disable Interrupt) clears the interrupt enable flip-flop, preventing maskable interrupts.

Q23.
What is an interrupt acknowledge cycle?
ACPU acknowledging completion of ISR
BInterrupt controller acknowledging device
CCPU responding to interrupt request by reading vector
DUser acknowledging interrupt
Show Answer & Explanation

Correct Answer: C - CPU responding to interrupt request by reading vector

Interrupt acknowledge cycle is when CPU responds to interrupt request by signaling acknowledgment and reading interrupt vector.

Q24.
What is the difference between edge-triggered and level-triggered interrupts?
ANo difference
BLevel is more accurate
CEdge is faster
DEdge detects signal transition, level detects signal state
Show Answer & Explanation

Correct Answer: D - Edge detects signal transition, level detects signal state

Edge-triggered activates on signal transition (rising/falling edge). Level-triggered activates while signal is at specific level.

Q25.
What is the STI instruction in x86?
AStore Interrupt
BStop Interrupt
CStart Interrupt
DSet Interrupt Flag (enable interrupts)
Show Answer & Explanation

Correct Answer: D - Set Interrupt Flag (enable interrupts)

STI (Set Interrupt Flag) enables maskable interrupts by setting the IF flag to 1.

Q26.
How many hardware interrupts does the 8085 microprocessor have?
A3
B4
C5
D8
Show Answer & Explanation

Correct Answer: C - 5

The 8085 has 5 hardware interrupts: TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR. TRAP is non-maskable while the other four are maskable.

Q27.
What is the priority order of interrupts in 8085 from highest to lowest?
ATRAP > RST 7.5 > RST 6.5 > RST 5.5 > INTR
BINTR > RST 5.5 > RST 6.5 > RST 7.5 > TRAP
CRST 7.5 > RST 6.5 > RST 5.5 > TRAP > INTR
DTRAP > INTR > RST 7.5 > RST 6.5 > RST 5.5
Show Answer & Explanation

Correct Answer: A - TRAP > RST 7.5 > RST 6.5 > RST 5.5 > INTR

The priority order from highest to lowest is: TRAP > RST 7.5 > RST 6.5 > RST 5.5 > INTR. TRAP has the highest priority as it is non-maskable.

Q28.
Which instruction is used to enable maskable interrupts in the 8085?
AEI
BRIM
CSIM
DDI
Show Answer & Explanation

Correct Answer: A - EI

EI (Enable Interrupt) sets the interrupt enable flip-flop, allowing the 8085 to accept maskable interrupts (RST 7.5, RST 6.5, RST 5.5, and INTR).

Q29.
What is the vector address of the RST 6.5 interrupt?
A002CH
B003CH
C0034H
D0024H
Show Answer & Explanation

Correct Answer: C - 0034H

RST 6.5 has a vector address of 0034H. The vector address is calculated as: interrupt number × 8 = 6.5 × 8 = 52 = 34H.

Q30.
The TRAP interrupt in 8085 is vectored to which address?
A0000H
B0034H
C0024H
D003CH
Show Answer & Explanation

Correct Answer: C - 0024H

TRAP is vectored to address 0024H. It is the highest priority interrupt and is both edge and level triggered. Its vector address is fixed at 0024H.

Q31.
Which instruction is used to set the interrupt mask in 8085?
AEI
BDI
CSIM
DRIM
Show Answer & Explanation

Correct Answer: C - SIM

SIM (Set Interrupt Mask) is used to set the mask for RST 7.5, RST 6.5, and RST 5.5 interrupts. It also controls the SOD (Serial Output Data) line.

Q32.
In the 8085, RST 7.5 is what type of interrupt?
AEdge triggered only
BLevel triggered only
CBoth edge and level triggered
DSoftware interrupt
Show Answer & Explanation

Correct Answer: A - Edge triggered only

RST 7.5 is edge triggered (positive edge). It has an internal flip-flop that is set on the rising edge of the interrupt signal and must be reset using SIM instruction.

Q33.
What happens when the 8085 accepts an INTR interrupt?
AIt jumps to a fixed vector address
BIt halts execution permanently
CIt resets the processor
DIt expects the interrupting device to provide an instruction via data bus
Show Answer & Explanation

Correct Answer: D - It expects the interrupting device to provide an instruction via data bus

INTR is a non-vectored interrupt. When accepted, the 8085 sends INTA signal and expects the external device to place an instruction (usually RST n) on the data bus.

Q34.
The RIM instruction in 8085 is used to:
ARead interrupt masks and pending interrupts
BReset interrupt masks
CReturn from interrupt
DRestore interrupt context
Show Answer & Explanation

Correct Answer: A - Read interrupt masks and pending interrupts

RIM (Read Interrupt Mask) reads the status of interrupt masks (M7.5, M6.5, M5.5), pending interrupts, interrupt enable status, and SID (Serial Input Data) into the accumulator.

Q35.
After a hardware interrupt is acknowledged in 8085, what is automatically disabled?
AAll hardware pins
BThe stack pointer
CThe interrupt system (interrupt enable flip-flop)
DThe program counter
Show Answer & Explanation

Correct Answer: C - The interrupt system (interrupt enable flip-flop)

When an interrupt is acknowledged, the interrupt enable flip-flop is automatically reset, disabling further interrupts. EI must be executed in the ISR to re-enable interrupts.

Q36.
How many interrupt types are available in the 8086?
A8
B256
C128
D16
Show Answer & Explanation

Correct Answer: B - 256

The 8086 supports 256 interrupt types (INT 0 to INT 255). Each interrupt type has a 4-byte vector stored in the Interrupt Vector Table at memory addresses 00000H to 003FFH.

Q37.
Where is the Interrupt Vector Table (IVT) located in the 8086?
AAt the end of memory
BAt address 00000H to 003FFH
CIn ROM only
DIn the 8259 PIC
Show Answer & Explanation

Correct Answer: B - At address 00000H to 003FFH

The IVT in 8086 occupies the first 1 KB of memory (00000H to 003FFH). It contains 256 entries, each 4 bytes (2 bytes for IP, 2 bytes for CS).

Q38.
Which 8086 interrupt is triggered on division by zero?
AINT 0
BINT 1
CINT 2
DINT 3
Show Answer & Explanation

Correct Answer: A - INT 0

INT 0 (Divide Error) is automatically triggered when a DIV or IDIV instruction results in division by zero or when the quotient exceeds the destination register size.

Q39.
What is the NMI interrupt in the 8086?
AINT 0
BINT 1
CINT 3
DINT 2
Show Answer & Explanation

Correct Answer: D - INT 2

INT 2 is the Non-Maskable Interrupt (NMI) in the 8086. It is triggered via the NMI pin and cannot be disabled by software. It is typically used for critical events.

Q40.
In 8085, what is the vector address of RST 5.5?
A0024H
B003CH
C0034H
D002CH
Show Answer & Explanation

Correct Answer: D - 002CH

RST 5.5 has a vector address of 002CH. The vector address = 5.5 × 8 = 44 = 2CH.

Q41.
Which flag in the 8086 enables single-step execution for debugging?
AInterrupt Flag (IF)
BTrap Flag (TF)
CDirection Flag (DF)
DOverflow Flag (OF)
Show Answer & Explanation

Correct Answer: B - Trap Flag (TF)

The Trap Flag (TF) enables single-step mode. When TF=1, the processor generates an INT 1 (single-step interrupt) after each instruction for debugging purposes.

Q42.
What does the DI instruction do in the 8085?
ADisables TRAP interrupt
BDisables all interrupts including TRAP
CDisables all maskable interrupts
DDelays the next interrupt
Show Answer & Explanation

Correct Answer: C - Disables all maskable interrupts

DI (Disable Interrupt) resets the interrupt enable flip-flop, preventing the processor from accepting maskable interrupts. TRAP cannot be disabled by DI.

Q43.
In the SIM instruction of 8085, bit D3 (MSE) must be set to 1 to:
AEnable serial output
BEnable masking of interrupts using bits D0-D2
CReset RST 7.5 flip-flop
DRead the interrupt status
Show Answer & Explanation

Correct Answer: B - Enable masking of interrupts using bits D0-D2

MSE (Mask Set Enable, bit D3) must be 1 for the mask bits (D0=M5.5, D1=M6.5, D2=M7.5) to take effect. If MSE=0, the mask bits are ignored.

Q44.
Which bit in the SIM instruction is used to reset the RST 7.5 flip-flop?
AD4 (R7.5)
BD3 (MSE)
CD5
DD7 (SOD)
Show Answer & Explanation

Correct Answer: A - D4 (R7.5)

Bit D4 (R7.5) in the SIM instruction is used to reset the RST 7.5 edge-triggered flip-flop. Setting this bit clears any pending RST 7.5 interrupt.

Q45.
In 8086, the Interrupt Flag (IF) controls:
ANon-maskable interrupts
BSoftware interrupts
CMaskable hardware interrupts via INTR pin
DInternal exceptions
Show Answer & Explanation

Correct Answer: C - Maskable hardware interrupts via INTR pin

The Interrupt Flag (IF) enables or disables maskable hardware interrupts arriving on the INTR pin. STI sets IF=1 (enable), CLI sets IF=0 (disable). NMI and software interrupts are unaffected.

Q46.
What is the size of each interrupt vector entry in the 8086 IVT?
A2 bytes
B8 bytes
C4 bytes
D16 bytes
Show Answer & Explanation

Correct Answer: C - 4 bytes

Each entry in the 8086 IVT is 4 bytes: 2 bytes for the offset (IP) stored at the lower address, and 2 bytes for the segment (CS) stored at the higher address.

Q47.
RST 6.5 and RST 5.5 in the 8085 are which type of interrupts?
AEdge triggered
BNon-maskable
CBoth edge and level triggered
DLevel triggered
Show Answer & Explanation

Correct Answer: D - Level triggered

RST 6.5 and RST 5.5 are level triggered interrupts. The interrupt signal must remain active (high) until acknowledged. Unlike RST 7.5 which is edge triggered.

Q48.
What is saved on the stack when an interrupt is accepted in the 8085?
AOnly the program counter
BOnly the accumulator
CPC and all registers
DPC and flag register
Show Answer & Explanation

Correct Answer: A - Only the program counter

When an interrupt is accepted, only the Program Counter (PC) is automatically saved on the stack. Registers and flags must be saved manually by the programmer in the ISR using PUSH instructions.

Q49.
In the 8086, the IRET instruction is used to:
AInitialize interrupt table
BIgnore return address
CReset all interrupt flags
DReturn from an interrupt service routine
Show Answer & Explanation

Correct Answer: D - Return from an interrupt service routine

IRET (Interrupt Return) pops IP, CS, and the flags register from the stack to return from an interrupt service routine. It restores the processor state to continue normal execution.

Q50.
Which of the following is a software interrupt in the 8085?
ATRAP
BRST 5
CRST 7.5
DINTR
Show Answer & Explanation

Correct Answer: B - RST 5

RST 0 through RST 7 are software interrupts (1-byte CALL instructions) in the 8085. RST 5 causes a jump to address 0028H (5 × 8 = 40 = 28H). TRAP, RST 7.5, and INTR are hardware interrupts.

Showing 1-10 of 50 questions