HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Why are word sizes in modern CPU’s a power of 2?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
whyarepowersizeswordcpumodern

Problem

Word size of most modern cpu’s is 32 or 64 bits. Both are a power of 2.

This looks “intuitively reasonable”, because a bit has 2 states, but I don’t actually have a hard argument for why this is the case. Moreover, in the past, word sizes of processors have been multiples of other numbers, such as multiples of 6 (because characters were encoded in 6 bits).

What is the reason that chip designers have chosen to make word sizes a multiple of 2?

Solution

There is no good reason really. Having 12/24/48/96 bit would have been much more useful.

Historically, if we had had 12 bit bytes, then color graphics storing 1 byte per pixel would have had 16 different values for red, green and blue components, and we would never have suffered the madness of color palettes in graphics hardware.

Nowadays, you could store Unicode codepoints usually in a 12 bit byte, and sometimes using two 12 bit bytes.

48 bit pointers would still be plenty (enough to address 256 Terabyte of RAM, but with 12 bits per byte, so this would actually equivalent to 384 Tera octets).

48 bit floating point is enough for most purposes (where 32 bit floating point isn't).

Context

StackExchange Computer Science Q#100501, answer score: 6

Revisions (0)

No revisions yet.