3 Computer Organization And Architecture

Introduction to Information Technology · Unit 3

Computer Organization and Architecture

Exam-focused notes for Computer Organization and Architecture (Introduction to Information Technology, BIT101): what the TU syllabus asks and how it has actually been tested, with 12 solved past questions from this unit.

Computer Organization and Architecture in short

This unit looks inside the computer. It explains how the CPU runs instructions, how data moves on buses, and how memory and storage are arranged by speed and cost.

Computer Organization and Architecture: notes

Central Processing Unit components and functions

The CPU (Central Processing Unit) is the brain of the computer. It reads instructions from memory and carries them out. It has three main parts.

  • Arithmetic Logic Unit (ALU): does arithmetic (add, subtract, multiply, divide) and logic operations (AND, OR, NOT, compare).
  • Control Unit (CU): fetches instructions, decodes them, and sends control signals to other parts. It does not process data itself.
  • Registers: very small, very fast storage inside the CPU. They hold data and instructions that are being used right now.

Important registers:

  • Program Counter (PC): holds the address of the next instruction.
  • Instruction Register (IR): holds the instruction being run.
  • Memory Address Register (MAR): holds the address of the memory location to read or write.
  • Memory Data Register (MDR): holds the data moving to or from memory.
  • Accumulator (AC): holds the results of ALU operations.

Functions of the CPU: fetch instructions, decode them, execute them, control all units, and store results.

Instruction cycle and steps

The instruction cycle (fetch, decode, execute cycle) is the set of actions the CPU repeats to run each instruction.

  1. Fetch: the address in the PC goes to the MAR. The instruction is read from memory into the MDR and then into the IR. The PC then increases to point to the next instruction.
  2. Decode: the control unit reads the instruction in the IR. It finds out the operation and the operands.
  3. Execute: the ALU or another unit performs the operation. For example, it adds two numbers.
  4. Store (write back): the result is saved in a register or in memory.

Then the cycle starts again for the next instruction. The speed of the CPU is measured by its clock rate in hertz (Hz).

What this unit covers

  • Central Processing Unit components and functions
  • Instruction cycle and steps
  • Computer bus types and functions
  • Data bus, address bus, and control bus
  • Memory hierarchy and access time
  • Primary memory types
  • Secondary storage and I/O devices
  • Sequential and direct access devices

Memory hierarchy and access time

2081 · 5 marks

Explain different memories available in the computer in order of their hierarchy based on access time and capacity. [5]

Computer systems use multiple types of memory organized in a hierarchy based on two key parameters: - Access Time (speed): How fast the CPU can read/write data - Capacity (size): How much data can be stored The general principle is: faster memory = smaller capacity = higher cost per bit --- --- -...

Open this answer on its own page →

Central Processing Unit components and functions

2080 · 5 marks

What are three parts of Central Processing Unit (CPU)? Explain. [5]

The Central Processing Unit (CPU) is the brain of the computer. It processes all instructions and controls the operation of the entire computer system. The CPU consists of three main parts: --- The ALU is the part of the CPU that performs all arithmetic and logical operations. - Arithmetic operat...

Open this answer on its own page →

2077 · 5 marks

What are the parts of CPU? Explain each. [5]

The Central Processing Unit (CPU) is the brain of the computer. It is responsible for executing instructions and processing data. The CPU consists of the following main parts: --- The ALU is the functional core of the CPU that performs all arithmetic and logical operations. - Arithmetic operation...

Open this answer on its own page →

Data bus, address bus, and control bus

2079 · 5 marks

What is Computer Bus? Explain the functions of data bus, address bus and control bus. [5]

Show solved answer

Computer Bus

Definition

A computer bus is a communication system that transfers data between components inside a computer or between computers. It consists of a set of physical wires (lines) along which electrical signals are transmitted. A bus connects the CPU, memory, and input/output devices, allowing them to communicate with each other.


Types of Buses and Their Functions

1. Data Bus

  • The data bus carries the actual data (instructions and information) between the CPU, memory, and I/O devices.
  • It is bidirectional, meaning data can flow in both directions (from CPU to memory or from memory to CPU).
  • The width of the data bus (number of lines) determines how much data can be transferred at one time.
    • Example: A 32-bit data bus can transfer 32 bits simultaneously.
  • A wider data bus means faster data transfer and better system performance.

2. Address Bus

  • The address bus carries memory addresses generated by the CPU to specify where in memory data should be read from or written to.
  • It is unidirectional, meaning addresses flow only from the CPU to memory or I/O devices.
  • The width of the address bus determines the maximum amount of memory the system can address.
    • Example: A 32-bit address bus can address 2^32 = 4 GB of memory.
  • It does not carry data itself, only the location (address) of the data.

