Skip to content
Tactiverge

Computer engineering · also Electrical engineering

Units, scaling and fixed-point arithmetic

Many small processors have no hardware for floating-point numbers, so fractional values are often handled with integers in scaled units. Instead of storing 1.25 volts, firmware might store 1,250 millivolts. Fixed-point formats generalise this: in Q-format, a chosen number of bits represent the fractional part. Calculations must be ordered carefully. Multiplying before dividing preserves precision, but it can overflow unless the intermediate result uses a wider type. Choosing units and ranges in advance keeps integer maths both fast and accurate.

Why it mattersA battery-powered sensor node can save time and energy by doing its filtering in fixed point instead of floating point.

Learn it

  1. 1Units, scaling and fixed-point arithmeticEmbedded Systems · Sensor integration

Try it