The formula for the steps
For each layer you choose two numbers. The scale, meaning how much one step is worth, and the zero point, meaning which step matches the real zero. With weights from minus 1 to 1 and 256 steps, the scale is 2 divided by 255, about 0.0078.
To write a weight, you divide it by the scale, round it and add the zero point. To read it back, you do the opposite. The weight you read back isn't identical to the original, but the difference is never more than half a step, which is about 0.004 in this example.
q = round(x / scale) + zero (an integer from 0 to 255)
x ≈ scale × (q − zero)