The ASCII standard was adopted in 1963, and it's unlikely that anyone now uses a character set where the first 128 characters differ from ASCII. However, until the end of the last century, EBCDIC was widely used — the standard encoding for IBM mainframes and their Soviet clones, ES EVM. EBCDIC remains the primary encoding in z/OS — the standard OS for modern IBM Z mainframes.
What immediately stands out when looking at EBCDIC is that the letters do not appear consecutively: between I and J and between R and S there are unused positions (on ES EVM, these gaps Cyrillic symbols). Who could think of encoding letters with unequal gaps between adjacent letters?

The name EBCDIC ('Extended BCDIC') suggests that this encoding — unlike ASCII — was not created in a vacuum, but based on the six-bit BCDIC encoding that was used starting from (1954):

There is no direct backward compatibility: a convenient feature of BCDIC, lost in the transition to EBCDIC, was that digits 0—9 correspond to codes 0-9. Nevertheless, there were already gaps of seven codes between I and J and eight codes between R and S in BCDIC. So where did they come from?
The history of (E)BCDIC begins simultaneously with the history of IBM — long before electronic computers. IBM was formed through the merger of four companies, the most technologically advanced of which was the 'Tabulating Machine Company', founded in 1896 by Herman Hollerith — the inventor of the The first tabulators simply counted the number of punch cards processed in certain places; but in 1905, Hollerith began producing decimal tabulators. Each card for a decimal tabulator consisted of fields of arbitrary lengths, and the numbers recorded in these fields in the familiar decimal form were summed across the entire deck. The division of the card into fields was determined by connecting wires on the tabulator's switching panel. For example, on this punch card belonging to Hollerith, at the Library of Congress, the number 23456789012345678 is clearly punched, although it's unclear how it was divided into fields:

The most observant might notice that Hollerith's card has 12 rows for holes, even though ten are sufficient for digits; and in BCDIC, only 12 out of 16 possible codes are used for each value of the two highest bits.
Of course, this is not a random coincidence. Originally, Hollerith intended the additional rows for 'special marks' that were not summed but simply counted — as in the earliest tabulators. (Today we would call them 'bit fields'.) Additionally, among the 'special marks', it was possible to set group indicators: if intermediate sums were needed during tabulation, the tabulator would stop when it detected a change in any of the group indicators, and the operator would need to write down the intermediate sums from the digital displays onto paper, reset the displays, and resume tabulation. For example, when calculating accounting balances, a group of cards could correspond to a specific date or a single counterparty.
By 1920, when Hollerith had already retired, 'printing tabulators' had come into use, which were connected to a teleprinter and could print intermediate sums on their own, without requiring operator intervention. The complexity then lay in determining what each printed number referred to. In 1931, IBM decided to use 'special marks' to designate letters: a mark in row 12 indicated the letter from A up to I, in row 11 — from J up to R, in row 0 — from S up to Z. The new 'alphabetical tabulator' could print the name of each group of cards along with intermediate sums; in this case, an unpunched column became a space between characters. Note that S is denoted by the combination of holes 0+2, while the combination 0+1 was initially not used for fear that two holes next to each other in one column could cause mechanical issues in the reader.

Now the BCDIC table can be viewed from a slightly different angle:

Except that 0 and the space are swapped, the upper two bits define the 'special mark' that has been punched into the punch card since 1931 for the corresponding symbol; while the lower four bits define the digit punched in the main part of the card. Support for characters & - / It was added to IBM tabulators in the 1930s, and the encoding of these characters in BCDIC corresponds to the hole combinations punched for them. When support for an even larger number of characters was needed, an additional 'special mark' was introduced in row 8—allowing up to three holes in one column. This format of punch cards remained largely unchanged until the end of the century. In the USSR, they kept the IBM encodings for Latin letters and punctuation, while for Cyrillic letters, they punched several 'special marks' in rows 12, 11, 0—without limiting to three holes in one column.
When the IBM 704 computer was created, they did not spend much time on character encoding: they took the encoding already in use for punch cards and merely 'set 0 in place'. In 1964, during the transition from BCDIC to EBCDIC, the lower four bits of each character were left unchanged, although the higher bits were slightly shuffled. Thus, the punch card format chosen by Hollerith at the beginning of the last century influenced the architecture of all IBM computers, up to and including IBM Z.
Source: habr.com
