22-Elec-A4 Digital Systems and Computers · December 2018
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
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 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.
| Component | Essential? |
|---|---|
| Processor (CPU) | X |
| Memory | X |
| Busses (address, data, control) | X |
| I/O ports | X |
| Mouse / Keyboard / Printer / Display / Hard drive | peripheral |
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:
| Described function | Register |
|---|---|
| Address of the next instruction to be executed | Program Counter (PC) |
| Next available location at the top of the stack | Stack Pointer (SP) |
| Pointing to an array or list of data in memory | Index register (X / Y) |
| Information used at conditional-branch decision points | Condition Code / Status (flags) register (CCR) |