A retrospective of past decisions that affect our present and will affect the future



The size of the rump of a horse two millennia ago determined the size of rocket engines today.



Have you ever wondered how each of our decisions determines the future? Sometimes not for one year, tens, hundreds, thousands of years. Why can't we make rocket engines bigger? Why is a byte exactly 8 bits and not 7 or 16, or maybe even 48? But it was equal to these numbers before! Why does Linux virtual terminal still have connection port speed? Let's talk about how a decision in the past determines our present, and how we can influence our future.



Space shuttle and horse croup width





This is a fairly well-known bike that has spread all over the Internet. Why do you think the size of the booster, attached to the sides of the main fuel tank, is so small? These are solid rocket boosters ( MTKK Space Shuttle side booster (English Solid Rocket Booster, SRB)) , which were manufactured at a plant in Utah. From an engineering point of view, it would be much better to make this engine a little thicker, but they had to be transported by train from the factory to the launch site. And the railway goes through a tunnel in the mountains.

Accordingly, these accelerators had to go through this tunnel. The tunnel itself is slightly wider than the railroad track. The standard US rail gauge (rail spacing) is 4 feet 8 Β½ inches (1435 mm).



Where did this number come from? The USA inherited this standard from the first railways in England. Railways in England were built to the same standards as the pre-rail tramway, called horse trams, and they also used 4 ft 8 Β½ "(1435 mm) gauge.



This distance between the wheels of the car was chosen so that they fall into the rut on English roads, so that the wheels wear less, and the distance between the tracks in England is exactly 4 feet and 8.5 inches. But why is this so? Why exactly this number?

England was once part of the Roman Empire, and since the first war chariots were made by Imperial Rome, they were all the same width between the wheels.





Track at the pedestrian crossing of the Roman road in Pompeii.





Another example of a rut on an ancient Roman road.



This width was chosen because it corresponded to the size of a two-horse Roman war chariot.





An example of the size of a Roman chariot.



It is surprising that the pinnacle of progress - astronautics even today is closely related to the size of two wide horse croup, like two thousand years ago!



It should be understood that this is actually a bike . Here is a good debunking of it, I recommend reading it. But the size of the width of the railroad bed determines the rail gauge. And it determines the maximum size of the cargo that can be transported by rail.



Byte size and ASCII codes





Today, many people from school still know what the size of a byte is, and for us this is obvious: 8 bits. But have you ever wondered why this size was chosen? What is it connected with?



You will probably be surprised, but a byte was not always eight bits in size! Previously, a byte could be from 4 to 60 bits! For example, BESM computers used 6-bit characters in 48-bit or 60-bit machine words.



But why exactly 8 bits? One of the reasons is the binary coding system, since the most convenient for processing are numbers that are multiples of powers of two. Well, well, you tell me, why not 4, or 16, or 32? And you will be right.



It should also be remembered that in 1963 the American Standard Code for Information Interchange, or ASCII for short, was adopted. This standard was developed from the telegraph code and its first commercial use was as a seven-bit teletype code for sending telegraph messages. Originally based on the English alphabet, ASCII encodes 128 given characters into seven-bit integers. Ninety-five encoded characters can be printed: these include numbers 0 through 9, lowercase letters a through z, uppercase letters A through Z, and punctuation characters. In addition, the original ASCII specification included 33 non-printable control codes that were generated using teletypewriters; most of them are already outdated, although some of them are still widely used,for example, carriage return, line feed, and tab code.





Seven-bit ASCII table from the printer manual before 1972.



Here two branches intersect at once, the history of the telegraph, which influenced the development of the computer industry. We will talk about this in the next chapter and, in fact, the very representation of the byte.



In the 1960s, IBM, which also participated in the ASCII standardization, introduced an eight-bit Extended Binary Coded Decimal Interchange Code (EBCDIC) for its System / 360 line of computers. Please understand that EBCDIC and ASCII are different. The prominence of the IBM System / 360 computer led to the widespread adoption of the eight-bit byte.



