Is there a term for a 24-bit (3-byte) integer?
I know uncommon bit counts (such as a “nibble” or “nybble” for 4 bits) have names, and having 24-bits in both video and audio technology, for instance, is very common.
1
No, I don’t think there is a specific name for a 3-byte word.
Note that those 24 bits usually represent a RGB value, or a X, Y, depth coordinate, so usually those values are referred to with names specific to the API at hand.
5
I’ve seen tribyte used in various places for this.
On further exploration I see it is in fact used quite a lot particularly for the audio/video contexts that were mentioned.
1
MySQL made up the non-standard name, MEDIUMINT. I find their TINYINT (instead of byte), SMALL (instead of short), MEDIUMINT (24-bit), INT (normal – sort of), and BIGINT (instead of long) to be very confusing. I wish they had named them INT08, INT16, INT24, etc. instead. I hesitate to propose their standard-bucking terminology as a new standard, but in the absence of anything better… I’d say call it a 24-bit integer or int24.
Real Machines with 24-bit and 48-bit words describes a surprising number of computers that used 24-bit words. You’d think that if there were a particular term other than word to describe that unit of data, it’d be mentioned on that page, but I don’t see one there.
5
I don’t think there is a particular name for such an integer; in fact, the only integer sizes with their own names that I can think of are 1 (bit), 4 (nibble) and 8 (byte).
Other sizes either go by “n-bit integer” or names that mean different things on different platforms (word, int, long, short, double word, etc.) or in different contexts (character).
So, in line with ’32-bit integer’ and ’64-bit integer’, ’24-bit integer’ makes the most sense.
2
Some languages have types named according to the value format and bit width. C++ has int32_t
, .NET has Int32
, and Go has int32
.
All programmers should immediately recognize the meaning of a derived term like int24
, so I think it would be acceptable to use anywhere that an alternative term has not been provided.
There are even implementations on SO for C++ and C#.