This is a course about how computers work, starting with logic gates and latches, ending with concurrent processes running under a simple operating system, and spending time on machine-level programming in the middle.
- In Hilary Term, we will study low-level programming with the help of a tiny computer, the BBC micro:bit, which includes an ARM-based microcontroller as its processor. Starting in assembly language and moving on to C, we will learn about the instructions that make up machine code, including arithmetic, branching, memory access, and subroutines. We will also (vitally for embedded systems) learn about controlling I/O devices, such as the buttons and lights on the micro:bit and the serial interface that allows it to talk to a host computer. Once a program reaches a certain degree of complexity, it is no longer sufficient to wait in a tight loop for an event to happen, and we will study the hardware and software aspects of solutions to this problem: using interrupts to respond to external events, and an operating system to structure the program as a family of concurrent processes, each responsible for one part of the task.
- In Trinity Term, we will study the elements of computer hardware, building up from gates and latches to architectural elements such as registers, adders and decoders, and finally a paper model of a processor able to execute a selection of ARM instructions, supported by an architectural simulator.
NoteDisruption to the lectures by strike action in Hilary Term and by the Coronavirus pandemic in Trinity Term has led to the second half of the course being condensed and partially reorganised. A synopsis of Trinity Term's lectures can be found on another page, with handouts and links to summaries of each lecture. The lectures themselves will be available online in some form.
- Tuesday in LTA and Friday in LTB at 12:00, weeks 1–8. Not recorded!
- Wednesday 10:00 to 12:00 in the Thom Building Lab, unofficially in weeks 2–3, officially in weeks 4–8.
- In college, four problem sheets this term.
- Online only, weeks 1–4, Location TBA. The presentation of each lecture, which is likely to consist of slides with an audio commentary, will be released at the latest when the corresponding lecture would have been scheduled in the ordinary course of events. The presentations will remain online until some time after the end of term, but I do not intend them to be available permanently.
- None, but some utterly optional materials are provided.
- Two more problem sheets.
Information about the course is provided on several other pages.
- Syllabus and synopsis.
- Course outline with lecture handouts.
- Problem sheets.
- Information about the laboratory exercises.
- A reading list.
- A page about the BBC micro:bit, including links to online resources.
- A page about the Phōs operating system.
- A page of frequently asked questions.
- A glossary, defining terms used in the course.
- A useful page lists the Thumb instructions introduced in each lecture.
- A page of updates to make before next year's performance of the course.
- A literate Haskell version of the Thumb simulator, differing in many details, including the names of control signals.
- Notes for the project of extending and porting Phōs.
- A list of ways of programming the micro:bit.
- Jay Carlson reviews dozens of different microcontrollers costing $1 or less.
- More than you could possibly need to know about bit-twiddling hacks.
- So called because the board dangles from its USB cable like a teabag dangling from its string.