How does scaled arithmetic work?
A real number is represented as an inteter and a scale factor, usually a power of 2. For instance, the weights wi are represented as a 16 bit integer scaled by 210 bits (1024). Thus, the number 2.5 would be represented as 2.5 x 1024 = 2560. I use powers of 2, because the scale factor can be changed by using the bit shift operators (<< and >>), which are faster then multiplication and division.