Skip to content

Lecture 2 — Numbers in memory

Fri 9 Oct 2026 · Boris Bolliet

TL;DR — A number is a fixed pattern of bits in memory; its width sets the range of the integers and the precision of the reals.

Slides Notes Self-test Recording

Demonstration files

File View Download Colab
C9.csv
bits_and_floats.py
curl -LO https://teaching.borisbolliet.io/c1-2026/materials/class02-demo.zip && unzip class02-demo.zip

Data: experiment C9 of B. Blasius, L. Rudolf, G. Weithoff, U. Gaedke and G. F. Fussmann, Long-term cyclic persistence in an experimental predator–prey system, Nature 577, 226–230 (2020); data set on figshare, doi:10.6084/m9.figshare.10045976 (CC BY 4.0).

Content

  1. Bits, bytes and integers
  2. Real numbers
  3. Consequences of finite precision

Exercises with solutions