Here is a numerical example.
For the UDB5, KPYAW is 1024 and DEGPERSEC is approximately 32. If we compute the first factor in the equation for the line that you reference, without the factor of 8,
which is KPYAW/(50*DEGPERSEC), as a real number the factor comes out to be 0.64, which the compiler truncates to zero when converting it to an unsigned integer.
If we actually used that value in the computation, the result would be nonsense.
spin_rate, on the other hand, will have plenty of non-zero bits, so I made the decision to take 3 bits from it and give it to the constant.
Multiplying the constant factor by 8 before converting to an integer produces the value 5.12, which gets truncated to 5 at compile time, which has 4 significant binary bits. The final result of the product of the constant*8 times spin_rate/8 will then be lowered by 2.3% from the ideal value, which is quite acceptable for the role of that particular line in the computation.
Best regards,
Bill