Top Banner Ad

BCS302 — Unit 1: Introduction

Table of Contents (36 sections)

BCS302 · COMPUTER ORGANIZATION AND ARCHITECTURE · Unit 1

Introduction

Unit Scope & Exam Weightage: This unit builds the machine from the ground up: the six functional units and their interconnection, the three system buses, bus architecture, arbitration (especially daisy chaining), registers, register-transfer/memory transfers, the three processor organisations, general-register organisation, and stack organisation with addressing modes. In AKTU 70-mark papers, roughly 12 to 20 marks come from this unit — typically 2-mark definitions in Section A plus one 7-mark comparison/RTL question in Section B or C. Every 7-mark answer in this unit is won by writing exact register-transfer (RTL) arrows and a labelled table.


Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)

Priority Topic (Exact Syllabus) PYQs Asked Marks Weightage Tag
1 types of buses and bus arbitration 4 (2023-24 ×2, 2024-25, 2025-26) 7m × 2 + 2m × 2 Survival Mode Predicted
2 Functional units of digital system and their interconnections 2 (2024-25, 2025-26) 2m × 2 Core Concept
3 bus and memory transfer 1 (2024-25) 7m RTL Numerical
4 Processor organization 1 (2023-24) 7m Comparison
5 stack organization and addressing modes 1 (2023-24) 7m Survival Mode
6 bus architecture 1 (2025-26) 2m Core Concept
7 Register 1 (2025-26) 2m Core Concept
8 general registers organization 1 (2024-25) 2m Core Concept
9 buses integrated in #1 — Supporting Concept

