With that context, I always found it strange that the designers of ASCII included 6 characters after uppercase
↫ Tyler HilleryZbefore starting the lowercase letters. Then it hit me: we have 26 letters in the English alphabet, plus 6 additional characters before lowercase starts: 26 + 6 = 32. If you know anything about computers, powers of 2 tend to stick out. Let’s take a look at the binary representations of some characters compared to their lowercase counterparts.
I only have a middling understanding of the rest of the article and thus the ultimate reason why ASCII includes those six characters between Z and a, but I think it comes down to making certain operations on uppercase and lowercase letters specifically more elegant. In some deep crevices of my brain all of this makes sense, but I find it very difficult to truly understand and explain as someone who knows little about programming.

ASCII was basically divided into 4 – 32 item groups (7 bits -> 128 values)
Group 1: Control characters 0 – 31 -> has your CR/LF. Can also be accessed with CTRL-A/Z (0-25) [], etc. CTRL-[ is ESC for exmaple
Group 2: Numbers and Symbols 32-63: Starts with space (32), and moves to backtick 63. Numbers have a similar trick… XOR 0x30 -> 0 -> “0”
Group 3: Upper case English letters + filler (can be accessed with SHIFT or CAPS LOCK)
Group 4: Lower case English letters + filler
And why is 127 DEL?
Has a root in old paper tapes. I think I can recommend looking this up specifically (another rabbit hole)
Anything else that came after were extended ones, and unfortunately did not strictly follow this pattern. Still some keyboards will allow access with specific combinations.
Thom Holwerda,
Just be thankful it’s not EBCDIC such that the alphabet isn’t even sequential.
https://www.lookuptables.com/text/ebcdic
ASCII code I am familiar with does not care about the ordinal value for a-z or A-Z relative to each other or anything else, but does require letters to at least be sequential.
Or hex encoding…
Edit: this code looks nothing like what I typed in. Typing C code into a non-WYSIWYG edit box is fail, haha.
https://www.catb.org/esr/faqs/things-every-hacker-once-knew/#_ascii is probably a bit less opaque in its explanation.
Basically, in the beginning, the Shift key was wired directly to that digit of the binary number… like an electrical version of how the Shift key on a typewriter would raise or lower the entire type basket.
(Each hammer had two characters on it and raising or lowering the type basket controlled which one contacted the ink ribbon while keeping them aligned to the same baseline on the paper.)
It’s really pretty simple and clear.
There are just 26 letters in the American English alphabet. (Remember that the A in ASCII stands for American: _American Standard Code for Information Interchange_.)
26 isn’t a round number in binary. 32 is the nearest round number: 32 in binary is 100000.
A is 65: in binary that’s 1000001.
a is 97: in binary that’s 1100001.
http://sticksandstones.kstrom.com/appen.html
Take A and add 100000 and you get 1100001.
Take any capital letter and add 32 and you get the small letter. The early devices only had capital letters; lower-case came later. That’s why the lower-case letters come later in the code.
So if bit 6 (counting from the right) is on, it’s a lower-case letter, and if it’s off, it’s a capital letter. Imagine you started with only capitals. Later, add the Shift key and map it to bit 6: down is enables the extra 26 letters you added: press it to get lower-case.
So, you add a few less-important characters in the middle to make the difference up to 32. You add 6 because 32-26 = 6 positions.
Early computers used 6-bit code: it was enough, and every extra bit cost lots of money. 6 bits give you 64 characters, which is enough for A-Z and 0-9 and a lot of control codes. The DEC TOPS-10 OS used just 6.3 character filenames. 3×6 = 18 and TOPS-10 evolved from computers with 18-bit words. So you could store all 6 letters in just 2 18-bit words, or one 36-bit word.
2 words hold the name, 1 word holds the extension. Very space-efficient. So long as you only use CAPITAL LETTERS.
Why does TOPS-10 matter? It’s where CP/M got its command language from (indirectly.) TOPS-10 is why DOS commands use / for switches.
https://www.os2museum.com/wp/why-does-windows-really-use-backslash-as-path-separator/
That’s true but at the same time it would not have been harder to add 26. They could have used something other than 32 and it would have had no impact for most software.
The shift key seems to be the best answer. It wasn’t software that benefited from an offset of 32, but really ancient hardware.to minimize logic & gates in the keyboard. Absent sources confirming it, it seems plausible that this weighed into the layout of ANSI characters.
For software, yes… but, as you say, ancient hardware is different.
It’s easier to implement a primitive terminal if you can directly wire the shift key to one of the lines on the shift register or whatever it is that you’re using to accumulate the bits into a byte.
(For anyone not familiar with electronics, a shift register is not “a CPU/microcontroller register that’s been assigned to the shift key”. It’s a chip that can take a snapshot of a specified number of input pins in parallel and then they can be popped out serially. It’s how Super Nintendo controllers work. “shift” in the sense of the Bourne shell “shift” keyword.)