In C and embedded, one frequently uses enumerated constants where every value is a bit mask with exactly 1-bit set. (e.g. 0x0001, 0x0002, 0x0004, etc.) Is there a standard name for this type of bitmask? I've seen them referred to as flags, but more in passing than as a standard definition. I know it sounds snobbish, but "flags" doesn't really seem technical enough? Does anyone else have a good name for these? I can't imagine that noone has come up with one.
"Flags" is the accepted term. "Pass down a flag", "set this flag", etc.
The .NET framework has a Flags
attribute that is used to indicate exactly the behavior you're describing.
They don't exactly just make up names for whatever they want, so a flag is probably the most acceptable term.
"Flag" is used for these for decades now and is just fine. My old C64 already had a zero flag, carry flag, etc. See here for further info:
http://en.wikipedia.org/wiki/Flag_(computing%29
http://en.wikipedia.org/wiki/Status_register
I don't know exactly when this term was coined and by whom.
In mathematics, a singleton set is a set with exactly one element, so you could conceivably call them a singleton bitset or singleton bitmask, but I haven't seen this in practice.