2-Hour Last-Night Survival Checklist:

  1. Arbitration (#1 Priority): Memorise the three bus roles (address = unidirectional, data = bidirectional, control = RD/WR/READY) and draw the daisy-chain grant path with first master = highest priority and "one failed module breaks the chain".
  2. RTL transfers (#3 Priority): Write the exact arrow sequences — read: MAR ← addr; RD; DR ← M[MAR]; write: MAR ← addr; DR ← data; WR; M[MAR] ← DR. Never omit READY/WMFC.
  3. Processor organisation (#4 Priority): Be ready to code X = (A+B)×C in accumulator, general-register and stack organisations and compare instruction length vs memory traffic.
  4. Stack (#5 Priority): Memorise PUSH: SP ← SP−1, M[SP] ← DR and POP: DR ← M[SP], SP ← SP+1, plus the memory-stack vs register-stack table.
  5. 2-Mark guaranteed marks: Six functional units; GPR vs special-purpose registers (PC, IR, MAR, MDR, AC, SP, flags); single vs multiple bus architecture. Each is a 3–4 line answer.

1. Functional Units of a Digital System and Their Interconnections

Functional Unit (2 Marks): A functional unit is one of the five operating blocks of a digital computer — input, output, memory, ALU and control — connected by buses. Together they implement the stored-program concept: instructions and data reside in the same memory and are fetched, decoded and executed under control-unit timing.

1.1 The Five Units and What Each Contributes

Unit Role in the fetch–execute chain Key register / signal
Input Converts keyboard/mouse/sensor signals into binary words and places them in memory through an I/O interface input buffer, status flag
Output Converts binary results into human-readable form (display, printer, DAC) output buffer, driver
Memory Stores both instructions and data MAR (address), MDR/DR (word)
ALU Performs arithmetic (+, −, ×, ÷) and logic (AND, OR, NOT, XOR, shifts) and sets flags AC, carry-in, Z/C/S/V flags
Control Issues the timed control word that gates each micro-operation PC, IR, opcode decoder

1.2 Interconnection and the Fetch–Decode–Execute Chain

%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
    IN["Input unit"] --> BUS["System bus<br/>address / data / control"]
    BUS --> MEM["Memory<br/>MAR + MDR"]
    MEM --> IR["Control unit<br/>PC, IR, decoder"]
    IR --> ALU["ALU<br/>registers + flags"]
    ALU --> OUT["Output unit"]
    IR -->|"control word"| BUS

The instruction cycle seen at this level is:

PC → MAR ; RD ; M[MAR] → MDR ; MDR → IR
IR(opcode) → control decoder
IR(address) → MAR ; operands → registers
ALU operation → result register ; flags updated
PC ← PC + 1 (or branch target) ; interrupt check

Examiner Tip: For the 2-mark "enlist the functional units" question, write the five names in one line and add "connected by address, data and control buses". For a 7-mark version, add the MAR/MDR/PC/IR action chain above — that is where the step marks are.

After-Topic PYQ (2025-26 Sec A Q1b, 2 Marks): Explain the functional units of a digital computer system.

After-Topic PYQ (2024-25 Sec A Q1a, 2 Marks): Enlist the basic functional units of a digital system?


2. Buses

Bus (2 Marks): A bus is a shared group of parallel conductors that transfers binary information between CPU, memory and I/O devices. Only one master may drive a bus at a time; unused drivers are put in high-impedance (tri-state) mode.

2.1 The Three System Buses

Bus Direction Carries What its width decides
Address bus Unidirectional (master → slave) Location of the operand or I/O port Directly addressable space = 2n2^n locations for nn lines
Data bus Bidirectional Instruction word, operand, result Bits moved per bus cycle
Control bus Mixed RD, WR, M/IO, READY, INTR, INTA, clock, reset Type and timing of the transfer
Addressable locations=2naddr,Bus bandwidth=Wbus×ftransfer\text{Addressable locations} = 2^{n_{\text{addr}}}, \qquad \text{Bus bandwidth} = W_{\text{bus}} \times f_{\text{transfer}}

A 20-bit address bus addresses 220=1 M2^{20}=1\text{ M} words; a 16-bit data bus at 100 MHz transfers 16×100×106=1.6×10916\times100\times10^6 = 1.6\times10^9 bits/s = 200 MB/s.

2.2 One Bus Cycle

1. Master places address on address bus
2. Master asserts RD or WR and M/IO on control bus
3. Slave decodes address; if slow, holds READY = 0 (wait states)
4. Data is placed on / taken from the data bus when READY = 1
5. Control and address lines are released; bus becomes free

Examiner Tip: A 7-mark "compare address, data and control buses" answer must contain (i) one definition, (ii) the three-row table with direction, (iii) the width consequence 2n2^n for address and bandwidth for data, and (iv) the five-step bus cycle. Merely listing the names earns about 2 marks.

After-Topic PYQ (2024-25 Sec B Q2a, 7 Marks): What is a bus? Explain different types of buses used in a computer system. (Cluster also lists 2023-24 Sec A Q1a, 2 Marks: "What are the different types of Buses used in computer architecture?")


3. Bus Architecture

Bus Architecture: The organised interconnection of CPU, memory and peripherals using a single shared bus or a hierarchy of buses joined by bridges, together with the timing and arbitration rules that govern access.

3.1 Single-Bus vs Multiple-Bus Organisation

Feature Single bus Multiple / hierarchical bus
Hardware One common set of lines; cheapest Several buses plus bridges; costlier
Contention CPU, DMA and I/O all compete Traffic separated by level (CPU/cache bus, system bus, I/O bus)
Throughput One transfer at a time Parallel transfers on different buses
Timing Often synchronous Bridge translates protocol, voltage, width and speed
Example Early microcomputer CPU ↔ cache (fast) ↔ PCIe ↔ USB (slow)
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart TD
    CPU["CPU / cache bus<br/>fast, wide"] --> BR1["Bridge"]
    BR1 --> SYS["System bus<br/>memory + DMA"]
    SYS --> BR2["Bridge"]
    BR2 --> IO["I/O bus<br/>USB / PCIe devices"]

Examiner Tip: When asked for the "role" of bus architecture, finish with the design trade-off — more buses raise throughput but add bridge latency, cost and protocol complexity. That sentence usually earns the final mark.

After-Topic PYQ (2025-26 Sec A Q1c, 2 Marks): Explain bus architecture and its role in interconnecting various components of a digital system.


4. Types of Buses and Bus Arbitration Survival Mode Predicted

Bus Arbitration (2/7 Marks): The method of choosing exactly one requesting bus master at a time to drive the shared bus. It is needed because two masters driving the same lines simultaneously cause bus contention and corrupt data; it also provides an order of priority among competing devices.

4.1 Arbitration Schemes

Scheme How the grant is decided Strength Weakness
Daisy chaining Grant signal passes serially through masters; first requester in the chain captures it Fewest control lines, simple Fixed priority by physical position; one faulty module breaks the chain; serial propagation delay
Central parallel (fixed priority) All masters send REQ; a priority encoder/arbiter issues one GRANT Fast, explicit programmable priority Extra arbiter hardware; low-priority starvation
Rotating / round-robin Priority is rotated after each grant Fairness, no starvation More complex logic
Independent requests Separate REQ/GRANT pair per master Fastest selection Many control lines

4.2 Daisy-Chain Timing, Step by Step

%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
    ARB["Arbiter"] -->|"GRANT in"| M1["Master 1<br/>highest priority"]
    M1 -->|"GRANT out"| M2["Master 2"]
    M2 -->|"GRANT out"| M3["Master 3<br/>lowest priority"]
    M1 --> BUS["Shared address + data + control"]
    M2 --> BUS
    M3 --> BUS
    M1 -->|"BUSY"| ARB
  1. All masters that need the bus assert their individual request; the arbiter sees BUSY = 0 and issues GRANT.
  2. GRANT enters Master 1. If M1 requested, it blocks the grant, asserts BUSY and drives the bus. M2 and M3 never see the grant.
  3. If M1 did not request, it passes GRANT to M2; the first requester along the chain captures it.
  4. After the transfer, the master drops BUSY. The arbiter may issue the next grant, so a nearer master always wins over a farther one.
  5. Because the grant is a serial chain, a failed/powered-off module in the middle prevents all later masters from ever receiving the grant — the classic examination disadvantage.

Examiner Tip: The two "why" points examiners demand are (1) to prevent bus contention and (2) to provide priority. In the daisy-chain diagram label GRANT IN, GRANT OUT and BUSY explicitly; then state "priority equals physical distance from the arbiter".

After-Topic PYQ (2024-25 Sec C Q3b — 7 Marks): Compare and contrast the characteristics and functionalities of address buses, data buses, and control buses?

After-Topic PYQ (2023-24 Sec B Q2a — 7 Marks): What is meant by the term BUS arbitration? Why is it needed? How can bus arbitration be implemented in Daisy chaining scheme?

After-Topic PYQ (2025-26 Sec A Q1a — 2 Marks): What is a bus? Explain different types of buses used in a computer system.


5. Register

Register (2 Marks): A register is a small, directly addressable bank of edge-triggered flip-flops inside the CPU that holds an operand, address, instruction or status word for one or more clock cycles. An nn-bit register stores nn bits and is loaded only when its load-enable and clock are active.

5.1 General-Purpose vs Special-Purpose Registers

Class Examples Role
General-purpose R0–R15 Hold temporary operands/addresses; shorten instructions and reduce memory trips
Special-purpose PC Address of next instruction; incremented after fetch or loaded by a branch
IR Holds the fetched instruction while opcode and mode are decoded
MAR / MDR Memory address / data word at the bus interface
AC Implicit accumulator operand and result
SP Address of the top of the current stack
PSW/flags Z, C, S, V, parity, interrupt-enable bits from ALU operations

5.2 Register File

A general register file of 2k2^k registers needs a kk-bit field in the instruction. A typical single-bus ALU datapath has two read ports and one write port; the control unit asserts the source selects and the load-enable of the destination on the active clock edge.

Examiner Tip: For 2 marks write: "GPRs are programmer-visible operand stores; special registers have a fixed role in the instruction cycle" and then name PC, IR, MAR, MDR, AC, SP and flags with one phrase each. Do not drift into pipeline discussion here.

After-Topic PYQ (2025-26 Sec A Q1d, 2 Marks): What is a register? Explain general-purpose and special-purpose registers.

After-Topic PYQ (2024-25 Sec A Q1b, 2 Marks): Define general-purpose registers in a processor?


6. Bus and Memory Transfer

Bus and Memory Transfer: The movement of a word between registers, buses and memory, described in register-transfer notation (RTL) with explicit address setup and read/write control. A transfer occurs only on a clock edge or when the handshake completes.

6.1 Register Transfer and Memory Read/Write

Operation RTL sequence Signals
Register transfer R2←R1R_2 \leftarrow R_1 R1_out, R2_in
Memory read MAR←A; RD; MDR←M[MAR]MAR \leftarrow A;\ RD;\ MDR \leftarrow M[MAR] RD, WMFC/READY, MDR_in
Memory write MAR←A; MDR←R1; WR; M[MAR]←MDRMAR \leftarrow A;\ MDR \leftarrow R_1;\ WR;\ M[MAR] \leftarrow MDR WR, MDR_out, WMFC/READY
R2←R1,DR←M[MAR],M[MAR]←DRR_2 \leftarrow R_1, \qquad DR \leftarrow M[MAR], \qquad M[MAR] \leftarrow DR

Tri-state rule: exactly one driver may place data on the bus. All other outputs must be high-impedance (Z), otherwise contention destroys the word.

6.2 Timed Write Example — Write R1 to location 2048H

T0: MAR ← 2048H          (address leaves CPU on address bus)
T1: MDR ← R1 ; WR = 1    (data leaves CPU on data bus)
T2: wait while READY = 0 (WMFC — memory slow relative to CPU)
T3: M[MAR] ← MDR ; WR = 0, deassert control; bus released

The read path is identical except RD = 1 and the final step is MDR ← M[MAR], after which the word is gated onto the bus into the target register.

Examiner Tip: The three words that fetch marks in the 7-mark transfer question are MAR, RD/WR and READY (or WMFC). Write them on every numbered step; a sequence without the wait state is treated as incomplete.

After-Topic PYQ (2024-25 Sec B Q2a — 7 Marks): Discuss the process of data transfer between registers, buses, and memory units in a digital system. Include explanations of read and write operations?


7. Processor Organization

Processor Organization: The arrangement of the datapath, register set, ALU, control unit and buses that implements the instruction set. The classic classifications are accumulator, general-register and stack organisation.

7.1 Worked Comparison — Evaluate X = (A + B) × C

Organisation Program Instruction count Memory traffic
Accumulator LOAD A; ADD B; MUL C; STORE X 4 High — one operand of every ALU op comes from memory
General-register (2-address) MOV R1,A; ADD R1,B; MUL R1,C; MOV X,R1 4 Low — one memory read per operand, result kept on chip
Stack (0-address) PUSH A; PUSH B; ADD; PUSH C; MUL; POP X 6 Medium — operands enter/leave through the stack

7.2 Register–Memory vs Load–Store

  • Register–memory: an ALU instruction may name a memory operand directly (e.g., x86 ADD R1, [A]). Fewer instructions, longer decode.
  • Load–store: only LOAD/STORE touch memory; ALU operands must be registers (RISC style). More instructions, simpler hardware and easier pipelining.
CPU time=IC×CPI×1fclockCPU\ time = IC \times CPI \times \frac{1}{f_{clock}}

Organisation changes all three factors: a register machine lowers IC and usually CPI but may lengthen the instruction word (more register fields).

Examiner Tip: A 7-mark answer must include one worked instruction sequence for each organisation, not just definitions. End with the trade-off sentence: accumulator = shortest word/highest memory traffic; general register = fastest; stack = most compact opcode/zero address bits.

After-Topic PYQ (2023-24 Sec C Q3a — 7 Marks): What do you mean by processor organization? Explain various types of processor organization with suitable example.


8. General Registers Organization

General Register Organization: A bank of 2k2^k addressable CPU registers that supplies operands to the ALU and holds effective addresses. The instruction devotes kk bits per register field.

8.1 Address Formats Inside a Register Machine

Format Example Effect Encoding cost
3-address ADD R1,R2,R3 R1←R2+R3R_1 \leftarrow R_2 + R_3 (no operand destroyed) 3k3k register bits — longest
2-address ADD R1,R2 R1←R1+R2R_1 \leftarrow R_1 + R_2 (R1 overwritten) 2k2k bits
1-address ADD R2 AC←AC+R2AC \leftarrow AC + R_2 kk bits
0-address ADD top two stack entries none

8.2 Base and Index Registers

Effective address calculations use on-chip registers:

EA=A(direct),EA=(XR)+A(indexed),EA=(Base)+A(base + displacement)EA = A \quad (\text{direct}), \qquad EA = (XR) + A \quad (\text{indexed}), \qquad EA = (Base) + A \quad (\text{base + displacement})

A 16-register file needs a 4-bit register field. Register windows (overlapping banks) reduce save/restore traffic on procedure calls.

Examiner Tip: State the RTL of 3-, 2- and 1-address forms exactly as shown in the table and finish with the trade-off: more register fields → longer instruction word but fewer memory references and fewer instructions.

After-Topic PYQ (2024-25 Sec A Q1b, 2 Marks): Define general-purpose registers in a processor?


9. Stack Organization and Addressing Modes

Stack: a LIFO storage structure addressed by a stack pointer SP. Addressing mode: the rule that converts the address field of an instruction into the effective address (EA) of its operand.

9.1 Memory Stack vs Register Stack

Feature Memory stack Register stack
Storage A region of main memory A fixed on-chip register bank
Pointer SP register holding a memory address 5-bit stack pointer inside the register file
Speed / capacity Slower, large capacity Faster, limited capacity (e.g., 64 words)
Push SP←SP−1; M[SP]←DRSP \leftarrow SP-1;\ M[SP] \leftarrow DR SP←SP+1; R[SP]←DRSP \leftarrow SP+1;\ R[SP] \leftarrow DR
Pop DR←M[SP]; SP←SP+1DR \leftarrow M[SP];\ SP \leftarrow SP+1 DR←R[SP]; SP←SP−1DR \leftarrow R[SP];\ SP \leftarrow SP-1

The example in the syllabus question compares a memory stack (grows downward) with a register stack (grows upward into higher register numbers).

9.2 Addressing Modes at a Glance

Mode Effective address Typical use
Immediate Operand = A (no memory access) Constants
Direct EA=AEA = A Simple variables
Indirect EA=M[A]EA = M[A] Pointers
Register EA=RiEA = R_i Fastest after immediate
Register-indirect EA=(Ri)EA = (R_i) Array pointer
Indexed / base EA=A+(XR)EA = A + (XR) / Base+ABase + A Arrays, relocation
PC-relative EA=PC+dEA = PC + d Branches, position-independent code

9.3 Subroutine Linkage

CALL: SP←SP−1, M[SP]←PC, PC←addrRET: PC←M[SP], SP←SP+1CALL:\ SP \leftarrow SP-1,\ M[SP] \leftarrow PC,\ PC \leftarrow addr \qquad RET:\ PC \leftarrow M[SP],\ SP \leftarrow SP+1

A stack frame also stores local variables and saved registers; SP is restored on return.

Examiner Tip: For the 7-mark "differentiate memory stack and register stack" answer, give the 5-row table, the push/pop RTL for both, and one CALL/RET example. Mention that a register stack is faster but overflows sooner — that contrast is the scored point.

After-Topic PYQ (2023-24 Sec C Q3b — 7 Marks): Differentiate between Memory stack and register stack.


Solved Exam-Ready Questions

Solved Q1 (2024-25 Sec C Q3b — 7 Marks | Survival Mode)

Q: Compare and contrast the characteristics and functionalities of address buses, data buses, and control buses?

Solution:

  1. Common definition: the system bus is the shared set of conductors along which CPU, memory and I/O exchange information.
  2. Address bus: unidirectional from the current bus master; an nn-line address bus selects 2n2^n locations. It carries where, never what.
  3. Data bus: bidirectional; an mm-line data bus moves mm bits per cycle, so bandwidth =m×f= m \times f. It carries instructions, operands and results.
  4. Control bus: carries RD, WR, M/IO, READY, clock, reset and interrupt lines. It decides which operation and when the data is valid.
  5. Comparison table:
Feature Address bus Data bus Control bus
Direction One-way Two-way Mixed
Determines Address space 2n2^n Bits per transfer Operation and timing
Typical lines 20/32 8/16/32/64 ~10–20
  1. Worked illustration: a 20-bit address and 16-bit data bus at 100 MHz addresses 1 M words and transfers 200 MB/s; a memory write drives address first, asserts WR, then drives data, completing on READY = 1.
  2. Conclusion: separating the three buses lets every transfer be described as address → control → data → release, the sequence all timing diagrams are built from.

Solved Q2 (2023-24 Sec B Q2a — 7 Marks | Survival Mode)

Q: What is meant by the term BUS arbitration? Why is it needed? How can bus arbitration be implemented in Daisy chaining scheme?

Solution:

  1. Meaning: bus arbitration is the selection of one requesting master at a time to use the shared bus.
  2. Need: without arbitration two masters could drive the data bus together (contention, corrupted data); arbitration also fixes priority so a fast device such as DMA is served before a slow peripheral.
  3. Daisy-chain hardware: a single GRANT line is passed from master to master; a common BUSY line tells the arbiter the bus is taken. Each master has a local "grant-in/grant-out" pair.
  4. Sequence: (i) masters assert requests and see BUSY = 0; (ii) arbiter asserts GRANT into M1; (iii) a requesting master captures the grant, blocks further propagation, asserts BUSY and transfers; (iv) a non-requesting master forwards the grant; (v) after transfer, BUSY drops and the arbiter may grant again.
  5. Priority result: the master physically closest to the arbiter has the highest priority, because it sees the grant first.
  6. Disadvantages: serial grant propagation limits speed; a failed module opens the chain and starves all later masters; priority cannot be changed without rewiring.
  7. Conclusion: daisy chaining trades flexibility and speed for the minimum number of control lines — hence its use in small, simple buses.

Solved Q3 (2024-25 Sec B Q2a — 7 Marks)

Q: Discuss the process of data transfer between registers, buses, and memory units in a digital system. Include explanations of read and write operations?

Solution:

  1. Register transfer: R2←R1R_2 \leftarrow R_1 requires R1_out = 1 and R2_in = 1 for one clock; only the selected source drives the bus.
  2. Read cycle: MAR←AMAR \leftarrow A places the address; RD = 1, M/IO = 1; CPU waits while READY = 0; then MDR←M[MAR]MDR \leftarrow M[MAR]; finally Ri←MDRR_i \leftarrow MDR on the next clock.
  3. Write cycle: MAR←AMAR \leftarrow A and MDR←RiMDR \leftarrow R_i; WR = 1; wait for READY = 1; memory latches M[MAR]←MDRM[MAR] \leftarrow MDR; deassert control.
  4. Tri-state discipline: at most one driver active; all other outputs must be high-impedance, or contention occurs.
  5. Timing: synchronous buses sample on clock edges; asynchronous buses use the READY/ACK handshake so a slow memory can insert wait states.
  6. Worked example (write R1 to 2048H): MAR ← 2048H; MDR ← R1; WR=1; wait READY; M[MAR] ← MDR; WR=0.
  7. Conclusion: every transfer is an address phase, a control phase, a data phase and a release phase; writing these four phases in RTL is the full-credit answer.

Solved Q4 (2023-24 Sec C Q3a — 7 Marks)

Q: What do you mean by processor organization? Explain various types of processor organization with suitable example.

Solution:

  1. Meaning: processor organisation is the arrangement of datapath, registers, ALU and control that realises the instruction set.
  2. Accumulator: one implicit AC; LOAD A; ADD B; STORE X computes X=A+BX=A+B. Short word, many memory reads.
  3. General register: operands on chip; MOV R1,A; ADD R1,B; MOV X,R1. Fewer memory trips, longer register fields.
  4. Stack: zero-address ALU ops on the top two entries; PUSH A; PUSH B; ADD; POP X. Compact opcode, stack-management overhead.
  5. Worked comparison for X=(A+B)×CX=(A+B)\times C: accumulator 4 instructions / 4 memory reads; general register 4 instructions / 3 reads; stack 6 instructions / 5 pushes-pops.
  6. Register–memory vs load–store: direct memory operands shorten code but complicate decoding; load–store simplifies pipelining.
  7. Conclusion: the choice is a trade-off among instruction length, memory traffic and hardware simplicity; modern RISC uses general registers with load–store, while early machines used the accumulator.

Solved Q5 (2023-24 Sec C Q3b — 7 Marks)

Q: Differentiate between Memory stack and register stack.

Solution:

  1. Memory stack: a portion of main memory addressed by the SP register; grows downward. PUSH: SP ← SP−1, M[SP] ← DR; POP: DR ← M[SP], SP ← SP+1.
  2. Register stack: a fixed on-chip register file with a 5-bit pointer; grows toward higher register numbers. PUSH: SP ← SP+1, R[SP] ← DR; POP: DR ← R[SP], SP ← SP−1.
  3. Table:
Feature Memory stack Register stack
Location Main memory CPU register bank
Speed Slower (memory cycle) Faster (register cycle)
Capacity Large, limited by memory Small (e.g., 64 words)
Full condition SP crosses stack limit SP reaches top register
  1. Linkage example: CALL addr pushes the return PC; RET pops it back into PC, so nested calls work in both organisations.
  2. Use: memory stack supports deep recursion and large frames; register stack supports fast leaf calls.
  3. Conclusion: both are LIFO and use SP; they differ in where the words live and therefore in speed, capacity and push/pop direction.

Solved Q6 (2-Mark Cluster — 2024-25 / 2025-26 Sec A)

Q: What are the different types of Buses used in computer architecture? / What is a register? Explain general-purpose and special-purpose registers.

Solution (short answers):

  • Buses: address bus (unidirectional, selects one of 2n2^n locations), data bus (bidirectional, mm bits per cycle), control bus (RD, WR, clock, READY, interrupt).
  • Register: an nn-bit flip-flop bank loaded on a clock edge. GPRs (R0–R15) hold programmer operands; special registers (PC, IR, MAR, MDR, AC, SP, flags) each have a fixed role in the instruction cycle.

Practice Questions (Self-Test)

  1. (2 Marks) Define a bus and state the direction of each of the three system buses.
  2. (2 Marks) What is arbitration and why is it needed? Name two arbitration schemes other than daisy chaining.
  3. (2 Marks) Distinguish general-purpose and special-purpose registers with two examples each.
  4. (7 Marks) Draw the daisy-chain arbitration arrangement for three masters and explain, step by step, how M2 wins the bus when M1 is idle.
  5. (7 Marks) Write the complete RTL sequences for reading M[2048]M[2048] into R3 and for writing R3 into M[2048]M[2048], naming every control signal.
  6. (7 Marks) Evaluate X=(A−B)+(C×D)X = (A-B) + (C\times D) using accumulator, general-register and stack organisations; tabulate instruction count and memory accesses.
  7. (7 Marks) Compare memory stack and register stack under the heads location, pointer, speed, capacity and push/pop RTL.
  8. (7 Marks) Explain bus architecture with a diagram showing a fast CPU bus, a system bus and a slow I/O bus joined by bridges.
  9. (2 Marks) An address bus has 24 lines and a data bus 32 lines at 50 MHz. Compute the addressable space and the bus bandwidth.
  10. (7 Marks) Why must all unused bus drivers be tri-stated? Explain with a two-master contention example and state how arbitration prevents it.