Do you prefer hexadecimal numbers written with uppercase letters (A-F) or lowercase letters (a-f)?
For example, do you prefer the integer 3102965292 written as B8F37E2C or b8f37e2c? Do you prefer the floating-point number 126.976 written as 0x1.fbe76cp6 or 0x1.FBE76Cp6?
I ran this poll on my sidebar, and after 96 responses, about 70% are “prefer uppercase” and about 9% are “prefer lowercase”. What do you think? (For the “depends on context” answer I meant things other than numeric values, like the memory representation of strings. However, for the purposes of this article, please answer with just numeric values in mind.)
I had always used uppercase but switched to lowercase when I started this blog. (I don’t remember why, but I think I was under the impression that the wider programming community preferred lowercase.) My article examples are in lowercase (I use “%a” rather than “%A” for hexadecimal floating-point constants), as are the outputs of my floating-point converter (the Hexadecimal floating-point constant and Raw hexadecimal output formats) and base converter (with the default digit characters). Since I’m writing an app that displays hexadecimal numbers, I figured this would be a good time to check my assumptions.
(I think lowercase is easier to read, but uppercase fits better with numeral fonts, making it look more uniformly numeric.)
The reason I like using uppercase letters is because the numbers we use everyday are almost always uppercase as well. Most people don’t know there are lowercase and uppercase variants of number characters and I don’t remember ever wanting lowercase numbers anyway.
Comments are closed.