๐ŸŽ“ BookMCQ
โ† Back to 2. Simple as Possible (SAP) - I

๐Ÿ“ Design of Program Counter of Simple as Possible (SAP) I Computer (5 MCQs)

Four-Bit Program Counter and Address Generation

The SAP-I program counter is a 4-bit sequential counter that identifies the memory address of the next instruction to be fetched. Since its output contains four binary bits, it can represent sixteen different addresses from 0000 to 1111, corresponding to 0H through FH. Its limited width matches the sixteen-location RAM organization of the computer.

Counter Structure and Connection to the Memory Address Register

The program counter is constructed using binary storage elements and incrementing circuitry. Its four output bits connect to the internal bus through controlled output circuitry. During instruction fetching, the CO signal enables these bits onto the bus, and MI allows the memory address register to capture them. The MAR then selects the corresponding RAM location.

Incrementing the Counter After Instruction Fetching

When the processor fetches an instruction, the current program address is transferred into the MAR. RAM then supplies the instruction to the IR. The CE control signal increments the program counter, preparing it for the next instruction. This sequential advancement allows the SAP-I computer to execute a program stored in consecutive memory locations.

Tracing Program Counter Values During Sequential Execution

Suppose the program counter initially contains 0000. During fetching, the value 0000 enters the MAR. After the instruction is retrieved, CE increments the counter to 0001. Fetching the next instruction uses 0001, followed by 0010. This sequence demonstrates how the counter generates consecutive instruction addresses without requiring a separate address for every step.

Relationship Between Program Counter, Branching and Program Flow

The SAP-I program counter primarily supports sequential program execution because the basic instruction set does not include a general jump or conditional branch instruction. It therefore advances through memory locations as instructions are fetched. Unlike more advanced processors, its simple organization does not provide the flexible program-address modification available in the Intel 8085 instruction set.

Misconceptions About Program Counter Operation

'The program counter stores numerical calculation results' is incorrect because arithmetic results are stored in the accumulator. 'The program counter directly selects RAM without the MAR' overlooks the intermediate address-transfer operation. 'The SAP-I program counter is 8 bits wide' confuses its 4-bit address function with the computer's 8-bit data width.

Counter Design and Address-Sequence Questions

Be able to determine its four-bit capacity, identify its output connections and trace its incrementing sequence. Practise converting binary counter values into hexadecimal addresses and explaining the CO, MI and CE signals. Examination questions may ask for the next address after fetching, identify the role of the MAR or compare sequential addressing with the capabilities of larger processors.

Counter and Instruction-Address Terms

  • PC - Holds the next instruction address.
  • CO - Enables program counter output.
  • CE - Activates counter incrementing.
  • MAR - Holds the selected RAM address.
  • Counter - Advances through binary states.
  • Address - Identifies a memory location.
1
Easy
3
Medium
1
Hard

๐Ÿ“ All Design of Program Counter of Simple as Possible (SAP) I Computer MCQs

Q1. What is the primary purpose of a program counter (PC) in a CPU?

A.Store operand data
B.Hold address of next instruction โœ…
C.Perform arithmetic operations
D.Generate clock signals
๐Ÿ’ก Difficulty: easy | โœ… Correct: B

๐Ÿ“– Explanation: The program counter's job is to keep track of where the processor is in the instruction stream, so it must hold the address of the next instruction to be fetched. Option B states this directly, making it correct. Option A describes a register used for data, not control flow. Option C refers to the ALU, and option D describes a clock generator. Understanding the PCโ€™s role clarifies how sequential execution proceeds.

Q2. Why does the program counter need to be incremented after each instruction fetch?

A.To reset the CPU, to prepare for interrupt handling, to point to the next sequential instruction, to store the result of the instruction
B.To point to the next sequential instruction
C.To reset the CPU โœ…
D.To prepare for interrupt handling
๐Ÿ’ก Difficulty: medium | โœ… Correct: C

๐Ÿ“– Explanation: Each time an instruction is fetched, the PC must advance so the next fetch retrieves the following instruction in memory. This sequential progression is essential for normal program flow, making option C correct. Resetting the CPU (A) or handling interrupts (D) involve other mechanisms, while storing results (B) is the job of registers, not the PC.

Q3. How does a conditional branch instruction affect the program counter?

A.It always adds a fixed offset, it loads the PC with a target address only if the condition is true, it clears the PC, it increments the PC twice โœ…
B.It loads the PC with a target address only if the condition is true
C.It always adds a fixed offset
D.It clears the PC
๐Ÿ’ก Difficulty: medium | โœ… Correct: A

๐Ÿ“– Explanation: A conditional branch evaluates a test; if true, the PC receives the branch target address, otherwise it continues sequentially. Option A captures this behavior precisely. Adding a fixed offset (B) describes an unconditional relative jump, clearing the PC (C) would halt execution, and incrementing twice (D) is not typical for branches.

Q4. A microcontroller uses a 16โ€‘bit PC that wraps around after reaching its maximum value. If the PC currently holds 0xFFFE and two sequential instructions are executed, what will be the PC value after the second fetch?

A.0 โœ…
B.1
C.65535
D.65533
๐Ÿ’ก Difficulty: hard | โœ… Correct: A

๐Ÿ“– Explanation: The PC starts at 0xFFFE. After the first fetch it increments to 0xFFFF. After the second fetch it adds one more, producing 0x10000, which cannot be represented in 16 bits, so it wraps to 0x0000. Option A shows this wrapped value. Option B would be the result after only one increment from 0xFFFF, C leaves the PC unchanged, and D subtracts instead of adding. This illustrates wrapโ€‘around behavior in limited address spaces.

Q5. Design a simple PC increment circuit using a binary adder. Which component is essential to ensure the PC correctly wraps from its maximum value back to zero?

A.Zero detector
B.Carryโ€‘out reset โœ…
C.Multiplexer
D.Flipโ€‘flop
๐Ÿ’ก Difficulty: medium | โœ… Correct: B

๐Ÿ“– Explanation: A binary adder will produce a carryโ€‘out when the PC reaches its maximum (e.g., 1111โ€ฆ111). Resetting the PC to zero requires using that carryโ€‘out to force the next state to zero, making a carryโ€‘out reset circuit essential. Option B provides this function. A zero detector only signals when the PC is already zero, a multiplexer could select inputs but does not handle overflow, and a flipโ€‘flop stores bits without managing wrapโ€‘around.

๐Ÿ”— Related Topics (MCQs)