1An 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?
Instruction codes
Easy
A.Operation code
B.Accumulator
C.Address field
D.Program counter
Correct Answer: Operation code
Explanation:
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.
Incorrect! Try again.
2In a basic computer, an instruction code is generally divided into how many main parts?
Instruction codes
Easy
A.Five parts
B.One part
C.Two parts
D.Four parts
Correct Answer: Two parts
Explanation:
An instruction code is commonly divided into two parts: the operation code (opcode) and the address of the operand.
Incorrect! Try again.
3The number of bits required for the operation code depends on the total number of what?
Instruction codes
Easy
A.Memory words
B.Registers present
C.Input devices
D.Operations available
Correct Answer: Operations available
Explanation:
If a computer supports operations, then bits are needed for the opcode to represent all operations.
Incorrect! Try again.
4Which register holds the address of the next instruction to be executed?
Computer registers
Easy
A.Accumulator (AC)
B.Program Counter (PC)
C.Data Register (DR)
D.Input Register (INPR)
Correct Answer: Program Counter (PC)
Explanation:
The Program Counter (PC) stores the memory address of the next instruction to be fetched and executed.
Incorrect! Try again.
5In the basic computer, which register is used to hold an operand read from memory?
Computer registers
Easy
A.Temporary Register (TR)
B.Address Register (AR)
C.Program Counter (PC)
D.Data Register (DR)
Correct Answer: Data Register (DR)
Explanation:
The Data Register (DR) holds the operand or data value read from memory during instruction execution.
Incorrect! Try again.
6Which register in the basic computer holds the address of a memory location being accessed?
Computer registers
Easy
A.Address Register (AR)
B.Output Register (OUTR)
C.Accumulator (AC)
D.Instruction Register (IR)
Correct Answer: Address Register (AR)
Explanation:
The Address Register (AR) holds the address of the memory location currently being read from or written to.
Incorrect! Try again.
7Which register holds the instruction that is currently being executed?
Computer registers
Easy
A.Address Register (AR)
B.Data Register (DR)
C.Instruction Register (IR)
D.Program Counter (PC)
Correct Answer: Instruction Register (IR)
Explanation:
The Instruction Register (IR) holds the instruction code that has been fetched from memory and is currently being decoded and executed.
Incorrect! Try again.
8What is the main purpose of a common bus system in a computer?
Common bus system
Easy
A.To transfer data among registers and memory
B.To perform arithmetic operations
C.To store instructions permanently
D.To decode operation codes
Correct Answer: To transfer data among registers and memory
Explanation:
A common bus system provides a shared set of lines used to transfer information between registers and memory, reducing the number of connections.
Incorrect! Try again.
9In a common bus system, only one register can place its data on the bus at a time. This is controlled by what?
Common bus system
Easy
A.Selection lines
B.Clock frequency
C.Memory size
D.Interrupt flag
Correct Answer: Selection lines
Explanation:
Selection (control) lines determine which register's output is placed on the common bus at any given time, preventing conflicts.
Incorrect! Try again.
10If a common bus has selection lines , how many registers or units can be selected?
Common bus system
Easy
A.4
B.8
C.3
D.16
Correct Answer: 8
Explanation:
With 3 selection lines, different sources can be selected to place their contents on the bus.
Incorrect! Try again.
11The basic computer instructions are generally classified into how many categories?
Computer instructions
Easy
A.Four categories
B.Five categories
C.Two categories
D.Three categories
Correct Answer: Three categories
Explanation:
Basic computer instructions are classified into three types: memory-reference, register-reference, and input-output instructions.
Incorrect! Try again.
12Which type of instruction does not require a memory address to operate?
Computer instructions
Easy
A.Register-reference instruction
B.Store instruction
C.Load instruction
D.Memory-reference instruction
Correct Answer: Register-reference instruction
Explanation:
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.
Incorrect! Try again.
13A memory-reference instruction uses one bit to indicate what?
Computer instructions
Easy
A.Direct or indirect addressing
B.Signed or unsigned data
C.Interrupt enable status
D.Read or write mode
Correct Answer: Direct or indirect addressing
Explanation:
In a memory-reference instruction, a mode bit (often labeled ) specifies whether the addressing is direct or indirect.
Incorrect! Try again.
14The timing signals in a basic computer are generated by which component?
Timing and control
Easy
A.Input register
B.Sequence counter and decoder
C.Memory unit
D.Accumulator
Correct Answer: Sequence counter and decoder
Explanation:
A sequence counter (SC) along with a decoder generates the timing signals that control the sequence of operations.
Incorrect! Try again.
15Which of the following is a type of control unit organization?
Timing and control
Easy
A.Microprogrammed control
B.Bus arbitration
C.Register buffering
D.Sequential addressing
Correct Answer: Microprogrammed control
Explanation:
The two main types of control unit are hardwired control and microprogrammed control; microprogrammed control uses stored microinstructions.
Incorrect! Try again.
16In timing and control, the master clock generator produces what?
Timing and control
Easy
A.Data words
B.Instruction codes
C.Clock pulses
D.Memory addresses
Correct Answer: Clock pulses
Explanation:
The master clock generator produces a continuous train of clock pulses that synchronize all operations in the computer.
Incorrect! Try again.
17The first phase of an instruction cycle is to do what?
Instruction cycle
Easy
A.Fetch the instruction from memory
B.Execute the instruction
C.Handle an interrupt
D.Store the result
Correct Answer: Fetch the instruction from memory
Explanation:
An instruction cycle begins with the fetch phase, where the instruction is read from memory using the address in the PC.
Incorrect! Try again.
18After an instruction is fetched, what is the next step in the instruction cycle?
Instruction cycle
Easy
A.Decode the instruction
B.Reset the accumulator
C.Increment memory size
D.Clear the interrupt flag
Correct Answer: Decode the instruction
Explanation:
Following the fetch phase, the control unit decodes the instruction to determine which operation to perform.
Incorrect! Try again.
19What is the main purpose of an interrupt in a computer system?
Input-output and interrupt
Easy
A.To decode operation codes
B.To store program instructions
C.To signal the CPU that a device needs attention
D.To increase clock speed
Correct Answer: To signal the CPU that a device needs attention
Explanation:
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.
Incorrect! Try again.
20In the Little Man Computer (LMC) model, which component is used to perform arithmetic operations?
LMC (simulation software)
Easy
A.Outbox
B.Inbox
C.Mailbox
D.Calculator (accumulator)
Correct Answer: Calculator (accumulator)
Explanation:
In the LMC model, the calculator acts as the accumulator where arithmetic operations such as addition and subtraction are performed.
Incorrect! Try again.
21In 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?
Instruction codes
Medium
A.3 bits
B.0 bits
C.1 bit
D.4 bits
Correct Answer: 0 bits
Explanation:
The format uses 1 bit (mode) + 3 bits (opcode) + 12 bits (address) = 16 bits, exactly matching the word size, so no bits are unused.
Incorrect! Try again.
22In 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?
Instruction codes
Medium
A.8
B.3
C.16
D.7
Correct Answer: 7
Explanation:
With a 3-bit opcode, codes exist, but code is reserved for register-reference and I/O instructions, leaving 7 for memory-reference operations.
Incorrect! Try again.
23In the basic computer, the Program Counter (PC) and Address Register (AR) are both which width?
Computer registers
Medium
A.15 bits
B.16 bits
C.12 bits
D.8 bits
Correct Answer: 12 bits
Explanation:
Since memory has 4096 words, addresses need bits, so both PC and AR are 12 bits wide.
Incorrect! Try again.
24Which register in the basic computer holds the instruction currently being executed?
Computer registers
Medium
A.IR (Instruction Register)
B.TR (Temporary Register)
C.AC (Accumulator)
D.DR (Data Register)
Correct Answer: IR (Instruction Register)
Explanation:
The Instruction Register (IR) holds the opcode and fields of the instruction read from memory during the fetch phase.
Incorrect! Try again.
25The INPR and OUTR registers in the basic computer are how many bits wide, matching a single character?
Computer registers
Medium
A.8 bits
B.16 bits
C.4 bits
D.12 bits
Correct Answer: 8 bits
Explanation:
INPR (input register) and OUTR (output register) are 8 bits each, since they hold one character for serial I/O transfer.
Incorrect! Try again.
26In 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?
Common bus system
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
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 .
Incorrect! Try again.
27How many selection lines are needed to choose one of the sources connected to a common bus that links 7 registers and memory (8 sources)?
Common bus system
Medium
A.4 lines
B.3 lines
C.8 lines
D.2 lines
Correct Answer: 3 lines
Explanation:
To select one of 8 sources, a multiplexer needs selection lines.
Incorrect! Try again.
28In a common bus system built from multiplexers, what is the main advantage over a system with dedicated point-to-point connections between all registers?
Common bus system
Medium
A.Fewer wires and reduced hardware cost
B.Higher clock frequency
C.Faster simultaneous transfers
D.Larger memory capacity
Correct Answer: Fewer wires and reduced hardware cost
Explanation:
A common bus shares one set of lines among all registers, drastically reducing the number of interconnections and hardware compared to dedicated paths.
Incorrect! Try again.
29The instruction (clear accumulator) in the basic computer is an example of which instruction type?
Computer instructions
Medium
A.Register-reference instruction
B.Branch instruction
C.Input-output instruction
D.Memory-reference instruction
Correct Answer: Register-reference instruction
Explanation:
CLA operates only on the accumulator without accessing memory, so it is a register-reference instruction (opcode with mode bit ).
Incorrect! Try again.
30For a memory-reference instruction, if the addressing mode bit , what type of addressing is used?
Computer instructions
Medium
A.Register addressing
B.Immediate addressing
C.Direct addressing
D.Indirect addressing
Correct Answer: Indirect addressing
Explanation:
When , the address field points to a memory location that contains the effective address, i.e., indirect addressing.
Incorrect! Try again.
31In the basic computer, the instruction that stores the content of the accumulator into memory is:
Computer instructions
Medium
A.ADD
B.STA
C.LDA
D.BSA
Correct Answer: STA
Explanation:
STA (Store Accumulator) writes the AC contents to the memory location given by the effective address; LDA loads from memory into AC.
Incorrect! Try again.
32In a hardwired control unit using a decoder driven by a sequence counter (SC), how many distinct timing signals through are available?
Timing and control
Medium
A.32
B.4
C.8
D.16
Correct Answer: 16
Explanation:
A 4-bit sequence counter feeding a decoder produces 16 timing signals, through .
Incorrect! Try again.
33When the sequence counter (SC) is cleared with the control signal , which timing signal becomes active on the next clock?
Timing and control
Medium
A.
B.the last used
C.
D.
Correct Answer:
Explanation:
Clearing SC resets the count to zero, so the decoder activates , restarting the timing sequence for the next instruction.
Incorrect! Try again.
34What is the fundamental difference between a hardwired control unit and a microprogrammed control unit?
Timing and control
Medium
A.Hardwired uses fixed logic gates while microprogrammed stores control words in memory
B.Hardwired is slower than microprogrammed
C.Microprogrammed has no sequence counter
D.Hardwired cannot execute branch instructions
Correct Answer: Hardwired uses fixed logic gates while microprogrammed stores control words in memory
Explanation:
A hardwired unit generates control signals with fixed combinational logic, whereas a microprogrammed unit fetches control words (microinstructions) from control memory.
Incorrect! Try again.
35During the fetch phase, which micro-operation occurs at timing signal ?
Instruction cycle
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
At the address of the instruction (in PC) is transferred to AR so memory can be read on the next timing step.
Incorrect! Try again.
36At timing signal of the fetch cycle, which two micro-operations occur simultaneously?
Instruction cycle
Medium
A. and
B. and
C. and
D. and
Correct Answer: and
Explanation:
At the instruction is read into IR and the PC is incremented to point to the next instruction, both in the same clock.
Incorrect! Try again.
37After decoding at , if the instruction is a memory-reference type with , what happens at ?
Instruction cycle
Medium
A.
B. (fetch effective address)
C.
D.
Correct Answer: (fetch effective address)
Explanation:
With indirect addressing (), reads the actual effective address from memory into AR before the execution phase.
Incorrect! Try again.
38In the basic computer, the interrupt enable flip-flop IEN is set and cleared by which pair of instructions?
Input-output and interrupt
Medium
A.INP and OUT
B.ION and IOF
C.SKI and SKO
D.STA and LDA
Correct Answer: ION and IOF
Explanation:
ION sets IEN = 1 to enable interrupts and IOF clears IEN = 0 to disable them; SKI/SKO test flag bits instead.
Incorrect! Try again.
39When an interrupt occurs in the basic computer, the return address (contents of PC) is stored in memory location:
Input-output and interrupt
Medium
A.The address in AR
B.Address
C.The top of a hardware stack
D.Address
Correct Answer: Address
Explanation:
During the interrupt cycle, PC is saved at memory location and control branches to location where the service routine begins.
Incorrect! Try again.
40In the Little Man Computer (LMC), the instruction with opcode performs which operation?
LMC (simulation software)
Medium
A.BRANCH always to mailbox
B.STORE the accumulator into mailbox
C.LOAD the value from mailbox into the accumulator
D.ADD mailbox to the accumulator
Correct Answer: LOAD the value from mailbox into the accumulator
Explanation:
In LMC, opcode (LOAD) copies the contents of mailbox into the accumulator; STORE is and ADD is .
Incorrect! Try again.
41In 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?
Instruction codes
Hard
A.Memory-reference instructions borrow unused bits from the program counter
B.Opcode is decoded together with the mode bit and the remaining address bits to specify register-reference and I/O instructions
C.The accumulator is time-multiplexed to store an extended 6-bit opcode during fetch
D.The sequence counter appends 3 extra bits to every opcode automatically
Correct Answer: Opcode is decoded together with the mode bit and the remaining address bits to specify register-reference and I/O instructions
Explanation:
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.
Incorrect! Try again.
42In 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?
Computer registers
Hard
A. bits and bits
B. bits and bits
C. bits and bits
D. bits and bits
Correct Answer: bits and bits
Explanation:
words require a -bit address, so is bits. Each word is bits, so (which holds a memory word) must be bits.
Incorrect! Try again.
43The 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?
Common bus system
Hard
A.Exactly sources, one per bus line
B. sources matching the address width
C.Only sources, one per selection line
D. registers/memory sources plus one idle state, i.e. combinations
Correct Answer: registers/memory sources plus one idle state, i.e. combinations
Explanation:
Three selection lines give combinations. Codes – select seven sources (, memory) and leaves the bus idle.
Incorrect! Try again.
44During the fetch phase, the microoperation occurs at and at . Why can't be moved to ?
Timing and control
Hard
A.The bus is reserved for output devices during
B. must first receive the address from before it can be used to read memory
C. can only be loaded on odd-numbered timing signals
D.The program counter cannot increment during
Correct Answer: must first receive the address from before it can be used to read memory
Explanation:
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.
Incorrect! Try again.
45An 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?
Instruction cycle
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
For indirect addressing, performs to fetch the effective address. Execution therefore begins at , one state later than a direct instruction which begins at .
Incorrect! Try again.
46Consider 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?
Computer instructions
Hard
A.The high nibble selects the operation and the rest is ignored
B.Each of the low-order 12 bits acts as a one-hot control selecting a distinct micro-operation
C.The 12 bits form a binary-coded index into a jump table of 4096 operations
D.The operation is selected by the sum of all set bits modulo 12
Correct Answer: Each of the low-order 12 bits acts as a one-hot control selecting a distinct micro-operation
Explanation:
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.
Incorrect! Try again.
47In 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?
Input-output and interrupt
Hard
A.So the saved return address is written into memory word before jumping to the service routine at word
B.To force the stack pointer to the top of memory
C.To disable further interrupts by clearing the address register
D.To reset the accumulator before the interrupt handler runs
Correct Answer: So the saved return address is written into memory word before jumping to the service routine at word
Explanation:
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.
Incorrect! Try again.
48The 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?
Input-output and interrupt
Hard
A.To ensure the currently executing instruction finishes before the CPU services the interrupt
B.Because the flag registers are cleared automatically during fetch
C.Because can only be read during the fetch of the next instruction
D.To guarantee the interrupt overwrites before the instruction begins
Correct Answer: To ensure the currently executing instruction finishes before the CPU services the interrupt
Explanation:
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.
Incorrect! Try again.
49In 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 ?
LMC (simulation software)
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
LDA 90 loads into the accumulator; ADD 91 adds giving ; STA 92 stores into mailbox . The result is .
Incorrect! Try again.
50The 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?
LMC (simulation software)
Hard
A.The result wraps/overflows and a flag is set, producing an undefined or truncated value beyond the 3-digit range
B.The program halts immediately with no value stored
C.The accumulator silently stores using a 4th digit
D.The value is automatically divided by 10 to fit
Correct Answer: The result wraps/overflows and a flag is set, producing an undefined or truncated value beyond the 3-digit range
Explanation:
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.
Incorrect! Try again.
51The 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?
Timing and control
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Clearing resets the counter so decoding produces next. Every instruction ends by clearing , ensuring the next fetch always begins at timing signal .
Incorrect! Try again.
52A memory-reference instruction is encoded as in a 16-bit word. If an instruction has hexadecimal value , what are its addressing mode and opcode?
Computer instructions
Hard
A.Indirect mode (), opcode
B.Direct mode (), opcode
C.Indirect mode (), opcode
D.Direct mode (), opcode
Correct Answer: Indirect mode (), opcode
Explanation:
. The MSB (bit 15) is (indirect). The next three bits are , giving opcode . The remaining is the 12-bit address.
Incorrect! Try again.
53Suppose an operation requires transferring to over the common bus in a single clock. Which combination is required?
Common bus system
Hard
A.Enable load of both and simultaneously with source
B.Select as the bus source () and enable the load input of
C.Select as the source and load
D.Place memory on the bus and load
Correct Answer: Select as the bus source () and enable the load input of
Explanation:
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.
Incorrect! Try again.
54For 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?
Instruction cycle
Hard
A. states ( through )
B. states ( through )
C. states ( through )
D. states ( through )
Correct Answer: states ( through )
Explanation:
Fetch uses ; decode/effective-address setup uses ; and the direct BUN executes at , clearing . Total: –, four states.
Incorrect! Try again.
55A 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?
Instruction codes
Hard
A.The processor raises a hardware type-mismatch exception automatically
B.The data words are interpreted as instructions and executed, likely causing erroneous or unpredictable behavior
C.Memory returns zeros because data cannot be read during fetch
D.The control unit skips the data and resumes at the next instruction region
Correct Answer: The data words are interpreted as instructions and executed, likely causing erroneous or unpredictable behavior
Explanation:
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.
Incorrect! Try again.
56The 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?
Computer registers
Hard
A.They are sign-extended from bit 7
B.They are left unchanged unless the microoperation explicitly clears them
C.They receive the previous contents of
D.They are automatically zero-filled every INP
Correct Answer: They are left unchanged unless the microoperation explicitly clears them
Explanation:
The INP microoperation specifies only . Bits are not addressed by this transfer, so they retain their prior values unless separately cleared.
Incorrect! Try again.
57Under 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?
Input-output and interrupt
Hard
A.Polling permanently disables so no interrupts can occur
B.Interrupts require more memory words than polling loops
C.The CPU wastes cycles busy-waiting on the flag instead of performing useful work
D.Programmed I/O cannot detect the flag being set at all
Correct Answer: The CPU wastes cycles busy-waiting on the flag instead of performing useful work
Explanation:
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.
Incorrect! Try again.
58A 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:
Timing and control
Hard
A.The sequence counter must be widened to 16 bits
B.The combinational logic equations for many control signals must be re-derived and the circuit redesigned
C.Each new instruction requires an additional common bus
D.The instruction register can no longer decode the opcode
Correct Answer: The combinational logic equations for many control signals must be re-derived and the circuit redesigned
Explanation:
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.
Incorrect! Try again.
59An 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'?
LMC (simulation software)
Hard
A.LOOP: INP; HLT; BRZ LOOP
B.LOOP: INP; BRA END; BRZ LOOP; END: HLT
C.LOOP: INP; BRZ END; BRA LOOP; END: HLT
D.LOOP: OUT; BRZ LOOP; HLT
Correct Answer: LOOP: INP; BRZ END; BRA LOOP; END: HLT
Explanation:
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.
Incorrect! Try again.
60Consider a memory-reference AND instruction with indirect addressing. Order the following phases correctly: (1) , (2) (indirect), (3) (fetch), (4) .
Instruction cycle
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Fetch loads from (3). Indirect addressing then resolves the effective address via (2). The operand is read (1), and finally the AND executes (4).
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. 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.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →