[TUHS] And now ... Weirdnix?

Michael Kjörling michael at kjorling.se
Mon Sep 18 21:59:44 AEST 2017

On 18 Sep 2017 12:39 +0200, from andreas.kahari at icm.uu.se (Andreas Kusalananda Kähäri):
> I've been wondering about this for some time, if a byte isn't 8 bits on
> an architecture, how would you go about calculating memory sizes in a
> way that makes it comparable between machines?
> A 32 KB memory buffer is 262144=32*1024*8 bits on one machine, but
> 294912=32*1024*9 bits on another.  That's a difference of 32 Kbit.
> [snip]
> Maybe this isn't/wasn't an issue at all?

Memory _chips_ are often specified in terms of accessible bits. So you
might have a chip that can hold _(8 * 2^20) * 8 bits_, or eight binary
megabytes for the case where 1 byte == 8 bits. The same chip could be
specified as _(64 * 2^20) * 1 bits_ for 64 binary megabits. This would
normally be written 8Mx8 or 64Mx1 for a binary "M" prefix.

How you then use those bits is entirely up to the system integrator
and software developer. And we do know that on systems with limited
memory, bit-packing is a common practice, based on the mantra that "no
good bits should ever be allowed to go to waste".

This notation has the benefit that it relates directly to how much
data can be held, as opposed to _how_ that data is held.

Michael Kjörling • https://michael.kjorling.semichael at kjorling.se
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)

More information about the TUHS mailing list