6. Fixed-point and quantization

Lesson 6 of 8 · about 20 minutes · read Lessons 2 and 4 first · last checked November 2026

Why whole numbers?

Decimal (floating-point) numbers are flexible but need more silicon and more energy. Small chips often store values as short whole numbers instead. This is called fixed-point arithmetic. Reducing the precision of the stored values is called quantization.

The scheme used in the playground

Where the surprises come from

Coarse weights change the network. An excitatory weight of 0.3 is 19.2 units. At 8 bits it becomes 19 (about 0.297). At 4 bits it becomes 16 (0.25). At 3 bits it becomes 32 (0.5), which is about 67% stronger than intended. Stronger excitation pushes the whole network to fire more.

Small values never leak. Because the leak is rounded down, any stored value from 0 to 15 units loses nothing when K = 4. Small amounts of charge just stay.

What the playground showed

These numbers come from one setup (seed 42, default settings, 1,000 steps). They are an illustration, not a benchmark.

Weight bitsFloat rateFixed-point rateSpike trains first differ at step
84.2%4.8%20
44.2%4.2%14
34.2%18.5%14

Rates are the percentage of neurons firing per step. With 8-bit weights the rates are close, but the exact spike times drift apart after about 20 steps. With 3-bit weights the fixed-point network fires far more.

Compare firing rates, not exact spike times. In a recurrent network a tiny rounding difference grows, so exact timing diverges even when the overall behaviour is similar.

Try it

  1. Open the network playground with the defaults and read when the two spike trains first differ.
  2. Slide "Weight bits" down to 3 and compare the two rates.
  3. Set "Membrane bits" to 8 and raise the inhibitory weight. Watch the saturation counter.

Limits

This is a teaching model. Real chips differ in number formats, rounding, routing and timing, and this page does not describe any particular chip. Lesson 7 will move these ideas into Verilog.

← Lesson 4