The development of eight-bit microprocessors in the 1970s popularized this memory size. Microprocessors such as the Intel 8008, a direct predecessor to the 8080 and 8086 used in early personal computers, could also perform a small amount of operations with four-bit pairs of bytes.



Let's return to the ASCII standard, which we now use to one degree or another every day, even this text somehow includes this standard.



The American Standard Code for Information Interchange (ASCII) was developed under the auspices of the American Standards Association (ASA) committee called committee X3, its subcommittee X3.2 (later X3L2), and later X3 of this subcommittee. 2.4 working group (now INCITS). The ASA became the United States of America Standards Institute (USASI) and eventually the American National Standards Institute (ANSI).



Subcommittee X3.2 developed ASCII based on earlier teletype coding systems. Before ASCII was developed, the encodings used included 26 letter characters, 10 numbers, and 11 to 25 special graphic characters. More than 64 ASCII codes were required to encode all of this data, as well as control characters that are compliant with the International Telegraphic Alphabet (ITA2) Standards of 1924. ITA2, in turn, was based on the 5-bit telegraph code that Emile Baudot invented in 1870 and patented in 1874.



Do you feel this connection between generations, that one way or another, even today we use the legacy of the telegraph code, which was invented 150 years ago ?!


The committee discussed the possibility of using a shift function (as in ITA2) that would represent more than 64 codes in a six-bit code. In a shifted code, some character codes determine the choice between options for the following character codes. This allows compact encoding, but is less reliable for data transmission, since an error in the transmission of the shift code usually makes the long portion of the transmission unreadable. The standards committee gave up on the transition, and therefore ASCII required at least a seven-bit code.



The committee considered an eight-bit code because eight bits (octets) would allow two four-bit patterns to efficiently encode two digits using a binary decimal number. However, when transmitting all the data, eight bits are required when seven is sufficient. The committee voted to use a 7-bit code to minimize data transfer costs. Since at that time punched tape could record eight bits in one position, the parity bit could be used to check for errors if desired.





Modern 8-bit ASCII table.



Thus, several factors at once converged in favor of making the byte 8 bits in size. But, in my opinion, the main one is the ability to encode and store text information in the minimum one byte and the ability to store decimal digits in each nibble.



Linux terminal device



On your home system, you open a Linux virtual terminal, which generally runs in a window and has a completely virtual representation. But it is still compatible with old terminals.



You can open a terminal and enter stty, then you can find that this program has a connection speed, like the COM port. And in general it has a bunch of termios settings for the COM port.

I already dwelt in sufficient detail in my articles on the work of the COM port in the article " UART and what it is eaten with " and the following was said there:



UART (Universal asynchronous receiver/transmitter) , -, ( ) β€” . UART RS-232 ( – COM-, ). , , . .



, , ( ). . , ASCII, . 60- 8- ASCII, , .



1971 , , PDP Western Digital UART WD1402A. 80- National Semiconductor 8520. 90- , . , , .


Note that some ancient telegraph is once again affecting the linux console! And why? Everything is simple enough that for I / O they used to use what was at hand, namely teletypes, which allowed you to enter text from the keyboard and output it by typing on paper.





Teletype, which is connected via UART and can be used to input and output information.



As a result, I / O in Linux is the actual control of the TTY. Even the most modern terminal standards are backward compatible with this type of TTY. Moreover, I can confidently tell you that if you connect this teletype to a modern computer and configure the terminal output to a physical COM port, it will work without software alterations (hardware will be needed, since there are slightly different voltage standards, but insignificant).

More details about working with the COM port and configuring the terminal file device can be found in my article " Working with the COM port in C in linux " and / or watch my videos at the end of the article.



conclusions



I had a desire to give a lot more examples, references to the past. For example, about keyboard layouts, which is from the shaggy days of typewriters, or references to the shape of modern mobile phones. However, the article has already turned into a crazy sheet, and I still managed to express the idea.





The QWERTY layout, invented in 1888 for typewriters, is still used today.



The idea of ​​my article is quite simple: even the smallest things that you implement today can have the greatest impact on our future.










All Articles