Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

closed as primarily opinion-based by gnat, MichaelT, david.pfx, Kilian Foth, Dynamic May 15 at 19:52

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

29  
I propose Trilobyte ;) –  jk. Aug 23 '12 at 11:11
2  
Haha in the code I'm using I'm calling it a triplet. Kind of a punny deal because I'm working with audio samples. –  Qix Aug 23 '12 at 11:19
1  
What is wrong with calling it exactly what it is? A 24-bit integer? –  Ramhound Aug 23 '12 at 12:08
    
@Ramhound because I have a list of supported audio formats with long, short, and char. It'd break the list format (in a way) to have 24bit stuck in there. Of course I'm commenting exactly what each format entails, so it really wouldn't matter. It was just a matter of personal preference. –  Qix Aug 23 '12 at 12:13
1  
I'd like to suggest tribble, but that's probably only 12 bits. Maybe double-tribble. –  OldFart Aug 23 '12 at 14:10

6 Answers 6

up vote 16 down vote accepted

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.

share|improve this answer
    
Figured as much! –  Qix Aug 23 '12 at 10:25
2  
Even architectures that had native 24-bit registers, e.g. Zilog eZ80, didn't have special word for these (zilog.com/docs/um0077.pdf). Same for IBM S/370 address registers, etc. –  haimg Aug 23 '12 at 14:09
1  
don't forget the storage, most 24-bit values are stored in 32-bits due to bus requirements. –  gbjbaanb Aug 23 '12 at 16:32
    
@gbjbaanb True, very good point. –  Qix Aug 24 '12 at 7:58
1  
Also, the 80286 and the 80386sx have a 24 bit address bus, there's no special term for it, too. –  ott-- Jan 21 '13 at 23:24

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.

share|improve this answer
    
well, if it at least have been trioctet, but tribyte, hm... –  shabunc Aug 23 '12 at 15:57

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.

share|improve this answer

Sometimes people define types like INT32 and UINT32. Maybe you could just define INT24.

share|improve this answer

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.

share|improve this answer
1  
'word' is the standard n-byte size of a given platform. On 32-bit, a word is 4 bytes, on 64-bit it's 8 bytes. See en.wikipedia.org/wiki/Word_%28computer_architecture%29 –  Martijn Pieters Aug 23 '12 at 13:34
    
@MartijnPieters: Exactly. It means different things on different platforms - on a 32-bit platform, it's 32 bits, on a 64-bit platform it's 64 bits, on some ancient platforms it could be 40 bits or 80 or something entirely different, on some embedded chips it's 16 bits, etc. etc. –  tdammers Aug 23 '12 at 20:41

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.

share|improve this answer
1  
That's because the standard term for the n-byte that fits in the CPU architecture is 'word': en.wikipedia.org/wiki/Word_%28computer_architecture%29. So, on a 24-bit machine, a word is 3 bytes, and 3 bytes is a word. –  Martijn Pieters Aug 23 '12 at 19:01
    
And golly; I grew up with Harris mini computers (my father used to be a Harris technician), didn't know those were 24-bit! I made make-believe spaceship cockpits with Harris 500 switch panels. :-P –  Martijn Pieters Aug 23 '12 at 19:04
1  
@MartijnPieters Byte is not necessarily 8 bits wide, usually a 8 bit pattern is called an octet. What you're saying is that a word would be 3 octets, while the word itself could be one single machine byte. Indeed, there are DSP's which have non-8 bit bytes, such as 12, 16, 20, 24 or 32 bit bytes. A great example of this where it matters are the C and C++ standards which state that CHAR_BIT >= 8. This means that on char variables are always one byte in size but not necessarily 8 bits. –  zxcdw Jan 21 '13 at 22:51
    
@zxcdw: While that may once have been the case, ISO/IEC 80000-13 standardized the byte to 8 bits (see en.wikipedia.org/wiki/Byte). –  Martijn Pieters Jan 21 '13 at 22:56
    
@MartijnPieters Point taken, and I stand corrected to an extent which the standard stands. However applications with non 8-bit bytes exist(which don't conform to the standard) and will do so for long onwards and as such I think the distinction is relevant in certain fields. –  zxcdw Jan 21 '13 at 23:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.