Computer Organization and Architecture
Comprehensive exam revision notes for BCA-207N Unit 1 (Basic Organization, CPU Registers & Control Unit). Includes Section A (2M), Section B (5M), and Section C (15M) questions, answers, and diagrams.
Computer Organization and Architecture
Basic Organization, CPU Registers & Control Unit
Core Definitions & Key Concepts
Computer Organization and Computer Architecture
| Feature | Computer Architecture | Computer Organization |
|---|---|---|
| Focus | Programmer-visible attributes and functional behavior (Instruction Set, data types, addressing modes). | Operational hardware units and their physical interconnections realizing architectural specs. |
| Example | Whether a machine has a hardware multiply instruction or 32-bit registers. | Clock frequency, memory technology (SRAM/DRAM), ALU circuit implementation. |
| Visibility | Directly visible to assembly language programmer and compiler designers. | Invisible to application programmers. |
What is the Stored Program Concept in Von Neumann Architecture
The Stored Program Concept (formulated by John von Neumann in 1945) states that program instructions and data are stored together in the same unified primary memory address space, and instructions are fetched sequentially from memory into the CPU for decoding and execution.
List five essential CPU registers in Mano's basic computer and state their functions
- PC (Program Counter, 12 bits): Holds the memory address of the next instruction to be fetched.
- AR (Address Register, 12 bits): Holds the memory address for operand read/write operations.
- IR (Instruction Register, 16 bits): Holds the instruction code fetched from memory.
- AC (Accumulator, 16 bits): General-purpose processing register that stores ALU computation results.
- DR (Data Register, 16 bits): Holds the memory operand read from RAM before ALU processing.
What is Register Transfer Language (RTL)? Give an example
Register Transfer Language (RTL) is a concise symbolic notation used to describe microoperations transferred among digital registers in a computer system. Example: R2 ← R1 denotes transferring the binary contents of register R1 into register R2 upon an active clock pulse edge.
Hardwired Control Unit and Microprogrammed Control Unit
A Hardwired Control Unit is implemented using fixed combinational logic circuits (gates, multiplexers, decoders); it is blisteringly fast but inflexible (modifying instruction logic requires hardware redesign). A Microprogrammed Control Unit stores control word bit sequences (microinstructions) in a dedicated Control ROM (Control Memory); it is slower due to ROM fetch cycles but highly modular, flexible, and easily upgraded.
The function of Tri-State Buffers in a Common Bus System
A Tri-State Buffer is a digital logic gate with three output states: Logic 0, Logic 1, and High-Impedance (High-Z / open circuit). By asserting the enable line of only one register buffer at a time while setting all others to High-Z, multiple registers can safely share a single common physical bus without electrical contention or short circuits.
Conceptual & Architectural Analysis
Illustrate and explain the Common Bus System using Multiplexers for 16-bit computer registers
Common Bus System for Basic Computer
Instead of having separate point-to-point connections between every pair of registers, a Common Bus System provides a shared highway of 16 wires connecting all registers and memory.
+-------------------------------------------------------+
| Common Bus (16 lines) |
+-------------------------------------------------------+
^ ^ ^ ^ ^
| | | | |
+-------+ +-------+ +-------+ +-------+ +-------+
| MUX 0 | | MUX 1 | | MUX 2 | ... |MUX 15 | |
+-------+ +-------+ +-------+ +-------+ +-------+
^ ^ ^ ^ ^
+-----------+-----------+-----------+-----------+
|
Selection Inputs: S2, S1, S0Multiplexer Selection Encoding Table:
| S_2 | S_1 | S_0 | Register Selected onto Bus |
|---|---|---|---|
| 0 | 0 | 0 | None |
| 0 | 0 | 1 | AR (Address Register) |
| 0 | 1 | 0 | PC (Program Counter) |
| 0 | 1 | 1 | DR (Data Register) |
| 1 | 0 | 0 | AC (Accumulator) |
| 1 | 0 | 1 | IR (Instruction Register) |
| 1 | 1 | 0 | TR (Temporary Register) |
| 1 | 1 | 1 | Memory Unit (M[AR]) |
- Loading Data into Registers: The 16 bus lines are routed to the inputs of ALL registers. However, data is loaded strictly into the register whose specific LD (Load) control input is active on the next rising clock pulse edge.
The Instruction Cycle in detail, including Fetch, Decode, and Effective Address phases
The Basic Instruction Execution Cycle
The instruction cycle is decomposed into distinct, synchronized micro-operations controlled by sequence counter (SC) timing signals T_0, T_1, T_2, T_3, \dots:
[ Start ]
|
+---------v---------+
| T0: AR <- PC | (Fetch Phase)
| T1: IR <- M[AR], |
| PC <- PC + 1 |
+---------+---------+
|
+---------v---------+
| T2: Decode IR | (Decode Phase)
| AR <- IR(0-11)|
| I <- IR(15) |
+---------+---------+
|
Is Addressing Indirect? (I == 1)
/ \
Yes / \ No
v v
+------------+ +-------------+
| T3: AR <- | | Direct: | (Effective Address Read)
| M[AR] | | AR is final |
+------------+ +-------------+
\ /
v v
+------------+
| Execute T4 | (Execute Phase)
| SC <- 0 |
+------------+- Fetch Phase ($T_0, T_1$):
- T_0: AR ← PC (Transfer program counter address to address register).
- T_1: IR ← M[AR], PC ← PC + 1 (Read instruction from memory into IR and increment PC).
- Decode Phase ($T_2$):
- Opcode bits decoded; AR ← IR(0-11) loads operand address; Mode bit I ← IR(15) is examined.
- Effective Address Phase ($T_3$):
- If indirect bit I = 1, memory access AR ← M[AR] fetches actual operand address from RAM.
The organization of a Microprogrammed Control Unit with a block diagram
Microprogrammed Control Unit Architecture
In a microprogrammed control unit, control signals are generated by reading sequential binary patterns (microinstructions) stored in a high-speed read-only memory called Control Memory.
+------------------------------+
| Next Address Generator | <--- External Inputs (Opcodes, Flags)
| (Sequencer) |
+------------------------------+
|
v
+------------------------------+
| Control Address Register CAR |
+------------------------------+
|
v
+------------------------------+
| Control Memory | (ROM containing Microprograms)
+------------------------------+
|
v
+------------------------------+
| Control Data Register (CDR) |
+------------------------------+
/ \
/ \
v v
Micro-Operation Field Branch & Next Address Field
(Control Signals to Datapath) (Feeds back to Sequencer)- Control Word: A string of bits where individual bit positions or decoded fields enable specific control gates and ALU functions.
- Sequencer Functions: Increments CAR by 1, loads jump target address from microinstruction on branch condition, or maps machine opcode to microprogram start address.
In-Depth Analysis & Implementation
Critically evaluate Hardwired Control vs Microprogrammed Control. Design the architecture of both and provide a complete comparison across speed, flexibility, cost, instruction set complexity, and modern usage
Comprehensive Architectural Comparison: Hardwired vs Microprogrammed Control
The Control Unit (CU) orchestrates the movement of data through registers, buses, and ALU units by issuing synchronized control signals.
Hardwired Control Unit Microprogrammed Control Unit
+------------------------------------+ +------------------------------------+
| Clock -> State Counter -> Decoders | | Clock -> Microprogram Sequencer |
| Instruction Register -> Logic Gates| | Control Address Register (CAR) |
| Flags -> Combinational Logic Net | | Control ROM (Microcode Store) |
| Output: Direct Control Wire Signals| | Microinstruction Register (MIR) |
+------------------------------------+ +------------------------------------+In-Depth Comparison Matrix:
| Parameter | Hardwired Control Unit | Microprogrammed Control Unit |
|---|---|---|
| Circuit Implementation | Combinational logic gates, flip-flops, multiplexers, and state-machine decoders. | Microprograms stored in high-speed Control ROM / PROM. |
| Execution Speed | Extremely fast (single gate-delay propagation, typically sub-nanosecond). | Slower (requires memory read cycle from Control ROM for each microinstruction). |
| Design Flexibility | Highly rigid. Any change in instruction set requires physical rewiring and chip refabrication. | Highly flexible. Modifying instructions simply requires updating microcode ROM tables. |
| Instruction Set Complexity | Ideal for RISC architectures with few, simple, fixed-length instructions. | Ideal for CISC architectures with complex, multi-cycle, variable-length instructions. |
| Chip Area & Cost | Requires larger silicon footprint as instruction complexity grows; expensive to design. | Compact, systematic silicon layout; lower initial design cost for complex sets. |
| Error Correction / Patching | Impossible post-fabrication without physical chip replacement. | Microcode can be patched via reloadable control store (WCS / microcode updates). |
| Modern Usage | Ultra-high performance RISC cores (ARM Cortex-A78, Apple M-series, RISC-V). | x86 CISC processors (Intel Core i9, AMD Ryzen) which decode CISC instructions into RISC-like micro-ops (µops). |
Register Transfer Operations: Arithmetic Microoperations, Logic Microoperations, and Shift Microoperations. Present the design of a 4-bit Arithmetic Circuit using Full Adders and Multiplexers
Register Transfer Microoperations & 4-Bit Arithmetic Circuit Design
Microoperations are elementary operations performed on information stored in one or more registers during a single clock cycle.
1. Categories of Microoperations
- Register Transfer: Moves data between registers (R2 ← R1).
- Arithmetic Microoperations: Addition (R3 ← R1 + R2), Subtraction (R3 ← R1 + \overline{R2} + 1), Increment (R1 ← R1 + 1), Decrement (R1 ← R1 - 1).
- Logic Microoperations: Bitwise AND, OR, XOR, NOT, Bit Clear, Masking.
- Shift Microoperations: Logical Shift (inserts 0), Circular / Rotate Shift (re-circulates end bits), Arithmetic Shift (preserves sign bit).
2. Design of a 4-Bit Arithmetic Circuit
The arithmetic circuit accepts two 4-bit inputs A and B, selection lines S_1, S_0, and input carry C_{in}, utilizing 4 Full Adders (FA) and 4 multiplexers.
Input B Selection S1, S0
| |
v v
+-------------------+
| 4-to-1 Multiplexer| ===> Generates modified input Y to Full Adder
+-------------------+
|
v (Input Y)
+-------------+
Input A ->| 4-Bit Full | <--- Carry In (Cin)
| Adder Array |
+-------------+
|
v
Output F (4 bits) and Carry Out (Cout)Function Table of the Arithmetic Circuit:
| S_1 | S_0 | C_{in} | Y Input | Output F = A + Y + C_{in} | Microoperation Name |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | F = A | Transfer A |
| 0 | 0 | 1 | 0 | F = A + 1 | Increment $A$ |
| 0 | 1 | 0 | B | F = A + B | Add ($A + B$) |
| 0 | 1 | 1 | B | F = A + B + 1 | Add with Carry |
| 1 | 0 | 0 | \overline{B} | F = A + \overline{B} | Subtraction with Borrow (1's Comp) |
| 1 | 0 | 1 | \overline{B} | F = A + \overline{B} + 1 | Subtract ($A - B$ using 2's Complement) |
| 1 | 1 | 0 | All 1s (-1) | F = A - 1 | Decrement $A$ |
| 1 | 1 | 1 | All 1s (-1) | F = A | Transfer A |
Important Exam Points & Quick Revision
Examiner Insights & University Exam Strategy:
- 5-Mark Question: Comparison of Computer Organization vs Architecture or Hardwired vs Microprogrammed Control is virtually certain. Always include the function table or block diagram.
- Instruction Cycle: Memorize RTL statements for T_0, T_1, T_2, T_3. Clearly state that T_0 and T_1 are universal fetch steps across all basic computer instructions.
- Common Bus Diagram: Practice drawing the 4-to-1 multiplexer bus diagram showing selection line encoding.
100% left on this page — finishing it closes the gap for Basic Organization, CPU Registers & Control Unit.
Basic Organization, CPU Registers & Control Unit still counts as a weak topic until you finish this note and answer its questions.
Practise this unitTest Your Understanding
Now that you've read through these notes, practice unit MCQs to identify weak points and solidify your learning before exams.