3. Control Bus

  • The control bus carries control signals from the CPU to coordinate and manage the activities of all components connected to the bus.
  • It is bidirectional in nature (some signals go from CPU to devices, some come back).
  • Common control signals include:
    • Memory Read / Memory Write - indicates whether data is to be read from or written to memory
    • I/O Read / I/O Write - controls input/output operations
    • Clock signal - synchronizes operations
    • Interrupt signals - allows devices to request CPU attention
    • Bus Request / Bus Grant - manages which device controls the bus

Summary Table

BusDirectionCarries
Data BusBidirectionalActual data/instructions
Address BusUnidirectionalMemory/I/O addresses
Control BusBidirectionalControl and timing signals

Together, these three buses form the system bus, which is the primary pathway for communication within a computer system.

Open this answer on its own page →

Computer bus types and functions

2079 · 5 marks

Define Bus with its types. Why do we need memory hierarchy? [5]

Show solved answer

Bus: Definition and Types + Memory Hierarchy


Definition of Bus

A bus is a shared communication pathway (set of parallel wires/lines) that connects multiple components of a computer system (CPU, memory, I/O devices) and allows transfer of data, addresses, and control signals between them.


Types of Bus

A system bus is typically composed of three functional types:

1. Data Bus

  • Carries actual data between the processor, memory, and I/O devices.
  • It is bidirectional (data can flow in both directions).
  • Width (e.g., 8-bit, 16-bit, 32-bit, 64-bit) determines how much data can be transferred at once.

2. Address Bus

  • Carries the memory address specifying where data should be read from or written to.
  • It is unidirectional (flows from CPU to memory/I/O).
  • Width determines the maximum addressable memory (e.g., 32-bit address bus can address 2³² locations).

3. Control Bus

  • Carries control signals that coordinate and manage operations on the bus.
  • Signals include: Read/Write, Memory Request, Interrupt, Clock, Bus Request, Bus Grant, etc.
  • It is bidirectional.

Why Do We Need Memory Hierarchy?

Memory hierarchy is needed due to the following reasons:

1. Speed vs. Cost Trade-off

  • Fast memory (e.g., registers, cache) is very expensive and cannot be used in large quantities.
  • Slow memory (e.g., hard disk) is cheap but too slow for direct CPU use.
  • Hierarchy allows a balance between speed and cost.

2. Bridging the Speed Gap (CPU-Memory Gap)

  • Modern CPUs operate at very high speeds (GHz range), but main memory (RAM) is significantly slower.
  • Cache memory is placed between CPU and RAM to reduce access time and prevent the CPU from waiting (avoiding bottleneck).

3. Principle of Locality

  • Programs exhibit temporal locality (recently used data will be used again soon) and spatial locality (nearby memory locations will be accessed soon).
  • Hierarchy exploits this by keeping frequently used data in faster, smaller memory.

4. Efficient Use of Resources

  • By storing only the most needed data in expensive fast memory and the rest in cheaper slow memory, the system achieves near-fast-memory performance at near-slow-memory cost.

Memory Hierarchy Levels (Top to Bottom):

LevelMemory TypeSpeedCostSize
1RegistersFastestHighestSmallest
2Cache (L1, L2, L3)Very FastHighSmall
3Main Memory (RAM)ModerateModerateMedium
4Secondary Storage (HDD/SSD)SlowLowLarge
5Tertiary (Tape, Cloud)SlowestLowestLargest

Summary: Memory hierarchy is needed to provide the illusion of a large, fast, and affordable memory system by combining different levels of storage with varying speed, cost, and capacity.

Open this answer on its own page →

2078 · 5 marks

What is Computer Bus? Explain the functions of data bus, address bus and control bus. [5]

Show solved answer

Computer Bus

Definition

A computer bus is a communication system that transfers data between components inside a computer, or between computers. It consists of a set of parallel wires (or signal lines) that connect the CPU, memory, and input/output devices, allowing them to share a common pathway for data transfer.


Types of Buses and Their Functions

1. Data Bus

  • The data bus is a bidirectional bus used to carry actual data between the CPU, memory, and I/O devices.
  • It transfers data to and from the processor, memory, and peripherals.
  • The width of the data bus (number of lines) determines how much data can be transferred at one time.
    • Example: An 8-bit data bus transfers 8 bits at a time; a 32-bit data bus transfers 32 bits at a time.
  • More data lines = faster data transfer.

2. Address Bus

  • The address bus is a unidirectional bus (from CPU to memory/I/O).
  • It carries the address of the memory location or I/O device that the CPU wants to read from or write to.
  • The CPU places the address of the target location on the address bus so the correct device or memory cell is selected.
  • The width of the address bus determines the maximum addressable memory.
    • Example: A 16-bit address bus can address 2^16 = 65,536 memory locations.

