KB, MB, GB, and TB are all part of the metric system. What empirical measurements should we Free™️ Americans use for computer memory?
nybble41 @ nybble41 @programming.dev Posts 0Comments 63Joined 2 yr. ago
nybble41 @ nybble41 @programming.dev
Posts
0
Comments
63
Joined
2 yr. ago
In general integer division is implemented using a form of long division, in binary. There is no base-10 arithmetic involved. It's a relatively expensive operation which usually requires multiple clock cycles to complete, whereas dividing by a power of two ("bit shifting") is trivial and can be done in hardware simply by routing the signals appropriately, without any logic gates.