logoalt Hacker News

renoxtoday at 8:38 AM5 repliesview on HN

I still find weird that they didn't make A,B... just after the digits, that would make binary to hexadecimal conversion more efficient..


Replies

iguessthislldotoday at 9:21 AM

Going off the timelines on Wikipedia, the first version of ASCII was published (1963) before the 0-9,A-F hex notation became widely used (>=1966):

- https://en.wikipedia.org/wiki/ASCII#History

- https://en.wikipedia.org/wiki/Hexadecimal#Cultural_history

show 1 reply
kpstoday at 3:22 PM

They put : ; immediately after the digits because they were considered the least used of the major punctuation, so that they could be replaced by ‘digits’ 10 and 11 where desired.

(I'm almost reluctant to to spoil the fun for the kids these days, but https://en.wikipedia.org/wiki/%C2%A3sd )

jolmgtoday at 9:12 AM

Currently 'A' is 0x41 and 0101, 'a' is 0x61 and 0141, and '0' is 0x30 and 060. These are fairly simple to remember for converting between alphanumerics and their codepoint. Seems more advantageous, especially if you might be reasonably looking at punchcards.

tgvtoday at 10:37 AM

[0-9A-Z] doesn't fit in 5 bits, which impedes shift/ctrl bits.

vanderZwantoday at 9:20 AM

I'm not sure if our convention for hexadecimal notation is old enough to have been a consideration.

EDIT: it would need to predate the 6-bit teletype codes that preceded ASCII.