'units' array is SI units, but sizes are base 2, I suggest keeping SI units and switching to base (from 1024 to 1000).
This is what Ubuntu does for network data and file sizes:
https://wiki.ubuntu.com/UnitsPolicy