3. Control Bus

  • The control bus is used to carry control signals from the CPU to other components to coordinate and manage operations.
  • It is bidirectional in nature (some signals go from CPU outward, some come from devices to CPU).
  • Common control signals include:
    • Read/Write signal: Indicates whether the operation is a read or write.
    • Clock signal: Synchronizes operations.
    • Interrupt signal: Allows devices to request CPU attention.
    • Bus request/grant: Manages which device controls the bus.
  • It ensures that data transfer happens in an orderly and synchronized manner.

Summary Table

BusDirectionPurpose
Data BusBidirectionalTransfers actual data
Address BusUnidirectionalCarries memory/device address
Control BusBidirectionalCarries control and timing signals

Note: Together, these three buses form the system bus, which is the primary communication pathway in a computer system.

Open this answer on its own page →

2081.2 · 5 marks

What is computer bus? Explain the working of laser printer. [1+4]

Show solved answer

Computer Bus and Working of Laser Printer


Computer Bus [1 Mark]

A computer bus is a communication system (set of physical wires/lines) that transfers data, addresses, and control signals between the components of a computer system (such as CPU, memory, and I/O devices).

Note: Reference notes were not available for this topic; answer is based on standard CS curriculum.


Working of a Laser Printer [4 Marks]

A laser printer is a high-quality, high-speed output device that uses a laser beam and electrostatic technology to produce text and images on paper. Its working involves the following steps:


Step 1: Processing (RIP - Raster Image Processing)

  • The computer sends the document data to the printer.
  • The printer's controller converts the data into a bitmap image (a dot-by-dot representation of the page).

Step 2: Charging

  • A primary corona wire (or charge roller) applies a uniform negative electrostatic charge to the surface of the photosensitive drum (photoconductor drum).

Step 3: Exposing (Writing with Laser)

  • A laser beam is directed onto the drum through a rotating mirror.
  • Wherever the laser hits, the negative charge is neutralized (discharged), creating an invisible electrostatic image (latent image) on the drum.
  • Areas hit by the laser become relatively positively charged compared to unexposed areas.

Step 4: Developing (Toner Application)

  • Toner (fine, negatively charged black or colored powder) is applied to the drum.
  • The toner is attracted to the discharged (laser-hit) areas of the drum, making the latent image visible.

Step 5: Transferring

  • A sheet of paper is fed from the paper tray.
  • A transfer corona wire gives the paper a positive charge.
  • The negatively charged toner on the drum is attracted to the paper, transferring the image onto it.

Step 6: Fusing

  • The paper passes through the fuser unit, which consists of heated rollers.
  • Heat and pressure melt and bond the toner permanently onto the paper.
  • The printed page exits the printer.

Step 7: Cleaning

  • Any residual toner remaining on the drum is removed by a cleaning blade.
  • The drum is discharged and made ready for the next page.

Summary Diagram (Flow)

Processing → Charging → Exposing → Developing → Transferring → Fusing → Cleaning

Key Advantages of Laser Printer

  • High speed and high resolution
  • Sharp, clear text and graphics
  • Suitable for high-volume printing
Open this answer on its own page →

0 · 5 marks

Explain the computer bus. What are types of computer bus? [5]

A computer bus is a communication system that transfers data between components inside a computer or between computers. It consists of a set of physical wires (conductors) along which electrical signals are transmitted. A bus allows multiple devices to communicate using a shared set of lines, red...

Open this answer on its own page →

Instruction cycle and steps

2077 · 5 marks

What is instruction cycle? Explain the steps of instruction cycle. [1+4]

An instruction cycle (also called a fetch-execute cycle or fetch-decode-execute cycle) is the complete process that a CPU performs for each machine language instruction: fetching the instruction from memory, decoding it, and executing it. It is the basic operational process of a computer and repe...

Open this answer on its own page →

0 · 5 marks

What is instruction cycle? Explain the steps of instruction cycle. [5]

The instruction cycle (also called the fetch-execute cycle) is the complete process by which a CPU retrieves an instruction from memory, decodes it, and executes it. This cycle repeats continuously as long as the computer is running. --- The instruction cycle consists of the following main steps:...

Open this answer on its own page →

Sequential and direct access devices

2077 · 5 marks

What do you mean by sequential access and direct access of the I/O devices? Give an example of sequential access device and direct access device. [5]

Sequential access is a method of accessing data stored on a device where data must be read or written in a specific, linear order from the beginning to the desired location. To reach a particular piece of data, all preceding data must be passed through first. You cannot jump directly to a specifi...

Open this answer on its own page →

Primary memory types

2081.2 · 5 marks

What is primary memory? Discuss different types of primary memory. [1+4]

Primary memory (also called main memory or internal memory) is the memory that is directly accessible by the CPU. It holds the data and instructions that are currently being processed by the computer. It is volatile in nature (except ROM) and has faster access speed compared to secondary memory. ...

Open this answer on its own page →