22-Elec-A4 Digital Systems and Computers · May 2014
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. National Exams, May 2014 — 07-Elec-A4 Digital Systems & Computers. Three hours, closed book (one approved Casio or Sharp calculator). Six questions are printed; any five constitute a complete exam and every question is worth 12 marks, with the per-part split given in the page-1 marking scheme (Q1 is 3+3+3+3; Q2 is 6+3+3; Q3 is 6+6; Q4 is 3+3+6; Q5 and Q6 are 4+4+4). A flip-flop excitation table for the RS/JK/T/D types and a table of 22 basic Boolean identities are supplied on the last page. All six questions are solved below, because this set is a study resource rather than a timed sitting.
Reference texts.
Notation used throughout. A bar and a prime both denote complement: \(\overline{A}\) in the mathematics and A′ in the figures, where SVG text cannot carry an overbar. In every K-map the leftmost variable is the most significant bit, so the minterm indices printed in the cells match the question’s own variable ordering.
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) The four essential components are those without which no stored-program machine can execute at all. Everything else in the list is a peripheral: useful, often indispensable in practice, but attached to the machine rather than part of it.
| Item | Essential? | Why |
|---|---|---|
| Mouse | – | Input peripheral |
| Processor (CPU) | X | Fetches, decodes and executes instructions; contains the ALU and the register set |
| Printer | – | Output peripheral |
| Memory | X | Holds the program and its data — the stored-program principle |
| USB drive | – | Secondary storage, reached through an I/O port |
| Busses (address, data, control) | X | The interconnect that carries addresses, data and timing between the other three |
| Keyboard | – | Input peripheral |
| I/O ports | X | The interface through which every peripheral is reached |
| Display monitor | – | Output peripheral |
| Hard drive | – | Secondary storage, reached through an I/O port |
(b) A general-purpose microprocessor is a CPU and essentially nothing else: it brings the register set, the ALU and the control unit onto one chip, and everything else — memory, timers, serial ports, converters — is external and reached over exposed address, data and control buses. That makes the device flexible and fast at the cost of pin count, board area and power, and it means a working system needs several chips. A microcontroller is a complete computer on one chip: a usually simpler CPU core plus program memory (Flash or ROM), data memory (RAM), and a fixed set of on-chip peripherals — parallel ports, timers, a UART, analogue-to-digital converters, PWM outputs and an interrupt controller. Its buses are internal and often invisible outside the package; its pins are peripheral pins, like the \(PB_7\)–\(PB_0\) port used in Question 5.
The consequences follow from that structural difference. Microprocessors dominate where raw throughput and expandable memory matter (workstations, servers), and are optimised for average-case speed with deep pipelines and multi-level caches. Microcontrollers dominate embedded control, where the priorities are cost, low power, small physical size, quick and deterministic interrupt response, and sufficient integration to run a product from one chip. Microcontrollers are also commonly Harvard-architecture with separate program and data memories, whereas general-purpose microprocessors are usually von Neumann at the architectural level. Word sizes differ accordingly: 8 and 16 bits remain entirely normal in microcontrollers, while general-purpose parts are 32 or 64 bits.
(c) Each description names a standard register by its function.
| Description | Register | Comment |
|---|---|---|
| Address of the next instruction to be executed | Program counter (PC), also called the instruction pointer | Incremented automatically during each fetch; a branch or call overwrites it |
| Next available location at the top of the stack | Stack pointer (SP) | Adjusted by PUSH/POP and by subroutine call and return |
| Pointing to an array or list of data values in memory | Index register (or base/pointer register, e.g. X, Y, IX) | Supports indexed and base-plus-offset addressing modes for array traversal |
| Information used at decision-making points | Condition-code register (status register, flag register) | Holds the Z, N/S, C and V flags set by the ALU and tested by conditional branches |
| Part | Answer |
|---|---|
| (a) | Processor (CPU), Memory, Busses (address/data/control), I/O ports |
| (b) | Microprocessor = CPU only, external memory and peripherals, exposed buses, high throughput; microcontroller = CPU + memory + peripherals on one chip, internal buses, optimised for cost, power and deterministic embedded control |
| (c) | Program counter; stack pointer; index (base/pointer) register; condition-code (status/flag) register |