0 · Exam Mapcourse.json · brief
Permitted materials: not confirmed for this offering in the course materials we hold — check the exam instructions on the LMS.
| Assessment | Wt | Control |
|---|---|---|
| Fundamentals Quizzes | 20% | 4 in-person · hurdle |
| Extension Quizzes | 10% | 3 in-person |
| Essential Lab Completion | 15% | group + individual explanation · hurdle |
| Laboratory Attendance | 0% | participation · hurdle |
| Essential / Extension / Advanced Project | 10 / 5 / 5% | Essential is hurdle |
| Final exam | 35% | 2-hour written · AI prohibited · hurdle |
The mandatory section uses multiple-choice questions based on in-semester tests; the advanced section carries a threshold for extra marks. All essential assessments must be passed, and lab participation is compulsory, to pass.
1 · State-Trace MethodC1 · overview
Program state is the complete set of variable, register, memory, flag and control-position values at one instant. Record only state that can be read, changed or depended upon.
| Step | Write | Check |
|---|---|---|
| Before | width/representation; PC/control point; registers; relevant memory; flags | preconditions explicit? |
| Execute | instruction/operation and operands | what is read; what is written? |
| After | new register, memory, flag and control state | next branch/call/iteration? |
| Test | ordinary · boundary · invalid | one rule isolated? |
2 · Binary, Hex & SignedC3 · glossary/faq
Positional binary: each bit contributes a power of two. Hexadecimal: one digit 0–9/A–F compactly represents four bits. Preserve the fixed width while converting.
representation rulebit pattern + width + interpretation → machine meaning
negative two's-complement: invert every bit, then add one
| Question cue | Do | Say |
|---|---|---|
| binary ↔ hex | keep leading zeros; group into nibbles | same pattern, new notation |
| negative integer | write positive at stated width → invert → +1 | two's-complement interpretation |
| same bits, two values | apply signed and unsigned interpretations separately | bits did not change |
| overflow | trace the fixed-width operation | state width before judgement |
A bit pattern has no signed or unsigned meaning until the representation and width are specified.
For a full-credit conversion, label the source representation, keep leading zeros required by the width, show the intermediate pattern, then label the target notation and interpretation. To test overflow, inspect the result at the same fixed width; do not silently expand the representation or discard a carry without stating what the chosen width does.
2b · Signed-Byte Checkcourse worked example
+18 = 00010010
invert = 11101101
add 1 = 11101110 = 0xEE
signed: −18 · unsigned: 238
3 · Fixed vs Floating PointC4 · glossary/faq
| Representation | Structure | What to check |
|---|---|---|
| Fixed-point | integer pattern + agreed scale locating the radix point | resolution, rounding, representable limits |
| Floating-point | sign + exponent + significand | field meaning, precision spacing, range |
fixed-point meaningrepresented value = stored integer pattern interpreted with the agreed fixed scale
floating-point reading ordersign → exponent → significand → represented magnitude
Decision rules
- If the task fixes a radix-point position, treat the pattern as fixed-point and keep the scale visible throughout.
- If the task separates sign, exponent and significand, decode those floating-point fields before comparing values.
- If the task asks “more range?”, do not infer “more precision”. These are different properties.
- If a decimal appears, allow for the fact that it may not have an exact finite binary encoding.
3b · Encoding Answer FrameC4 · worked method
- Fix the value, width and chosen representation.
- Write the scale or the sign/exponent/significand field roles.
- Carry the encoding through without changing conventions.
4 · AVR Instruction TraceC5 · glossary/faq
Mnemonic names the operation; register operands are the locations read or written; status flags record conditions such as zero, carry, negative or overflow.
| Trace column | Question it answers |
|---|---|
| PC / control | which instruction executes next? |
| mnemonic | what operation is named? |
| source operands | which registers/locations are read? |
| destination | which register/location changes? |
| flags | what arithmetic condition is now recorded? |
An assembly sequence is correct only under the stated register contents, data width and calling assumptions.
5 · CPU & Memory CycleC6 · topic/faq
| Object | Role | Do not confuse |
|---|---|---|
| CPU datapath | moves/transforms data during execution | not the whole processor design |
| register file | fast operands, addresses, intermediate values | not general data memory |
| program memory | executable instructions | not mutable program data |
| data memory | mutable values | not instruction encoding |
| instruction encoding | supplies operation and operand information for fetch/decode | not the visible result |
| visible machine state | register, memory, flag and control changes after execution | not unstated timing detail |
6 · Addressing ModesC7 · glossary/faq
Byte address identifies one byte-sized storage unit. Pointer register stores an address used for indirect access and may be updated.
| Mode | Location comes from | Trace |
|---|---|---|
| direct | location named explicitly | named address → value |
| indirect | pointer register | pointer value → address → value |
| indirect + update | pointer register, then modified | accessed location and pointer after access |
address tracepointer before → effective byte address → value read/written → pointer after
Never write “the pointer contains the data” when it contains the address. A later access may change solely because the pointer changed.
7 · Runtime StackC8 · glossary/faq
| Event | Prove |
|---|---|
| push | value stored and stack pointer moves under the stated AVR convention |
| pop | value retrieved and matching pointer change |
| nested call | each activation record and return information remain distinct |
| return | caller state and continuation are recovered |
Join the memory and stack traces: record the byte address touched, the value stored or retrieved, the stack pointer before and after, the activation record owning that slot, and the control position restored on return. If any one is missing, later nested-call state cannot be proved.
8 · Calls & ConventionsC9 · glossary/faq
| Responsibility | Question |
|---|---|
| parameter passing | which inputs or addresses cross the interface? |
| caller-saved | what must the caller preserve before calling? |
| callee-saved | what must the subroutine restore before returning? |
| result | where is the output and who may overwrite it? |
A function can return the right sample result yet violate the calling convention and corrupt later execution.
9 · Branches & LoopsC10 · glossary/faq
operation/comparison → condition flags → branch instruction → body update → re-test
A loop invariant remains true before and after every iteration. Show it initially, show the body preserves it, then connect loop exit to the required result and boundary behaviour.
Interpret a branch only from flags produced by the immediately relevant comparison or arithmetic operation.
10 · Polling & InterruptsC2 glossary/faq
| If the cue is… | Trace this | Boundary |
|---|---|---|
| polling loop | read status → branch → repeat/service | software repeatedly checks |
| interrupt response | event → handler → shared state → resume | timing/handler duties controlled |