Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
A stack is a LIFO structure where the last item pushed is the first one to be popped.
Question 2 of 60 · Stack Organization · Easy
The two basic operations performed on a stack are:
Not quite. Try another option.
Answer: PUSH and POP
PUSH inserts an item onto the stack and POP removes the top item from the stack.
Question 3 of 60 · Stack Organization · Easy
The register that holds the address of the top element of a stack is called the:
Not quite. Try another option.
Answer: Stack Pointer (SP)
The Stack Pointer (SP) always points to the address of the top element of the stack.
Question 4 of 60 · Stack Organization · Easy
Which arithmetic expression notation is naturally suited for stack-based evaluation?
Not quite. Try another option.
Answer: Reverse Polish Notation (postfix)
Reverse Polish (postfix) notation can be evaluated directly using a stack without needing parentheses.
Question 5 of 60 · General Register Organization · Easy
In a general register organization, the connections between registers and the ALU are commonly established using:
Not quite. Try another option.
Answer: A common bus system
A common bus system is used to transfer data among registers and the ALU efficiently.
Question 6 of 60 · General Register Organization · Easy
What is the main advantage of using a large number of CPU registers?
Not quite. Try another option.
Answer: Reduced number of memory accesses
Registers store operands close to the ALU, reducing frequent and slower memory accesses.
Question 7 of 60 · Addressing Modes · Easy
In immediate addressing mode, the operand is:
Not quite. Try another option.
Answer: Specified within the instruction itself
In immediate addressing mode, the actual operand value is part of the instruction.
Question 8 of 60 · Addressing Modes · Easy
In register addressing mode, the operand is present in:
Not quite. Try another option.
Answer: A CPU register
In register addressing mode, the operand resides in one of the CPU registers named in the instruction.
Question 9 of 60 · Addressing Modes · Easy
Which addressing mode uses the address field of the instruction to point to a memory location that contains the address of the operand?
Not quite. Try another option.
Answer: Indirect addressing mode
In indirect addressing, the instruction's address field gives the location that stores the operand's effective address.
Question 10 of 60 · Addressing Modes · Easy
The addressing mode in which the operand is implicitly defined by the instruction is called:
Not quite. Try another option.
Answer: Implied addressing mode
In implied mode, the operand is specified implicitly, such as in the instruction which clears the accumulator.
Question 11 of 60 · Reduced instruction set computer · Easy
RISC stands for:
Not quite. Try another option.
Answer: Reduced Instruction Set Computer
RISC stands for Reduced Instruction Set Computer, characterized by a small set of simple instructions.
Question 12 of 60 · Reduced instruction set computer · Easy
Which of the following is a characteristic of a RISC processor?
Not quite. Try another option.
Answer: Fixed-length instructions
RISC processors use fixed-length instructions to simplify decoding and enable pipelining.
Question 13 of 60 · Complex instruction set computer · Easy
CISC stands for:
Not quite. Try another option.
Answer: Complex Instruction Set Computer
CISC stands for Complex Instruction Set Computer, having a large and varied set of instructions.
Question 14 of 60 · Complex instruction set computer · Easy
Which feature is typically associated with CISC architecture?
Not quite. Try another option.
Answer: Variable-length instructions
CISC architectures support variable-length instructions and many addressing modes for flexibility.
Question 15 of 60 · Instruction formats · Easy
The portion of an instruction that specifies the operation to be performed is called the:
Not quite. Try another option.
Answer: Opcode
The opcode (operation code) field specifies which operation the instruction performs.
Question 16 of 60 · Instruction formats · Easy
An instruction format that uses no address field for operands and relies on a stack is called a:
Not quite. Try another option.
Answer: Zero-address instruction
Zero-address instructions use an implied stack for operands, so no explicit address field is needed.
Question 17 of 60 · Data Transfer Schemes · Easy
Which data transfer scheme allows I/O devices to transfer data to memory without continuous CPU involvement?
Not quite. Try another option.
Answer: Direct Memory Access (DMA)
DMA lets an I/O device transfer data directly to or from memory, freeing the CPU during the transfer.
Question 18 of 60 · Program Control and Interrupts · Easy
The register that holds the address of the next instruction to be executed is the:
Not quite. Try another option.
Answer: Program Counter (PC)
The Program Counter (PC) holds the address of the next instruction to be fetched and executed.
Question 19 of 60 · Program Control and Interrupts · Easy
An interrupt is best described as a:
Not quite. Try another option.
Answer: Signal that temporarily halts normal program execution
An interrupt is a signal that causes the CPU to suspend its current task and service the interrupting event.
Question 20 of 60 · Processor status word · Easy
The Processor Status Word (PSW) primarily stores:
Not quite. Try another option.
Answer: Status flags and control bits
The PSW holds status flags (such as carry, zero, sign, and overflow) and control bits reflecting the processor state.
Question 21 of 60 · General Register Organization · Medium
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?
Not quite. Try another option.
Answer: Two source select fields, one destination select field, and one ALU operation field
The operation reads two source registers (R2, R3), performs an ALU addition, and writes to a destination register (R1). Thus two source selectors (SELA, SELB), one destination selector (SELD), and one operation code (OPR) are needed.
Question 22 of 60 · General Register Organization · Medium
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?
Not quite. Try another option.
Answer: 3 bits each
To select 1 of 8 registers, bits are needed for each selection field.
Question 23 of 60 · Stack Organization · Medium
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?
Not quite. Try another option.
Answer: ; then
When a stack grows toward lower addresses, PUSH first decrements SP, then stores the data at the new top-of-stack location.
Question 24 of 60 · Stack Organization · Medium
The arithmetic expression is written in Reverse Polish Notation (postfix). Which is correct?
Not quite. Try another option.
Answer:
In postfix, operands precede operators. becomes , becomes , and their product becomes .
Question 25 of 60 · Addressing Modes · Medium
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?
Not quite. Try another option.
Answer: 4000
In register indirect mode, the register holds the effective address of the operand. R = 4000, so the effective address is 4000 (the operand is the value stored there, 6000).
Question 26 of 60 · Addressing Modes · Medium
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?
Not quite. Try another option.
Answer: 1200
In relative addressing, the effective address is the sum of the address field and the PC content: .
Question 27 of 60 · Addressing Modes · Medium
Which addressing mode is most suitable for accessing successive elements of an array by incrementing a register between accesses?
Not quite. Try another option.
Answer: Autoincrement (register indirect with increment)
Autoincrement mode accesses the operand pointed to by a register and then increments the register, making it ideal for stepping through consecutive array elements.
Question 28 of 60 · Addressing Modes · Medium
In indexed addressing mode, the effective address is computed as which of the following?
Not quite. Try another option.
Answer: Address field + content of index register
Indexed addressing adds the value in the index register to the address field of the instruction to form the effective address, useful for array traversal.
Question 29 of 60 · Reduced instruction set computer · Medium
In a typical RISC architecture, which characteristic is a direct consequence of using a load/store design?
Not quite. Try another option.
Answer: Only load and store instructions access memory; ALU operations use registers
RISC uses a load/store model where memory is accessed only via dedicated load and store instructions, while arithmetic and logic operations operate exclusively on registers.
Question 30 of 60 · Reduced instruction set computer · Medium
Overlapped register windows in RISC processors are used primarily to achieve which benefit?
Not quite. Try another option.
Answer: Fast parameter passing during procedure calls
Overlapping register windows let the output registers of a calling procedure serve as the input registers of the called procedure, enabling fast parameter passing without memory access.
Question 31 of 60 · Complex instruction set computer · Medium
Which of the following is a defining feature of a CISC architecture compared to RISC?
Not quite. Try another option.
Answer: Variable-length instructions and many addressing modes
CISC designs employ variable-length instructions, numerous addressing modes, and complex multi-cycle instructions, often implemented through microprogramming.
Question 32 of 60 · Complex instruction set computer · Medium
Why do CISC processors typically rely on microprogrammed control units?
Not quite. Try another option.
Answer: Complex, variable instructions are easier to implement with microcode
The wide variety of complex, multi-step CISC instructions is more practical to implement via microprogrammed control than hardwired logic, which suits simpler RISC instruction sets.
Question 33 of 60 · Instruction formats · Medium
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?
Not quite. Try another option.
Answer: locations
With 32 total bits and 6 bits for the opcode, bits remain for the address, giving addressable locations.
Question 34 of 60 · Instruction formats · Medium
Evaluating on a zero-address (stack) machine requires which instructions in order?
Not quite. Try another option.
Answer: PUSH A, PUSH B, ADD, PUSH C, MUL, POP X
A zero-address machine uses the stack: push A and B, add them, push C, multiply, then pop the result to X.
Question 35 of 60 · Instruction formats · Medium
In a three-address instruction format, the statement is typically expressed as which single instruction?
Not quite. Try another option.
Answer:
A three-address instruction specifies two source operands and a destination in one instruction: means .
Question 36 of 60 · Data Transfer Schemes · Medium
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?
Not quite. Try another option.
Answer: Programmed I/O
In programmed I/O, the CPU continuously polls the device status flag and remains busy waiting until the device is ready, which wastes processor time.
Question 37 of 60 · Data Transfer Schemes · Medium
During DMA transfer, how does the DMA controller obtain access to the system bus from the CPU?
Not quite. Try another option.
Answer: Through bus request and bus grant handshaking signals
The DMA controller asserts a bus request (HOLD); the CPU relinquishes the bus and responds with a bus grant (HLDA), allowing DMA to transfer data directly to/from memory.
Question 38 of 60 · Program Control and Interrupts · Medium
When an interrupt is acknowledged, what must the CPU save before transferring control to the interrupt service routine?
Not quite. Try another option.
Answer: The return address and processor status
To resume the interrupted program correctly, the CPU saves the return address (next PC) and the processor status word before servicing the interrupt.
Question 39 of 60 · Program Control and Interrupts · Medium
In a vectored interrupt system, how is the address of the interrupt service routine determined?
Not quite. Try another option.
Answer: The interrupting device supplies a vector identifying the ISR address
In a vectored interrupt, the interrupting device provides a vector (identifier) that the CPU uses to directly locate the corresponding service routine address, avoiding polling.
Question 40 of 60 · Processor status word · Medium
After the subtraction is performed in the ALU, which status flag in the processor status word is set?
Not quite. Try another option.
Answer: Zero (Z) flag
The result of , so the Zero flag is set to 1 to indicate the ALU output is zero; the sign flag stays 0 for a non-negative result.
Question 41 of 60 · Stack Organization · Hard
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?
Not quite. Try another option.
Answer: 3
Trace: PUSH A (1), PUSH B (2), PUSH C (3) — peak here. * pops B,C pushes result (2). + pops A,result pushes (1). PUSH D (2). - pops (1). Maximum depth reached is .
Question 42 of 60 · Addressing Modes · Hard
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?
Not quite. Try another option.
Answer:
Indexed addressing computes , then loads the operand stored at that effective address, which is . It does not perform a second indirection.
Question 43 of 60 · Instruction formats · Hard
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?
Not quite. Try another option.
Answer: 11 bits
Opcode needs bits; each register field needs bits, so three fields use bits. Remaining bits.
Question 44 of 60 · Reduced instruction set computer · Hard
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?
Not quite. Try another option.
Answer: 1
The load-use hazard requires the dependent instruction to wait until the loaded value is available. In a 5-stage pipeline (IF, ID, EX, MEM, WB) with the standard load-delay slot, exactly stall cycle is needed even without forwarding when write/read overlap in WB/ID.
Question 45 of 60 · Complex instruction set computer · Hard
Which characteristic most fundamentally distinguishes a CISC memory-to-memory ADD MEM1, MEM2, MEM3 instruction from a RISC equivalent?
Not quite. Try another option.
Answer: A single CISC instruction performs multiple memory accesses and the ALU operation, requiring variable multi-cycle execution
CISC memory-to-memory operations combine several memory reads/writes and computation into one instruction, taking a variable number of cycles. RISC uses load/store: memory operands must first be loaded into registers.
Question 46 of 60 · Program Control and Interrupts · Hard
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?
Not quite. Try another option.
Answer: Starvation, as lower-priority devices may rarely be serviced
Fixed-priority polling always services the highest-priority requester first. Under heavy high-priority load, low-priority devices can be indefinitely delayed — a classic starvation scenario.
Question 47 of 60 · Processor status word · Hard
After computing in an 8-bit signed ALU, which combination of PSW flags is correctly set?
Not quite. Try another option.
Answer: Overflow=1, Sign=1, Carry=0, Zero=0
. Result is nonzero (Zero=0), MSB=1 (Sign=1), no carry out of bit 7 (Carry=0), but two positives yielding a negative sets signed Overflow=1.
Question 48 of 60 · Data Transfer Schemes · Hard
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?
Not quite. Try another option.
Answer: CPU continues executing but is slowed, as the bus is released after each single word transfer
Cycle stealing transfers one word per bus acquisition, returning control to the CPU between words. The CPU keeps running but experiences slowdown, unlike burst mode which holds the bus for the whole block.
Question 49 of 60 · General Register Organization · Hard
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?
Not quite. Try another option.
Answer: Two source buses to the ALU and one destination bus back, all active in the same cycle
Single-cycle register-to-register operation needs both operands read simultaneously (two read ports/source buses) and the result written back (one write port/destination bus) within one clock.
Question 50 of 60 · Addressing Modes · Hard
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?
Not quite. Try another option.
Answer:
PC is incremented to first, then displacement added: .
Question 51 of 60 · Stack Organization · Hard
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?
Not quite. Try another option.
Answer:
PUSH decrements SP to and stores; POP reads then increments SP back to . A matched push/pop pair restores SP to its original value.
Question 52 of 60 · Instruction formats · Hard
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?
Not quite. Try another option.
Answer: 16
16 opcode combinations exist for the leading 4 bits; 14 used for two-address leaves 2, giving one-address slots. Using 31 leaves 1, giving zero-address instructions.
Question 53 of 60 · Program Control and Interrupts · Hard
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?
Not quite. Try another option.
Answer: An interrupt vector or pointer to the ISR address
In vectored interrupts the device provides a vector (an index or address) that the CPU uses to locate the ISR entry in the interrupt vector table. It does not send the routine code itself.
Question 54 of 60 · Reduced instruction set computer · Hard
RISC architectures use large register windows with overlapping registers primarily to optimize which operation?
Not quite. Try another option.
Answer: Passing parameters during procedure calls without memory access
Overlapping register windows let the outgoing registers of a caller become the incoming registers of the callee, enabling fast parameter passing across procedure calls while avoiding stack/memory traffic.
Question 55 of 60 · Data Transfer Schemes · Hard
Compare programmed I/O and interrupt-driven I/O for a slow device. Which statement is most accurate regarding CPU utilization?
Not quite. Try another option.
Answer: Interrupt-driven I/O frees the CPU during waiting, while programmed I/O wastes cycles busy-waiting on status
Programmed I/O forces the CPU to poll the status flag in a loop, wasting cycles. Interrupt-driven I/O lets the CPU do other work and responds only when the device signals readiness.
Question 56 of 60 · Processor status word · Hard
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)?
Not quite. Try another option.
Answer: Zero=0 AND (Sign = Overflow)
Signed requires the result nonzero (Zero=0) and Sign flag equal to Overflow flag (), which correctly handles overflow cases in signed comparison.
Question 57 of 60 · General Register Organization · Hard
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)?
Not quite. Try another option.
Answer:
3-bit fields select registers each, and the 5-bit OPR selects operations. Thus combinations.
Question 58 of 60 · Addressing Modes · Hard
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?
Not quite. Try another option.
Answer: PC-relative addressing
PC-relative addressing computes targets as offsets from the current PC, so the code works correctly no matter where it is loaded. Absolute addressing hardcodes locations, breaking position independence.
Question 59 of 60 · Complex instruction set computer · Hard
A CISC processor implements instructions via microprogrammed control. What is the primary trade-off compared to RISC hardwired control?
Microprogrammed control simplifies designing complex, variable instructions by storing microcode, but fetching microinstructions from the control store adds latency versus fast hardwired logic used in RISC.
Question 60 of 60 · Program Control and Interrupts · Hard
When a maskable interrupt occurs while the interrupt-enable flag is cleared (masked), what is the correct CPU behavior?
Not quite. Try another option.
Answer: The request is ignored or held pending until the enable flag is set
A masked (disabled) maskable interrupt is not serviced immediately; it is either ignored or latched as pending until software re-enables interrupts. Only non-maskable interrupts bypass the mask.
That's unit 3
Answer a few questions and your score shows up here.
Nearly through. Did unit 3 of CSE211 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 3 of CSE211 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.