BSc CSIT (TU) Science Computer Architecture (BSc CSIT, CSC208) Question Paper 2079 Nepal
This is the official BSc CSIT (TU) (Science stream) Computer Architecture (BSc CSIT, CSC208) question paper for 2079, as set in the regular annual examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Computer Architecture (BSc CSIT, CSC208) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Computer Architecture (BSc CSIT, CSC208) exam or solving previous years' question papers, this 2079 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Explain the design of a binary adder-subtractor circuit. Describe Booth's multiplication algorithm and multiply (-5) x (3) using it.
Binary Adder-Subtractor Circuit
A combined adder-subtractor is built from an n-bit parallel binary adder (a chain of full adders) plus an XOR gate on each B input and a mode-control line .
- Each bit of input passes through an XOR gate whose other input is .
- The control line is also fed to the carry-in of the least-significant full adder.
Operation:
- When : each XOR output equals and , so the circuit computes (addition).
- When : each XOR output equals (1's complement of B) and adds one, giving the 2's complement of B. Thus the circuit computes (subtraction).
The overflow for signed numbers is detected by .
M ---+----+----+-----------+
| | | |
B3 B2 B1 B0 (each XORed with M)
| | | |
[FA]<-[FA]<-[FA]<-[FA]<-- C0 = M
| | | |
S3 S2 S1 S0 Cout = C4
Booth's Multiplication Algorithm
Booth's algorithm multiplies two signed 2's-complement numbers by examining pairs of bits and reduces the number of add/subtract operations over runs of identical bits.
Registers: (accumulator, initially 0), (multiplier), (extra bit, initially 0), (multiplicand). Count = number of bits .
Rule (inspect ):
| Action | |
|---|---|
| 00 | No operation |
| 01 | |
| 10 | |
| 11 | No operation |
After the operation, perform an arithmetic shift right (ASR) of the combined register . Repeat times. The result is in .
Multiply (−5) × (3) using Booth's Algorithm
Use 4-bit 2's complement.
- Multiplicand , so .
- Multiplier .
- , , .
| Step | Operation | ||||
|---|---|---|---|---|---|
| Init | – | – | 0000 | 1011 | 0 |
| 1 | 10 | 1101 | 1011 | 0 | |
| ASR | 1110 | 1101 | 1 | ||
| 2 | 11 | none | 1110 | 1101 | 1 |
| ASR | 1111 | 0110 | 1 | ||
| 3 | 01 | 0010 | 0110 | 1 | |
| ASR | 0001 | 0011 | 0 | ||
| 4 | 10 | 1110 | 0011 | 0 | |
| ASR | 1111 | 0001 | 1 |
Result .
This is an 8-bit 2's complement value. Its 2's complement is , so .
What is a control unit? Differentiate between hardwired control and microprogrammed control units with their advantages and disadvantages.
Control Unit
The control unit (CU) is the part of the CPU that directs the operation of the processor. It generates control signals that coordinate the activities of the ALU, registers, memory, and I/O by fetching instructions, decoding them, and generating the timing and sequencing signals needed to execute each micro-operation in the correct order. It does not perform data processing itself; it tells the other units what to do and when.
There are two ways of designing a control unit: hardwired and microprogrammed.
Hardwired Control Unit
The control logic is implemented with fixed digital hardware — combinational logic gates, decoders, flip-flops, counters, and sequential circuits. The control signals are produced directly as Boolean functions of the instruction opcode, status flags, and timing signals.
Advantages:
- Very fast, because control signals are generated directly by hardware.
- Optimized, used in RISC and high-performance processors.
Disadvantages:
- Difficult to design, modify, or extend — adding a new instruction requires redesigning the circuit.
- Complex for processors with large instruction sets; hard to debug.
Microprogrammed Control Unit
Control signals are stored as microinstructions in a special memory called the control memory (control store). Executing an instruction means sequencing through the corresponding microprogram; each microinstruction supplies the control signals for one step. A control address register (CAR) and sequencer select the next microinstruction.
Advantages:
- Flexible — the instruction set can be changed or extended just by modifying the microprogram (firmware), not the hardware.
- Simpler, systematic design; easier to debug and maintain; good for complex CISC instruction sets.
Disadvantages:
- Slower, because each control signal requires fetching a microinstruction from control memory.
- Requires extra control memory; more expensive in time.
Comparison
| Feature | Hardwired | Microprogrammed |
|---|---|---|
| Implementation | Fixed logic circuits | Microprogram in control memory |
| Speed | Fast | Slower |
| Flexibility / modification | Difficult | Easy (change microcode) |
| Design complexity | Hard for large ISA | Systematic, simpler |
| Cost | Less memory, complex logic | Needs control memory |
| Typical use | RISC | CISC |
What is cache memory? Explain the different cache mapping techniques (direct, associative and set-associative) with suitable diagrams.
Cache Memory
Cache memory is a small, very fast memory (usually SRAM) placed between the CPU and main memory. It holds copies of the most frequently/recently used instructions and data so that the CPU can access them without waiting for slower main memory. It exploits the principle of locality (temporal and spatial locality) to reduce average memory access time. When the CPU needs data, it first checks the cache: a hit means the data is found in cache, while a miss means it must be fetched from main memory and copied into the cache.
Main memory is divided into blocks and cache into lines (frames) of the same size. A mapping function decides which main-memory block goes to which cache line.
1. Direct Mapping
Each main-memory block can be placed in exactly one cache line, given by:
The address is split into Tag | Line(Index) | Word(Offset).
Address: [ Tag | Line | Word ]
- Advantage: simple and cheap to implement; fast lookup (only one line to compare).
- Disadvantage: high conflict misses — two blocks mapping to the same line keep replacing each other.
2. Associative (Fully Associative) Mapping
A main-memory block can be placed in any cache line. The address is split into just Tag | Word. To find a block, the tag is compared (in parallel) with the tags of all lines using associative (content-addressable) memory.
Address: [ Tag | Word ]
- Advantage: most flexible; lowest conflict miss rate; full use of cache.
- Disadvantage: expensive — needs a comparator for every line; requires a replacement algorithm (LRU/FIFO).
3. Set-Associative Mapping
A compromise: the cache is divided into sets, each containing lines (a k-way set-associative cache). A block maps to one set, but can occupy any line within that set:
The address is split into Tag | Set | Word. Only the tags in the selected set are compared.
Address: [ Tag | Set | Word ]
- Advantage: fewer conflict misses than direct mapping, cheaper than fully associative.
- Disadvantage: needs comparators and a replacement policy per set; moderate complexity.
Summary: Direct mapping = 1 possible line; fully associative = any line; set-associative (-way) = any of lines in one set. Set-associative is the most commonly used because it balances cost and performance.
Section B: Short Answer Questions
Attempt any EIGHT questions.
Explain the IEEE 754 floating point representation for single precision numbers with an example.
IEEE 754 Single Precision Floating Point
A single-precision (32-bit) IEEE 754 number is divided into three fields:
| Field | Bits | Width |
|---|---|---|
| Sign (S) | bit 31 | 1 bit |
| Exponent (E) | bits 30–23 | 8 bits (biased) |
| Mantissa / Fraction (M) | bits 22–0 | 23 bits |
The value of a normalized number is:
- S = 0 for positive, 1 for negative.
- E is stored with a bias of 127 (so the actual exponent = ).
- M is the fraction; a hidden leading 1 is assumed (the normalized form), giving 24 bits of precision.
Example: Represent
- Binary: .
- Normalize: .
- Sign: positive .
- Exponent: .
- Mantissa: fraction after the point = , padded to 23 bits: .
Result:
0 10000010 10101000000000000000000
In hex this is 0x41540000.
Explain the memory hierarchy in a computer system with a suitable diagram.
Memory Hierarchy
The memory hierarchy organizes a computer's storage into levels arranged by speed, cost per bit, and capacity. As we move down the hierarchy, speed and cost-per-bit decrease while capacity increases; as we move up, memory gets faster, smaller, and more expensive. The goal is to give the CPU the illusion of a large, fast memory at low cost by keeping frequently used data in faster levels (exploiting locality of reference).
^ faster, costlier, smaller
| +----------------+
| | Registers | (inside CPU)
| +----------------+
| | Cache (L1/L2/L3) | (SRAM)
| +----------------+
| | Main Memory (RAM) | (DRAM)
| +----------------+
| | Secondary Storage | (SSD/HDD)
| +----------------+
v | Tertiary/Backup | (tape, optical)
+----------------+
slower, cheaper, larger
Levels (top to bottom):
- Registers — fastest, inside the CPU, hold operands currently in use; smallest capacity.
- Cache memory (L1, L2, L3) — fast SRAM holding recently used data/instructions.
- Main memory (RAM) — DRAM, holds the programs and data currently running.
- Secondary storage — SSD/HDD, large, non-volatile, slower; stores files permanently.
- Tertiary / backup storage — magnetic tape, optical disks for archival.
The registers, cache, and main memory are accessed directly by the CPU (primary memory), while secondary and tertiary storage are non-volatile and accessed via I/O.
What is an interrupt? Explain the different types of interrupts.
Interrupt
An interrupt is a signal to the processor — generated by hardware or software — that temporarily suspends the normal execution of the current program so that the CPU can attend to a higher-priority event. The CPU saves its current state (program counter and registers), transfers control to an interrupt service routine (ISR) through the interrupt vector, services the event, and then restores the saved state to resume the interrupted program. Interrupts allow the CPU to respond to events asynchronously instead of continuously polling devices, improving efficiency.
Types of Interrupts
-
Hardware Interrupts — generated by external hardware devices (keyboard, disk, timer, I/O). Subdivided into:
- Maskable interrupts: can be ignored/disabled by the CPU (e.g., normal device interrupts via the INTR line).
- Non-maskable interrupts (NMI): cannot be disabled; used for critical events like power failure or memory errors.
-
Software Interrupts — generated by an instruction within a program (e.g.,
INT nsystem calls, traps). Used by programs to request operating-system services. -
Internal Interrupts / Exceptions (Traps) — caused by error conditions during instruction execution, such as divide-by-zero, overflow, invalid opcode, or page fault. They are synchronous with the program.
(Interrupts may also be classified as vectored — the device supplies the ISR address — vs non-vectored — a fixed ISR address is used.)
What is a system bus? Explain address bus, data bus and control bus.
System Bus
A system bus is a set of parallel electrical conductors (wires) that connect the major components of a computer — the CPU, main memory, and I/O devices — and carry data, addresses, and control signals between them. It is a shared communication pathway: only one device can drive the bus at a time, so an arbitration scheme controls access. The system bus is logically divided into three functional groups.
1. Address Bus
Carries the address of the memory location or I/O port that the CPU wants to access. It is unidirectional (CPU → memory/I/O). Its width determines the maximum addressable memory: an -bit address bus can address locations (e.g., a 32-bit address bus addresses = 4 GB).
2. Data Bus
Carries the actual data being transferred between the CPU, memory, and I/O. It is bidirectional (data flows both to and from the CPU). Its width (e.g., 8, 16, 32, 64 bits) determines how many bits can be transferred at once and strongly affects performance.
3. Control Bus
Carries control and timing signals that coordinate and manage all operations on the bus. It is a mix of signal lines such as Memory Read, Memory Write, I/O Read, I/O Write, clock, interrupt request, bus grant, and reset. These signals indicate the type and direction of the operation and synchronize the components.
Summary: the address bus says where, the data bus carries what, and the control bus tells how/when the transfer happens.
What is DMA? Explain how direct memory access transfers data without CPU intervention.
Direct Memory Access (DMA)
DMA is an I/O technique that allows certain hardware subsystems to transfer blocks of data directly between an I/O device and main memory without continuous involvement of the CPU. A dedicated DMA controller (DMAC) manages the transfer. This frees the CPU from the slow, byte-by-byte work of programmed I/O or interrupt-driven I/O, which is essential for high-speed devices like disks and network cards.
How DMA Transfers Data Without CPU Intervention
The DMA controller has registers loaded by the CPU before a transfer:
- Address register — starting memory address.
- Count register — number of words/bytes to transfer.
- Control register — direction (read/write) and mode.
Steps:
- The CPU initializes the DMA controller with the memory address, byte count, and direction, then continues with other work.
- When the I/O device is ready, it sends a DMA request (DREQ) to the controller.
- The DMA controller sends a bus request (HOLD/BR) to the CPU asking to use the system bus.
- The CPU finishes its current bus cycle, relinquishes the bus, and replies with a bus grant (HLDA/BG). The CPU's address/data/control lines go to high-impedance.
- The DMA controller now becomes the bus master: it places the address on the address bus and transfers data directly between the device and memory, incrementing the address and decrementing the count for each word.
- When the count reaches zero, the transfer is complete; the controller releases the bus back to the CPU and raises an interrupt to inform the CPU that the block transfer is done.
Transfer modes: burst (block) mode transfers the whole block at once; cycle-stealing mode transfers one word at a time, releasing the bus between words.
Because the data moves directly over the bus under DMAC control, the CPU is bypassed during the actual transfer — improving throughput and letting the CPU do useful work in parallel.
Differentiate between RISC and CISC architectures.
RISC vs CISC
RISC (Reduced Instruction Set Computer) uses a small set of simple, fixed-length instructions that execute (ideally) in one cycle, relying on the compiler and many registers. CISC (Complex Instruction Set Computer) provides a large set of powerful, variable-length instructions, some doing complex multi-step tasks in a single instruction.
| Feature | RISC | CISC |
|---|---|---|
| Instruction set | Small, simple | Large, complex |
| Instruction length | Fixed | Variable |
| Execution time | Usually 1 clock cycle per instruction | Multiple cycles per instruction |
| Addressing modes | Few | Many |
| Memory access | Only LOAD/STORE access memory (register-based) | Many instructions access memory directly |
| Number of registers | Large | Comparatively fewer |
| Control unit | Hardwired | Mostly microprogrammed |
| Pipelining | Easy and efficient | Harder due to varying instruction length |
| Code size | Larger (more instructions) | Smaller (compact code) |
| Complexity location | In software/compiler | In hardware |
| Examples | ARM, MIPS, RISC-V, SPARC | Intel x86, VAX, Motorola 68000 |
In short: RISC keeps hardware simple and pushes complexity to the compiler for speed and easy pipelining; CISC keeps powerful instructions in hardware for compact, programmer-friendly code.
Explain register transfer language with examples of micro-operations.
Register Transfer Language (RTL)
Register Transfer Language (RTL) is a symbolic notation used to describe the micro-operations performed on the data stored in registers of a digital system. It precisely specifies the transfer of information between registers and the operations applied during the transfer. A micro-operation is an elementary operation performed on data in registers in one clock pulse.
Basic notation:
- Registers are denoted by capital letters: , , (address register), , , etc.
- A transfer is written with an arrow: (contents of copied into ).
- Conditional (controlled) transfer uses a control function: (transfer occurs only when ).
- Memory transfers use the data register: (read), (write).
Types of Micro-operations with Examples
-
Register transfer micro-operation — moves data between registers without changing it.
-
Arithmetic micro-operations — perform add, subtract, increment, decrement.
- (addition)
- (subtraction via 2's complement)
- (increment)
-
Logic micro-operations — bitwise operations.
- (AND), (OR), (complement)
-
Shift micro-operations — shift bits left or right.
- (shift left), (shift right)
RTL is hardware-oriented and is used to design and document the data path and control of a CPU.
Explain the algorithm for division of unsigned integers (restoring division) with an example.
Restoring Division Algorithm (Unsigned Integers)
Restoring division divides an unsigned dividend by a divisor using repeated shift, subtract, and (conditional) restore steps.
Registers: (initially 0), (dividend), (divisor), count = number of bits.
Algorithm (repeat n times):
1. Shift left the combined register A,Q by one bit.
2. A = A - M (subtract divisor from A).
3. If A < 0 (MSB of A = 1):
Q0 = 0
A = A + M (restore: add divisor back)
Else (A >= 0):
Q0 = 1
4. Decrement count; repeat until count = 0.
At the end: Quotient is in and Remainder is in .
Example: Divide (4-bit)
(3), . Dividend (7), , .
| Step | Operation | A | Q |
|---|---|---|---|
| Init | – | 0000 | 0111 |
| 1 | Shift left AQ | 0000 | 111_ |
| 1101 | 1110 | ||
| A<0 → =0, restore | 0000 | 1110 | |
| 2 | Shift left AQ | 0001 | 110_ |
| 1110 | 1100 | ||
| A<0 → =0, restore | 0001 | 1100 | |
| 3 | Shift left AQ | 0011 | 100_ |
| 0000 | 1000 | ||
| A≥0 → =1 | 0000 | 1001 | |
| 4 | Shift left AQ | 0001 | 001_ |
| 1110 | 0010 | ||
| A<0 → =0, restore | 0001 | 0010 |
Result: Quotient , Remainder .
Check: .
Explain the concept of microprogrammed control and microinstruction format.
Microprogrammed Control
In microprogrammed control, the control signals required to execute instructions are not generated by fixed logic gates but are stored as words (microinstructions) in a special memory called the control memory (control store). Each machine instruction corresponds to a microprogram — a sequence of microinstructions; executing the instruction means fetching and interpreting these microinstructions one by one. Each microinstruction, when read out, produces a set of control signals for one micro-operation step.
Key components:
- Control Memory (ROM): stores all microprograms.
- Control Address Register (CAR): holds the address of the current microinstruction.
- Control Data Register (CDR): holds the microinstruction currently being executed.
- Sequencer / Next-address generator: determines the address of the next microinstruction (sequential, branch, or based on conditions).
Working: The CAR points to a microinstruction in control memory → it is read into the CDR → its control field generates control signals → the sequencer computes the next CAR value → the cycle repeats until the instruction's microprogram completes.
Microinstruction Format
A microinstruction is divided into fields:
+-------------+-------------+-------------+----------------+
| Control / | Control / | Condition | Next-Address |
| Micro-ops | Micro-ops | Select (BR) | Field (CD/AD) |
+-------------+-------------+-------------+----------------+
- Control field (micro-operation field): specifies the control signals / micro-operations to perform (often grouped/encoded fields, e.g., F1, F2, F3 in Mano's model).
- Condition field (CD): selects the status condition to test for branching (e.g., zero, carry, sign, unconditional).
- Branch field (BR): specifies the type of branch (jump, call, map, return).
- Address field (AD): gives the address of the next microinstruction in control memory.
Horizontal vs vertical: a horizontal microinstruction has one bit per control signal (long word, fast, less decoding); a vertical microinstruction uses encoded fields (short word, needs decoders, slower).
Frequently asked questions
- Where can I find the BSc CSIT (TU) Computer Architecture (BSc CSIT, CSC208) question paper 2079?
- The full BSc CSIT (TU) Computer Architecture (BSc CSIT, CSC208) 2079 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
- Does the Computer Architecture (BSc CSIT, CSC208) 2079 paper come with solutions?
- Yes. Every question on this Computer Architecture (BSc CSIT, CSC208) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BSc CSIT (TU) Computer Architecture (BSc CSIT, CSC208) 2079 paper?
- The BSc CSIT (TU) Computer Architecture (BSc CSIT, CSC208) 2079 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
- Is practising this Computer Architecture (BSc CSIT, CSC208) past paper free?
- Yes — reading and attempting this Computer Architecture (BSc CSIT, CSC208) past paper on Kekkei is completely free.