2081 1

BIT101 · 2081 · 10 marks

What are the components of general-purpose computer? Draw the block diagram of general-purpose computer? Explain function of PC, IR and AC registers.

What are the components of general-purpose computer? Draw the block diagram of general-purpose computer? Explain function of PC, IR and AC registers.[10]

Introduction to Information TechnologyChapter 1: Fundamentals of ComputingComputer components and architecture

Quick answer

A general-purpose computer is a digital computer capable of performing a wide variety of tasks by executing different stored programs.

Components of a General-Purpose Computer, Block Diagram, and Register Functions


1. Components of a General-Purpose Computer

A general-purpose computer is a digital computer capable of performing a wide variety of tasks by executing different stored programs. It consists of the following major components:

ComponentDescription
Input UnitAccepts data and instructions from the user (keyboard, mouse, scanner)
Output UnitDelivers processed results to the user (monitor, printer, speaker)
Memory UnitStores data and instructions; includes primary memory (RAM, ROM) and secondary memory (HDD, SSD)
Central Processing Unit (CPU)The brain of the computer; processes all instructions
ALU (Arithmetic Logic Unit)Performs arithmetic (+, -, *, /) and logical (AND, OR, NOT) operations
Control Unit (CU)Directs and coordinates all operations of the computer
RegistersSmall, high-speed temporary storage inside the CPU (PC, IR, AC, MAR, MBR, etc.)
Bus SystemCommunication pathways: Data Bus, Address Bus, Control Bus

2. Block Diagram of a General-Purpose Computer

+------------------+          +------------------+
|   INPUT UNIT     |          |   OUTPUT UNIT    |
| (Keyboard, Mouse)|          | (Monitor,Printer)|
+--------+---------+          +--------+---------+
         |                             ^
         |                             |
         v                             |
+--------+-----------------------------+--------+
|                   SYSTEM BUS                  |
|        (Data Bus / Address Bus / Control Bus) |
+---+------------------+------------------+-----+
    |                  |                  |
    v                  v                  v
+---+------+   +-------+--------+   +----+-----+
| MEMORY   |   |      CPU       |   | SECONDARY|
|  UNIT    |   |                |   | MEMORY   |
|          |   | +------------+ |   | (HDD/SSD)|
| RAM      |   | | Control    | |   +----------+
| ROM      |   | | Unit (CU)  | |
|          |   | +------------+ |
+----------+   | +------------+ |
               | |    ALU     | |
               | +------------+ |
               | +------------+ |
               | | Registers  | |
               | | PC, IR, AC | |
               | | MAR, MBR   | |
               | +------------+ |
               +----------------+

Note: All units communicate through the System Bus, which carries data (Data Bus), memory addresses (Address Bus), and control signals (Control Bus).


3. Functions of PC, IR, and AC Registers

a) PC -- Program Counter

  • The Program Counter (PC) is a special-purpose register inside the CPU.
  • It holds the memory address of the next instruction to be fetched from memory.
  • After each instruction is fetched, the PC is automatically incremented to point to the next sequential instruction.
  • In case of a branch or jump instruction, the PC is loaded with the branch address instead of being incremented.
  • It ensures that instructions are executed in the correct sequential order.

Example:

If PC = 2000, the CPU fetches the instruction at address 2000.
After fetch, PC becomes 2001 (pointing to the next instruction).

b) IR -- Instruction Register

  • The Instruction Register (IR) holds the current instruction being executed.
  • Once an instruction is fetched from memory, it is transferred from memory to the IR.
  • The Control Unit decodes the instruction stored in the IR to determine:
    • What operation to perform (opcode part)
    • Which operand or address to use (address/operand part)
  • The IR holds the instruction throughout its execution cycle until the next instruction is fetched.

Instruction format in IR:

+------------------+------------------+
|     OPCODE       |     OPERAND      |
| (operation type) | (address / data) |
+------------------+------------------+

c) AC -- Accumulator

  • The Accumulator (AC) is a general-purpose register that stores intermediate results of arithmetic and logical operations performed by the ALU.
  • It acts as the primary working register of the CPU.
  • Most ALU operations use the AC as both the source and the destination of data.
  • After any computation, the result is stored back in the AC until it is transferred to memory or another register.

Example:

ADD X  -->  AC = AC + X
           (AC holds the running result)

Summary Table of Registers

RegisterFull NamePrimary Function
PCProgram CounterHolds address of the next instruction to fetch
IRInstruction RegisterHolds the current instruction being decoded/executed
ACAccumulatorHolds intermediate results of ALU operations

Conclusion

A general-purpose computer operates through the coordinated interaction of input, output, memory, and CPU units connected via the system bus. The registers PC, IR, and AC play a fundamental role in the fetch-decode-execute cycle, ensuring that instructions are retrieved, interpreted, and computed correctly and in the proper sequence.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.