Numbers, Caches, and Memory Models Lab
Algorithms, Programming, and Data Representation · Module 92313 · Chapter 56a
Commit to a prediction, rate your confidence, then watch the representation or calculation unfold. Finish each experiment to open its sandbox.
How the lab works
- Predict. Choose an answer before the stage reveals the result.
- Rate your confidence. A sure but wrong answer appears in Your results as a useful review target.
- Watch the steps. Follow the integer or floating-point calculation, cache lookup, or multicore state change.
- Explore. Complete all four challenges to unlock the experiment controls.
3.1–3.2 Integer representations: encode and decode
Convert values between bases, then decode the same fixed-width bits under named integer encodings.
Name the base, encoding, and bit width
3.4–3.5 Binary arithmetic: carry and overflow
Compare unsigned arithmetic with signed fixed-width arithmetic. Carry-out and signed overflow answer different questions.
Keep the operation and the encoding explicit
4.4 IEEE 754 fields: decode single precision
Single precision stores one sign bit, eight exponent bits, and 23 fraction bits. Reserved exponent patterns identify zero, subnormal values, infinity, and NaN.
Decode all 32 bits before assigning a value
4.5 Numerical stability: cancellation and reformulation
Track how rounding affects close values. Compare a direct calculation with a stable formula that avoids subtracting nearly equal quantities.
An exact operation can still expose earlier rounding
2.1–2.2 Cache locality and mapping
Trace the weighted cost of a miss and map byte addresses to cache sets. The sandbox uses a simplified two-level cache or a set-index calculation.
Only a miss pays the next-level access time.
3.1–3.2 Coherence and consistency
Separate a cache-line ownership transition from the ordering guarantees of the memory model.
Coherence orders one address; consistency constrains observations across addresses.
Your results
Personal study lab based on the APDR Chapter 56a guide and supplied lecture notes, including “FAU_beamer_56a.pdf” (55 slides, 26 October 2025). The controls illustrate selected finite-precision cases and do not model every platform or rounding mode. Not an official FAU publication; check course details against the current materials. Made by Thanate Amornjiraporn (Focus).