NivaarExam PrepOfficial exam papers ↗

22-Elec-A4 Digital Systems and Computers · December 2018

Question 4 of 6: Computer-system components and CPU registers

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

22-Elec-A4 Digital Systems & Computers — 2018-Dec (Worked Solutions)

National Exams — December 2018 · 16-Elec-A4 Digital Systems & Computers. Closed book, 3 hours. Six questions, 12 marks each; the rubric requires any five, but all six are solved here as a study resource. Approved Casio/Sharp calculator permitted. A Boolean-identity table and the flip-flop excitation table are supplied with the paper and are used where needed.

Reference texts. M. M. Mano & M. D. Ciletti, Digital Design (6th ed.) — Boolean minimization, NAND/NOR realizations, K-maps, synchronous counters; J. F. Wakerly, Digital Design: Principles and Practices (5th ed.) — counters, PAL/PLA devices; C. Hamacher, Z. Vranesic, S. Zaky & N. Manjikian, Computer Organization and Embedded Systems (6th ed.) — CPU registers, endianness, stacks, parallel I/O; Motorola M68HC11 Reference Manual — big-endian storage, PUSH semantics, Port B addressing.

Question 4: Computer-system components and CPU registers (12 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

(a) Essential components. A stored-program computer reduces to four essentials, marked below; the remaining items are optional peripherals attached through the I/O ports.

Essential (X) vs peripheral
ComponentEssential?
Processor (CPU)X
MemoryX
Busses (address, data, control)X
I/O portsX
Mouse / Keyboard / Printer / Display / Hard driveperipheral

The CPU fetches and executes instructions, memory holds those instructions and their data, the three busses carry addresses, data and control/timing between them, and the I/O ports are the essential doorway to the outside world. A mouse, keyboard, printer, monitor or hard drive is a convenience that plugs into an I/O port; a machine without any of them is still a computer, but a machine missing the CPU, memory, busses or I/O is not.

(b) Microprocessor vs microcontroller. A general-purpose microprocessor (µP) is essentially a CPU on a chip: it brings the ALU, register file and control unit, but memory, I/O, timers and other peripherals must be added externally across the system busses. It is optimised for raw computing throughput and flexibility, at higher clock speed, power and board cost, and is the heart of a general-purpose computer. A microcontroller (µC) integrates the CPU together with program memory (Flash/ROM), data memory (RAM), parallel and serial I/O ports, timers/counters and often ADCs on a single chip. It is a self-contained "computer on a chip" tuned for dedicated embedded control — low cost, low power and small footprint — rather than for maximum performance. In short: a µP maximises computing power and needs external support chips; a µC trades peak performance for on-chip integration, economy and real-time I/O.

(c) CPU registers. Each described role maps to a standard register:

Question 4(c) — register mapping
Described functionRegister
Address of the next instruction to be executedProgram Counter (PC)
Next available location at the top of the stackStack Pointer (SP)
Pointing to an array or list of data in memoryIndex register (X / Y)
Information used at conditional-branch decision pointsCondition Code / Status (flags) register (CCR)