CSC213 · TU past paper
Computer Architecture 2077 question paper
The complete TU 2077 exam paper for Computer Architecture (CSC213), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- Q1.10 marksNumericalPipeliningHideAnswer
What do you mean by pipeline? Explain with space time diagram for a six segmented pipeline showing the time it takes to process eight tasks.[10]
Pipeline: Definition and Space-Time Diagram
Given
- Number of pipeline segments: $k = 6$
- Number of tasks to be processed: $n = 8$
(All required numeric values are present.)
Solution
What is a Pipeline?
A pipeline is a technique of decomposing a sequential process into sub-operations, with each sub-operation being executed in a dedicated segment that operates concurrently with all other segments. Information flows through the segments much like an industrial assembly line: while one segment works on one task, another segment simultaneously works on a different task.
Each segment consists of a combinational circuit that performs a sub-operation, followed by a register (latch) that holds the intermediate result to be passed to the next segment on the next clock pulse. All registers are controlled by a common clock.
The diagram that shows which segment is busy with which task at each clock period is called a space-time diagram.
Total Time for a k-Segment Pipeline Processing n Tasks
For a $k$-segment pipeline executing $n$ tasks, the number of clock cycles required is:
$$\text{Total Clock Cycles} = k + (n - 1)$$
Substituting $k = 6$ and $n = 8$:
$$= 6 + (8 - 1) = 6 + 7 = \boxed{13 \text{ clock cycles}}$$
- The first task fills all 6 segments and completes at the end of clock cycle 6.
- Thereafter, one task completes at every clock cycle, so the remaining 7 tasks finish in the next 7 cycles (cycles 7 to 13).
Space-Time Diagram (6 segments, 8 tasks)
Segment | Clock Cycles | 1 2 3 4 5 6 7 8 9 10 11 12 13 --------|------------------------------------------------------ S1 | T1 T2 T3 T4 T5 T6 T7 T8 . . . . . S2 | . T1 T2 T3 T4 T5 T6 T7 T8 . . . . S3 | . . T1 T2 T3 T4 T5 T6 T7 T8 . . . S4 | . . . T1 T2 T3 T4 T5 T6 T7 T8 . . S5 | . . . . T1 T2 T3 T4 T5 T6 T7 T8 . S6 | . . . . . T1 T2 T3 T4 T5 T6 T7 T8Each task moves diagonally through the six segments.
Task Completes at cycle T1 6 T2 7 T3 8 T4 9 T5 10 T6 11 T7 12 T8 13
Speedup Compared with Non-Pipelined Execution
Method Time Required Non-pipelined $n \times k = 8 \times 6 = 48$ cycles Pipelined $k + (n-1) = 13$ cycles Speedup:
$$S = \frac{n \times k}{k + (n-1)} = \frac{48}{13} \approx 3.69$$
As $n \to \infty$, the maximum speedup approaches $k = 6$.
Conclusion
A pipeline overlaps the execution of tasks across multiple segments. A six-segment pipeline processing eight tasks needs only 13 clock cycles (against 48 without pipelining), giving a speedup of about 3.69. The space-time diagram confirms that once the pipeline is full (from cycle 6), one task completes every clock cycle.
- Q2.10 marksNumericalBooth MultiplicationHideAnswer
Explain Booth multiplication algorithm with hardware implementation diagram. Multiply (-4) x (-3) using Booth multiplication algorithm.[10]
- Q3.10 marksModes of TransferHideAnswer
Define I/O interface. Comparison between programmed I/O, Interrupt driven I/O and direct memory access (DMA).[10]
- Q4.5 marksProgram Interrupt & Interrupt CycleHideAnswer
Draw an instruction cycle state diagram with interrupt and explain it. [5]
- Q5.5 marksRegister Transfer LanguageHideAnswer
Explain register transfer language with example. [5]
- Q6.5 marksNumericalInstruction FormatsHideAnswer
Write codes using 3, 2 and 1 address instruction formats to perform the given operations. $X = A/B + C * D/C$ [5]
- Q7.5 marksAddressing ModesHideAnswer
Explain the various addressing modes with example. [5]
- Q8.5 marksDesign of Control UnitHideAnswer
Differentiate between hardwired control unit and microprogrammed control unit. [5]
Differences Between Hardwired Control Unit and Microprogrammed Control Unit
Definitions
Hardwired Control Unit: A control unit in which control signals are generated by hardware using conventional logic design techniques. It generates a specific sequence of control signals directly through logic circuits.
Microprogrammed Control Unit: A control unit whose binary control variables (control signals) are stored in a special memory called control memory. Control signals are generated with the help of micro-instructions stored in that memory.
Comparison Table
Basis Hardwired Control Unit Microprogrammed Control Unit Signal Generation Control signals are generated using hardware logic circuits Control signals are generated using micro-instructions stored in control memory Speed Faster, since signals are produced directly by hardware Slower, since micro-instructions must be fetched and decoded Modifiability Difficult to modify; changes require rewiring the hardware Easy to modify; only the micro-instructions (software level) need to be changed Cost Expensive, as everything must be realized in terms of logic gates Less expensive, as only micro-instructions are used Complexity Cannot handle complex instructions efficiently Can handle complex instructions easily Usage Used in RISC (Reduced Instruction Set Computers) Used in CISC (Complex Instruction Set Computers) Storage No control memory required Requires a dedicated control memory to store the microprogram
Summary
In short, a hardwired control unit trades flexibility for speed and simplicity, while a microprogrammed control unit trades speed for flexibility and the ability to handle complex instruction sets. Modern RISC processors prefer hardwired design, whereas traditional CISC processors (such as Intel x86) rely on microprogramming.
- Q9.5 marksPipeliningHideAnswer
How performance of computer is increased using pipeline? Explain with practical example. [5]
- Q10.5 marksDivision of Signed magnitude DataHideAnswer
Differentiate between restoring division and non-restoring division. [5]
- Q11.5 marksCache MemoryHideAnswer
Give the appropriate reasons why replacement algorithm is required in associative mapping? [5]
- Q12.5 marksInput-Output InterfaceHideAnswer
Differentiate between isolated versus memory mapped I/O. [5]