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.
An instruction code is a group of bits that instruct the computer to perform a specific operation. Which part of the instruction code specifies the operation to be performed?
Not quite. Try another option.
Answer: Operation code
The operation code (opcode) is the portion of an instruction code that specifies which operation the computer must perform, such as add, subtract, or load.
Question 2 of 60 · Instruction codes · Easy
In a basic computer, an instruction code is generally divided into how many main parts?
Not quite. Try another option.
Answer: Two parts
An instruction code is commonly divided into two parts: the operation code (opcode) and the address of the operand.
Question 3 of 60 · Instruction codes · Easy
The number of bits required for the operation code depends on the total number of what?
Not quite. Try another option.
Answer: Operations available
If a computer supports operations, then bits are needed for the opcode to represent all operations.
Question 4 of 60 · Computer registers · Easy
Which register holds the address of the next instruction to be executed?
Not quite. Try another option.
Answer: Program Counter (PC)
The Program Counter (PC) stores the memory address of the next instruction to be fetched and executed.
Question 5 of 60 · Computer registers · Easy
In the basic computer, which register is used to hold an operand read from memory?
Not quite. Try another option.
Answer: Data Register (DR)
The Data Register (DR) holds the operand or data value read from memory during instruction execution.
Question 6 of 60 · Computer registers · Easy
Which register in the basic computer holds the address of a memory location being accessed?
Not quite. Try another option.
Answer: Address Register (AR)
The Address Register (AR) holds the address of the memory location currently being read from or written to.
Question 7 of 60 · Computer registers · Easy
Which register holds the instruction that is currently being executed?
Not quite. Try another option.
Answer: Instruction Register (IR)
The Instruction Register (IR) holds the instruction code that has been fetched from memory and is currently being decoded and executed.
Question 8 of 60 · Common bus system · Easy
What is the main purpose of a common bus system in a computer?
Not quite. Try another option.
Answer: To transfer data among registers and memory
A common bus system provides a shared set of lines used to transfer information between registers and memory, reducing the number of connections.
Question 9 of 60 · Common bus system · Easy
In a common bus system, only one register can place its data on the bus at a time. This is controlled by what?
Not quite. Try another option.
Answer: Selection lines
Selection (control) lines determine which register's output is placed on the common bus at any given time, preventing conflicts.
Question 10 of 60 · Common bus system · Easy
If a common bus has selection lines , how many registers or units can be selected?
Not quite. Try another option.
Answer: 8
With 3 selection lines, different sources can be selected to place their contents on the bus.
Question 11 of 60 · Computer instructions · Easy
The basic computer instructions are generally classified into how many categories?
Not quite. Try another option.
Answer: Three categories
Basic computer instructions are classified into three types: memory-reference, register-reference, and input-output instructions.
Question 12 of 60 · Computer instructions · Easy
Which type of instruction does not require a memory address to operate?
Not quite. Try another option.
Answer: Register-reference instruction
Register-reference instructions operate on data in registers and do not need a memory address, so the address field is used to specify the operation.
Question 13 of 60 · Computer instructions · Easy
A memory-reference instruction uses one bit to indicate what?
Not quite. Try another option.
Answer: Direct or indirect addressing
In a memory-reference instruction, a mode bit (often labeled ) specifies whether the addressing is direct or indirect.
Question 14 of 60 · Timing and control · Easy
The timing signals in a basic computer are generated by which component?
Not quite. Try another option.
Answer: Sequence counter and decoder
A sequence counter (SC) along with a decoder generates the timing signals that control the sequence of operations.
Question 15 of 60 · Timing and control · Easy
Which of the following is a type of control unit organization?
Not quite. Try another option.
Answer: Microprogrammed control
The two main types of control unit are hardwired control and microprogrammed control; microprogrammed control uses stored microinstructions.
Question 16 of 60 · Timing and control · Easy
In timing and control, the master clock generator produces what?
Not quite. Try another option.
Answer: Clock pulses
The master clock generator produces a continuous train of clock pulses that synchronize all operations in the computer.
Question 17 of 60 · Instruction cycle · Easy
The first phase of an instruction cycle is to do what?
Not quite. Try another option.
Answer: Fetch the instruction from memory
An instruction cycle begins with the fetch phase, where the instruction is read from memory using the address in the PC.
Question 18 of 60 · Instruction cycle · Easy
After an instruction is fetched, what is the next step in the instruction cycle?
Not quite. Try another option.
Answer: Decode the instruction
Following the fetch phase, the control unit decodes the instruction to determine which operation to perform.
Question 19 of 60 · Input-output and interrupt · Easy
What is the main purpose of an interrupt in a computer system?
Not quite. Try another option.
Answer: To signal the CPU that a device needs attention
An interrupt is a signal that temporarily halts the current program so the CPU can respond to an event, such as an I/O device requiring service.
Question 20 of 60 · LMC (simulation software) · Easy
In the Little Man Computer (LMC) model, which component is used to perform arithmetic operations?
Not quite. Try another option.
Answer: Calculator (accumulator)
In the LMC model, the calculator acts as the accumulator where arithmetic operations such as addition and subtraction are performed.
Question 21 of 60 · Instruction codes · Medium
In a basic computer with a memory of 4096 words, each instruction uses a 12-bit address field and a 3-bit opcode with 1 addressing-mode bit. How many bits are unused for the memory-reference instruction format if the word size is 16 bits?
Not quite. Try another option.
Answer: 0 bits
The format uses 1 bit (mode) + 3 bits (opcode) + 12 bits (address) = 16 bits, exactly matching the word size, so no bits are unused.
Question 22 of 60 · Instruction codes · Medium
In the basic computer, the operation code (opcode) field is 3 bits wide. How many distinct memory-reference operations can be directly encoded before requiring register-reference or I/O instruction formats?
Not quite. Try another option.
Answer: 7
With a 3-bit opcode, codes exist, but code is reserved for register-reference and I/O instructions, leaving 7 for memory-reference operations.
Question 23 of 60 · Computer registers · Medium
In the basic computer, the Program Counter (PC) and Address Register (AR) are both which width?
Not quite. Try another option.
Answer: 12 bits
Since memory has 4096 words, addresses need bits, so both PC and AR are 12 bits wide.
Question 24 of 60 · Computer registers · Medium
Which register in the basic computer holds the instruction currently being executed?
Not quite. Try another option.
Answer: IR (Instruction Register)
The Instruction Register (IR) holds the opcode and fields of the instruction read from memory during the fetch phase.
Question 25 of 60 · Computer registers · Medium
The INPR and OUTR registers in the basic computer are how many bits wide, matching a single character?
Not quite. Try another option.
Answer: 8 bits
INPR (input register) and OUTR (output register) are 8 bits each, since they hold one character for serial I/O transfer.
Question 26 of 60 · Common bus system · Medium
In the basic computer's common bus system with 8 registers plus memory selected by 3 bits (), which selection value places memory contents onto the bus?
Not quite. Try another option.
Answer:
In Mano's design, selection means no register (bus idle) and places memory (M) contents on the bus; the seven registers use through depending on the mapping, with memory at .
Question 27 of 60 · Common bus system · Medium
How many selection lines are needed to choose one of the sources connected to a common bus that links 7 registers and memory (8 sources)?
Not quite. Try another option.
Answer: 3 lines
To select one of 8 sources, a multiplexer needs selection lines.
Question 28 of 60 · Common bus system · Medium
In a common bus system built from multiplexers, what is the main advantage over a system with dedicated point-to-point connections between all registers?
Not quite. Try another option.
Answer: Fewer wires and reduced hardware cost
A common bus shares one set of lines among all registers, drastically reducing the number of interconnections and hardware compared to dedicated paths.
Question 29 of 60 · Computer instructions · Medium
The instruction (clear accumulator) in the basic computer is an example of which instruction type?
Not quite. Try another option.
Answer: Register-reference instruction
CLA operates only on the accumulator without accessing memory, so it is a register-reference instruction (opcode with mode bit ).
Question 30 of 60 · Computer instructions · Medium
For a memory-reference instruction, if the addressing mode bit , what type of addressing is used?
Not quite. Try another option.
Answer: Indirect addressing
When , the address field points to a memory location that contains the effective address, i.e., indirect addressing.
Question 31 of 60 · Computer instructions · Medium
In the basic computer, the instruction that stores the content of the accumulator into memory is:
Not quite. Try another option.
Answer: STA
STA (Store Accumulator) writes the AC contents to the memory location given by the effective address; LDA loads from memory into AC.
Question 32 of 60 · Timing and control · Medium
In a hardwired control unit using a decoder driven by a sequence counter (SC), how many distinct timing signals through are available?
Not quite. Try another option.
Answer: 16
A 4-bit sequence counter feeding a decoder produces 16 timing signals, through .
Question 33 of 60 · Timing and control · Medium
When the sequence counter (SC) is cleared with the control signal , which timing signal becomes active on the next clock?
Not quite. Try another option.
Answer:
Clearing SC resets the count to zero, so the decoder activates , restarting the timing sequence for the next instruction.
Question 34 of 60 · Timing and control · Medium
What is the fundamental difference between a hardwired control unit and a microprogrammed control unit?
Not quite. Try another option.
Answer: Hardwired uses fixed logic gates while microprogrammed stores control words in memory
A hardwired unit generates control signals with fixed combinational logic, whereas a microprogrammed unit fetches control words (microinstructions) from control memory.
Question 35 of 60 · Instruction cycle · Medium
During the fetch phase, which micro-operation occurs at timing signal ?
Not quite. Try another option.
Answer:
At the address of the instruction (in PC) is transferred to AR so memory can be read on the next timing step.
Question 36 of 60 · Instruction cycle · Medium
At timing signal of the fetch cycle, which two micro-operations occur simultaneously?
Not quite. Try another option.
Answer: and
At the instruction is read into IR and the PC is incremented to point to the next instruction, both in the same clock.
Question 37 of 60 · Instruction cycle · Medium
After decoding at , if the instruction is a memory-reference type with , what happens at ?
Not quite. Try another option.
Answer: (fetch effective address)
With indirect addressing (), reads the actual effective address from memory into AR before the execution phase.
Question 38 of 60 · Input-output and interrupt · Medium
In the basic computer, the interrupt enable flip-flop IEN is set and cleared by which pair of instructions?
Not quite. Try another option.
Answer: ION and IOF
ION sets IEN = 1 to enable interrupts and IOF clears IEN = 0 to disable them; SKI/SKO test flag bits instead.
Question 39 of 60 · Input-output and interrupt · Medium
When an interrupt occurs in the basic computer, the return address (contents of PC) is stored in memory location:
Not quite. Try another option.
Answer: Address
During the interrupt cycle, PC is saved at memory location and control branches to location where the service routine begins.
Question 40 of 60 · LMC (simulation software) · Medium
In the Little Man Computer (LMC), the instruction with opcode performs which operation?
Not quite. Try another option.
Answer: LOAD the value from mailbox into the accumulator
In LMC, opcode (LOAD) copies the contents of mailbox into the accumulator; STORE is and ADD is .
Question 41 of 60 · Instruction codes · Hard
In the basic computer, an instruction code has a 3-bit opcode field, allowing combinations. Yet the machine supports far more than 8 operations. How is this achieved without expanding the opcode field?
Not quite. Try another option.
Answer: Opcode is decoded together with the mode bit and the remaining address bits to specify register-reference and I/O instructions
When the opcode is , the instruction is not memory-reference. The mode bit distinguishes register-reference () from I/O (), and the low-order 12 bits then encode the specific operation, effectively expanding the instruction set.
Question 42 of 60 · Computer registers · Hard
In Mano's basic computer, the memory has words of bits each. What are the required bit-widths of the Address Register () and the Data Register (), respectively?
Not quite. Try another option.
Answer: bits and bits
words require a -bit address, so is bits. Each word is bits, so (which holds a memory word) must be bits.
Question 43 of 60 · Common bus system · Hard
The basic computer's common bus is controlled by three selection lines . If places contents on the bus and places memory contents on the bus, how many distinct sources can the bus select in total?
Not quite. Try another option.
Answer: registers/memory sources plus one idle state, i.e. combinations
Three selection lines give combinations. Codes – select seven sources (, memory) and leaves the bus idle.
Question 44 of 60 · Timing and control · Hard
During the fetch phase, the microoperation occurs at and at . Why can't be moved to ?
Not quite. Try another option.
Answer: must first receive the address from before it can be used to read memory
Memory is addressed by . At , is only just being loaded from , so its output is not yet valid for a read. The read must wait until after holds the correct address.
Question 45 of 60 · Instruction cycle · Hard
An indirect memory-reference instruction adds one extra timing state () compared to a direct one. If the effective-address phase for a direct instruction completes decoding at , at which timing signal does execution of an indirect memory-reference instruction typically begin?
Not quite. Try another option.
Answer:
For indirect addressing, performs to fetch the effective address. Execution therefore begins at , one state later than a direct instruction which begins at .
Question 46 of 60 · Computer instructions · Hard
Consider the register-reference instruction (clear ) with hexadecimal code and (complement ) with code . What does the bit pattern reveal about how register-reference operations are encoded?
Not quite. Try another option.
Answer: Each of the low-order 12 bits acts as a one-hot control selecting a distinct micro-operation
In codes the opcode is with . The remaining 12 bits are one-hot: $7400 = $ bit 10 set, $7200 = $ bit 9 set. Each individual bit position triggers one register-reference operation.
Question 47 of 60 · Input-output and interrupt · Hard
In the interrupt cycle, the return address is stored at memory location and control branches to location . Given the microoperations and followed by , what is the purpose of setting first?
Not quite. Try another option.
Answer: So the saved return address is written into memory word before jumping to the service routine at word
The interrupt cycle stores the return address in memory location ( then ), then sets to so the branch-and-return service routine at address executes next.
Question 48 of 60 · Input-output and interrupt · Hard
The interrupt flip-flop is set only after both an I/O flag ( or ) and the interrupt-enable are , and additionally the current instruction cycle completes. Why is checked at the end of the execute phase rather than during fetch?
Not quite. Try another option.
Answer: To ensure the currently executing instruction finishes before the CPU services the interrupt
Interrupts are honored at instruction boundaries. Checking after execution guarantees the current instruction completes atomically, preserving a consistent processor state before control transfers to the interrupt cycle.
Question 49 of 60 · LMC (simulation software) · Hard
In the Little Man Computer, the instruction with opcode is LDA and opcode is STA. A program executes LDA 90 then ADD 91 then STA 92. If mailbox holds and mailbox holds , what value ends up in mailbox ?
Not quite. Try another option.
Answer:
LDA 90 loads into the accumulator; ADD 91 adds giving ; STA 92 stores into mailbox . The result is .
Question 50 of 60 · LMC (simulation software) · Hard
The LMC accumulator can hold values from to . A program executes an ADD that would produce . What best describes the defined behavior in most LMC implementations?
Not quite. Try another option.
Answer: The result wraps/overflows and a flag is set, producing an undefined or truncated value beyond the 3-digit range
The LMC accumulator is limited to 3 decimal digits (–). Exceeding this range causes overflow; most simulators set an overflow flag and the stored result is truncated or undefined, mirroring finite-register behavior.
Question 51 of 60 · Timing and control · Hard
The sequence counter is cleared to at the end of each instruction. If a memory-reference execute phase for a particular instruction ends at with the microoperation containing , what timing signal will be active at the start of the very next fetch?
Not quite. Try another option.
Answer:
Clearing resets the counter so decoding produces next. Every instruction ends by clearing , ensuring the next fetch always begins at timing signal .
Question 52 of 60 · Computer instructions · Hard
A memory-reference instruction is encoded as in a 16-bit word. If an instruction has hexadecimal value , what are its addressing mode and opcode?
Not quite. Try another option.
Answer: Indirect mode (), opcode
. The MSB (bit 15) is (indirect). The next three bits are , giving opcode . The remaining is the 12-bit address.
Question 53 of 60 · Common bus system · Hard
Suppose an operation requires transferring to over the common bus in a single clock. Which combination is required?
Not quite. Try another option.
Answer: Select as the bus source () and enable the load input of
A bus transfer requires exactly one source driving the bus (here , selected by the appropriate code) and the destination's load control asserted (here ). Only one register may drive the bus at a time.
Question 54 of 60 · Instruction cycle · Hard
For the branch instruction BUN (branch unconditionally, direct mode), execution consists solely of . Considering fetch, decode, and effective address phases, how many timing states does a direct BUN consume in total from to completion?
Not quite. Try another option.
Answer: states ( through )
Fetch uses ; decode/effective-address setup uses ; and the direct BUN executes at , clearing . Total: –, four states.
Question 55 of 60 · Instruction codes · Hard
A stored-program computer distinguishes data from instructions only by the phase in which a word is fetched. What consequence follows if the program counter accidentally points into a data region?
Not quite. Try another option.
Answer: The data words are interpreted as instructions and executed, likely causing erroneous or unpredictable behavior
In the von Neumann model, instructions and data share memory and are indistinguishable except by fetch context. If points to data, those bit patterns are decoded as opcodes and executed, producing unpredictable results.
Question 56 of 60 · Computer registers · Hard
The 8-bit register (input) and (output) are narrower than the 16-bit . When executing INP, the transfer is . What happens to bits during this microoperation?
Not quite. Try another option.
Answer: They are left unchanged unless the microoperation explicitly clears them
The INP microoperation specifies only . Bits are not addressed by this transfer, so they retain their prior values unless separately cleared.
Question 57 of 60 · Input-output and interrupt · Hard
Under programmed I/O, the CPU polls the flag in a tight loop before reading each character. Compared with interrupt-driven I/O, what is the fundamental drawback of this approach?
Not quite. Try another option.
Answer: The CPU wastes cycles busy-waiting on the flag instead of performing useful work
Programmed (polled) I/O forces the CPU to repeatedly test , consuming cycles doing nothing productive. Interrupt-driven I/O lets the CPU work until the device signals readiness, improving utilization.
Question 58 of 60 · Timing and control · Hard
A hardwired control unit derives each control signal as a Boolean function of the decoded opcode , timing signals , and status bits. Adding a new complex instruction to such a design is difficult primarily because:
Not quite. Try another option.
Answer: The combinational logic equations for many control signals must be re-derived and the circuit redesigned
Hardwired control implements signals as fixed gate logic of , , and flags. New instructions change these Boolean functions, forcing redesign of the hardware—unlike microprogrammed control, where one edits the control memory.
Question 59 of 60 · LMC (simulation software) · Hard
An LMC program uses opcode for I/O: is INPUT and is OUTPUT. A loop reads a number, and branches back if the accumulator is not zero using (BRZ) and (BRA). Which construct correctly implements 'keep reading numbers until a zero is entered, then halt'?
Not quite. Try another option.
Answer: LOOP: INP; BRZ END; BRA LOOP; END: HLT
INP reads into the accumulator; BRZ END jumps to HLT when the value is zero; otherwise BRA LOOP branches back to read again. This correctly loops until a zero is entered.
Question 60 of 60 · Instruction cycle · Hard
Consider a memory-reference AND instruction with indirect addressing. Order the following phases correctly: (1) , (2) (indirect), (3) (fetch), (4) .
Not quite. Try another option.
Answer:
Fetch loads from (3). Indirect addressing then resolves the effective address via (2). The operand is read (1), and finally the AND executes (4).
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of CSE211 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 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.