Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · How Computers Work · Bits and switches · about 19 min to read

Play it as a journeyTutor comes with a plan

Numbers for Real (signed ints, overflow, floating point)

Numbers for Real
Numbers for Real · Open board

A byte’s worth of switches, and the three sharp edges hiding inside it: a biggest number it can hold, a trick it needs to fake a negative one, and a limit on how exactly it can write a fraction.

Before you start. You need what Everything Is a Number (bits & bytes) gave you: a computer stores everything as a fixed row of on-or-off switches, bits, and eight of them make a byte, which holds exactly 256 different patterns. This lesson is about what happens right at the edge of that fixed row, when a count needs a 257th pattern, or a fraction needs more precision than the row has room for.

Lesson 2 of 41 in How Computers Work · Free with an account

Keep reading. It's free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

No card, and chalk sends no email. Google sign-in only.

Start free with Google

In this lesson

  • 4 June 1996: the number that didn’t fit
  • The wheel that runs out of room
  • Half the wheel, relabelled: two’s complement
  • Numbers that don’t end: what 0.1 really is
  • 25 February 1991: a third of a second, twenty-eight soldiers

Terms it explains: overflow, two's complement, floating point, exponent, mantissa, 23) / 2, 53+1===2, bias, epsilon compare, IEEE 754, Inf, modular arithmetic, NaN, rounding error, signed, the 2038 problem, unsigned.

Review How Computers Work