Bits, floats, text and encodings

"0.1 + 0.2 is not 0.3" is usually left as a fact to memorise. Here it is a mechanical process over real bits: both numbers are split into a sign, an exponent and a mantissa, the smaller exponent's mantissa is shifted right to line the two up — and the bits that fall off the end during that shift are exactly where the precision goes. The same decomposition, done in general, explains why a float's bit pattern can mean five different kinds of number depending on one field. Two more pages apply the same "look at the real bits" discipline to a signed integer's silent overflow and to the variable-width bytes of UTF-8.

Classical algorithms over arrays and graphs live in AlgoLab and Graph algorithms. A state machine over text, of a different kind, is in Regular expressions.