Chapter 495: Ming-style underlying concepts of computers

Style: Historical Author: Wang ZixuWords: 6683Update Time: 24/01/12 18:53:02
Zhu Jingyuan issued a formal order, and the relevant personnel immediately stood up to accept the order:

"I obey the order."

Zhu Jingyuan raised his hand to signal them all to sit back, and then continued to ask new questions:

"Speaking of collecting data for calculations, do you have enough computers for the Qintian Supervisor, the Ministry of Industry, and the Ministry of Ordnance?"

Qi Yanhuai immediately responded:

"Thank you for your majesty's concern. After the relocation of the Qintian Prison was completed, the latest Type III general-purpose silicon crystal computing machine was also put into use simultaneously.

"The computing power of a single machine reaches one million operations per second, which should be able to meet the current computing needs of Qin Tianjian."

Wang Lai, the newly appointed Minister of Industry, also added:

“Thanks to His Majesty’s great blessing, Ming’s silicon computers have made rapid progress in the past ten years.

“During the design and construction of Yingtian New Capital City, three types of general-purpose silicon crystal computing machines developed by the Ministry of Industry were simultaneously deployed.

“Including Qintian Supervisor, Ministry of Industry, Ministry of Ordnance, Governor’s Office, Royal Bank, and Daming Bank.

“The office areas of departments and institutions with relatively strong demand for computing power have deployed computers capable of millions of operations per second.

"Other institutions also have the same series of models with the same architecture and slightly lower computing power."

Zhu Jingyuan heard two key words from the answers of the two people.

One million times per second is easy to understand. This was the level of computers in the United States in the early 1960s.

As for general-purpose computers, they are computers that use a unified architecture, can use the same programs, and can expand storage space and external devices.

The computers Zhu Jingyuan used in his previous life were basically general-purpose computers.

This kind of thing that future generations take for granted was something that many people could not imagine in the earliest days of computers.

Nearly all of the earliest computers were dedicated.

The gap between the two computers is like the gap between desktop computers and mobile phones in later generations.

The real general-purpose computer also appeared in the early 1960s.

The system 360 series of computers officially sold by IBM in 1965.

It was this first general-purpose computer that left behind the underlying computer convention of eight bits per byte.

Ten years ago, Zhu Jingyuan set a lot of goals for Ming Dynasty's computer project.

These goals also serve as guidance, directly providing proven direction for development.

For electron tube computers, Ming Dynasty only developed two generations of verification machines. They were not promoted on a large scale and were no longer manufactured.

Following Zhu Jingyuan's suggestion, he went directly in the direction of transistors and headed directly towards general-purpose computers.

The craftsmen of the Ming Dynasty worked hard for twelve years and finally made this set of things.

Zhu Jingyuan compared the development history of computers in previous lives in his mind.

The first publicly available large computer, ENIAC, was launched in 1946.

The first pure transistor computer, Tridik, was born in 1954.

The first general-purpose computer went on sale in 1965.

Under his own direct promotion, it took Ming Dynasty twelve years to complete the journey that the Americans in the previous life took in nineteen years.

The development speed of computer technology has been accelerated by half, and the time has been shortened by one-third.

Zhu Jingyuan gave the direction at the beginning, and also gave some guidance in the following years.

But in the years before he ascended the throne, Zhu Jingyuan did not continue to pay attention, and now he is also interested in their latest progress.

So Zhu Jingyuan stood up directly:

"Okay, Wang Gong and Qi Gong, you two will take me to have a look. That's the end of today's meeting."

Everyone around him stood up and saluted together again.

Wang Lai and Qi Yanhuai quickly walked out of the queue, followed closely by the two nine ministers, Shaofu and Sikong.

The group of people went to the computer room of Qintian Prison under the guidance of Qi Yanhuai.

When he arrived at the door, Qi Yanhuai stretched out his hand to push the door open, and then immediately stepped aside.

Zhu Jingyuan saw the scene in the computer room.

The first computer "Tao" in the Ming Dynasty was assembled with electron tubes as the core and occupied an entire hall at that time.

The current "Type III Universal Silicon Computer Machine" is a transistor computer and is significantly smaller in size.

Now all that's left is a large cabinet that takes up one wall.

On the side of the cabinet is a large console with what looks like an old-fashioned TV from a past life on it.

On the table in front of the TV are several rows of neat buttons.

It already has a monitor and keyboard!

There are also external equipment such as teleprinters, fax machines, and punch machines connected around.

There were several people in the room using computers.

After receiving the news that the emperor was coming, they all stood on both sides of the computer to wait. When they saw the emperor, they immediately saluted.

Zhu Jingyuan waved and walked straight to the operating table.

The keyboard on the table is the same one used for the typewriter I originally designed.

But it's more complicated than a typewriter keyboard.

In addition to the fifty-six typing keys, some function and symbol keys are added around it, and the total number is estimated to be about one hundred.

There are several documents placed next to the keyboard.

There are diagrams and textual descriptions, and the data are obviously prepared for use in calculations.

And the monitor that looks like an old-fashioned TV still displays some text.

It is the Chinese characters I use every day, plus the sentence reading symbol system promoted by Emperor Shizu, and some gaps mixed in.

I know every word, but I can’t understand them when put together.

At first glance it looks like gibberish.

If you look carefully, you can also find some patterns, which seem to use specific words and numbers to represent specific logic.

It seems to be some kind of programming language.

Just replace the English letters and numbers with Chinese characters.

The scene in front of him allowed Zhu Jingyuan to confirm two important pieces of information.

This computer can directly display Chinese characters.

More importantly, the programming language they use is at least assembly language level.

Maybe even an early high-level language.

Zhu Jingyuan was not a programmer in his previous life, nor did he know much about programming languages. He only learned basic knowledge in public classes when he was in school.

Know that the programming languages ​​used in computers can generally be divided into three major levels.

Machine language, assembly language, high-level language.

The further forward, the closer to machine language, and the further back, closer to human language.

The more advanced the language, the higher the performance of the program, because it can be directly input into the machine and directly perform physical level operations.

But the simpler the commands that can be executed, the more difficult it is to implement complex functions.

The performance of programs written in later languages ​​will be lower, because they need to be read and translated, and then converted into machine language before running.

However, the ability to execute commands can be more complex, and the difficulty of implementing complex functions becomes lower.

In my previous life, all serious computer programming languages ​​were expressed in English at the lowest level.

There are a few programs that can display Chinese characters on the surface, but they are completely useless.

In fact, it is not that Chinese characters cannot be used in programming languages, because early programming languages ​​are not essentially human languages.

Those English letters inside are essentially logic and definition symbols.

It's okay to use numbers or even stars.

As long as the programmer can remember what instruction each image represents.

The reason why they are all in English without Chinese characters is because early programmers all used English, so they used English to record and express commands.

This tradition has formed a horse butt that limits the width of railway tracks.

The British who were the first to build railways chose a track width that was just wide enough for two horses to walk.

This data, which is not directly related to trains, became the standard rail width for later generations.

The same goes for computer languages.

The basis of computers is transistors, and each transistor can be thought of as a set of light bulbs and switches.

The two states of off and on can refer to whether the light bulb is on.

Represented in binary numbers, they are 0 and 1.

In research related to computing machines in the Ming Dynasty, craftsmen used to refer to yin and yang.

The two states of each transistor, the two numbers that can be expressed, were called a "bit" in previous lives.

In the Ming Dynasty, it was called a "number", or "yao (yáo)".

Yao is the collective name for the interrupted and connected horizontal lines in traditional Bagua symbols.

A continuous horizontal line is a Yang Yao, and a broken horizontal line in the middle is a Yin Yao.

The meanings of opening and closing, the symbols of yin and yang, disconnection, connection and execution, the three meanings naturally converge.

For Ming craftsmen, this naming was a natural choice.

All instructions transmitted by humans to machines must be converted into a series of switch commands if they are to be recognized and executed by the machine.

There are too many switches in the computer. In order to facilitate management and use, people divide them into groups.

The earliest computers in previous generations were in groups of four, and the last general-purpose computers were in groups of eight.

In this way, the length of the switch command for a group of four to eight switches was called a "byte" in later generations.

In the Ming Dynasty, it was called a "zi" or "gua", which is the hexagram of Bagua.

Machine language is to directly input on and off signals. You can imagine pressing the zero and one or two keys repeatedly.

It is actually implemented using a blanking tape, and whether there is a hole in a position is used to indicate on and off.

To a binary machine, it can only understand on and off.

For example, a set of circuits or a control function are executed on a four-line (four-digit) machine by "off off off on".

From the perspective of the machine, the name and meaning of this command is "off, off, on," and has no other additional meaning.

But from a human perspective, "off off off on" is just a number, and it is easy to get confused simply by looking at this.

Therefore, human beings know the logical function represented by this number according to their own design ideas, and use the words they should use in the human language to describe it.

Americans write down "addition=off off off on" in their brains and notebooks.

People in the Ming Dynasty wrote "plus = yin, yin, yin and yang" in their notebooks, or they drew lines of three yin and one yang.

Whether it is an addition or a plus, they are just "notes" for human beings to facilitate their memory.

Inside the machine, we are actually doing the work of “turning off, turning on, off, and on”.

To control the computer, you need to directly control the four switches to create the effect of "off, off, on."

The final data calculated by the computer also uses the sequence of holes in the corresponding positions on the paper tape to represent a series of on and off.

Human beings then translate these regular switches into languages ​​that humans can understand.

The earliest computers had nothing to do with human language. It just depended on how the user named and interpreted them. .

But this is too much trouble.

It would be great if computers could directly recognize human language.

The key is, why am I, a human being, translating my own words into the language of you, a machine?

Why can't I speak our human language, and then you, the machine, translate it into a language your machine can understand?

Of course the machine doesn't know what to do.

So humans decided to make a translator, or converter, for the machine.

Input human language into the translator, the translator translates it into machine language for the machine, and then lets the machine perform calculations.

After the computer completes the calculation, it outputs it and then lets the translator translate it into human language.

This idea is very good, and it is actually the basic logic of all programming languages.

The ultimate goal of a programming language is to realize direct human expression so that the machine can fully understand and execute it perfectly.

It's a pity that, let alone fully understanding human speech and executing it perfectly, simply letting the machine directly execute the most basic commands took a lot of effort from the earliest researchers.

How can the translator translate addition into a series of switches?

How to let the machine know what "add" means?

It seems that we only need to make a table, write addition or plus in the left column, and write "off off off on" on the right.

Tell the machine, I enter addition or add, and you can perform "off off off on" for me.

However, a further question is how to "enter" addition or add.

The input method, which seems to be very common in later generations, was definitely a black technology in early computers.

Even the English letters that seem to be able to be pressed directly have to do the work of binding the alphabet with physical keys. ,

Otherwise, the machine does not know what a is, what c is, and there is no b number at all.

So we need to make another table, bind a switch sequence to a, a switch sequence to b, a switch sequence to c...the twenty-six letters and punctuation marks and numbers are all done.

Make another table, bind these switch sequences to the keys on the keyboard, and write a, b, c... on the keys.

I pressed the keys with the letters "addition" in sequence, and the computer received the signal corresponding to the key to look up the table.

I found a series of switch commands such as off off switch, off off on on, off off off off... etc.

If it is an English system, the additional letters will be displayed on the screen in sequence at this time.

At the same time, this series of commands, "off off switch, off off on on, off off off off off"... this series of commands, when combined in sequence, corresponds to another command "off off off off on".

If it is a Chinese character system, "plus" will be displayed on the screen at this time.

Finally, the computer executes the final "off, off, on" command.

When inputting English, the same table with several letters is checked several times in a loop. For Chinese characters, two to four levels of nested tables are designed and checked one after another.

Doing this is already very difficult.

Even, there were certain requirements for the performance of early computers...

The earliest computer byte length was four bits.

One binary bit can record two numbers. If the byte length is four, it can record up to two to the fourth power, which is a total of sixteen numbers.

This doesn't even hold all the English letters.

To record all letters, increase the byte length to at least five, thus increasing the encoding capacity to thirty-two.

Can accommodate all letters, plus several commonly used symbols.

But you can't input numbers separately at the same time. It would be too disgusting to use pure English words to spell the numbers.

So the byte length was increased to six bits, and the encoding capacity was increased to sixty-four.

This can accommodate letters, numbers, and common symbols.

So six-bit computers, even before computers, were on punch cards for a long time.

But in the case of six digits, the letters can only be uppercase or lowercase.

Assembly language is also all capital letters.

If it is used to output text, it will be a headache to look at all capital letters.

So just keep increasing it to seven figures.

This gives a total encoding capacity of one hundred and twenty-eight, which is basically satisfactory for English.

Can express all uppercase and lowercase letters, major symbols, and ten numbers.

As well as common input control commands such as line feed, carriage return, and delete.

The ASCII standard established by the United States is a seven-bit encoding.

The byte length of later general-purpose computers is eight bits, because the first set of general-purpose computers designed by IBM added a check code to the seven-bit number.

Later, as technology improved, the check code was omitted, and the eight-digit code capacity increased to 256.

Compared with the original computer, the byte length has doubled.

This is only in English. If you want to record Chinese characters, the difficulty will soar further.

The "Universal Standard Chinese Character List" currently used in the Ming Dynasty has 8,000 characters.

The length of a hexagram must be increased to at least thirteen lines, which requires a capacity of 8192 to accommodate it.

The length of the hexagram must be increased to fifteen lines, with a capacity of thirty-two thousand seven hundred and sixty-eight, to complete all the Chinese characters in the "Ming Dynasty Standard Chinese Character List".

The current production technology level is relatively low, so we have to refer to IBM's approach and check the price.

This increases the byte length to sixteen lines.

At the same time, there are more than 30,000 sixteen-digit hexagrams, and the total encoding capacity has reached 65,536 lines, which is equivalent to 65KB in the previous life.

This was a very large number for early computers.

More importantly, this is just a Chinese character number.

If Chinese characters are regarded as individual people, this table is equivalent to the address table of all of them.

In order for Chinese characters to be displayed on the screen, the Chinese characters must be made into dot matrix images.

According to the experience of the previous life, to make Chinese characters appear relatively natural, a sixteen-by-sixteen dot matrix should be used.

The switch of a dot matrix must also be controlled by a hexagram.

Sixteen multiplied by sixteen is 256 hexagrams. The total of 32,768 Chinese characters is 8,388,608 hexagrams, which is equivalent to 16MB in the previous life.

Most hard drives at the time couldn't fit in, let alone RAM.

In order to display the Chinese characters barely completely, there is no shortage of strokes, and a dot matrix of twelve times twelve is needed.

This will total 9MB.

Even if it only records the general Chinese character table, it still requires 2.25MB.

For computers before the 1970s, it was very difficult to install this thing.

Basically again, this is just a dot matrix font.

To type Chinese characters through the keyboard and input them into the computer, an input method program is also needed.

It is used to filter out the desired Chinese characters from the character library through specific key combinations according to logic that humans can understand.

This process is the same as typing words in English. The only difference is that each letter is displayed one by one and finally combined to form a command.

Or press a specific combination of keys in sequence to form a command and display the target Chinese character at the same time.

If the advanced association function is not involved, a highly mechanical and rigid input method is used to limit which Chinese characters can only be used. This is the logic.

However, the dot matrix data can still be placed on the hard disk, and the word table and input method must be loaded into the memory.

The supercomputer memory at that time was only a little over 100KB.

This was a huge challenge for computers at the time.

You need to run the input method program first, screen out the Chinese characters to be input from the word list, and then go to the hard disk to check the bitmap and output it to the screen.

Even at no cost, all the functions of the font input method are implemented.

This computer will probably have to wait several seconds to type a word.

Therefore, when Zhu Jingyuan saw Chinese characters on the computer screen, he knew that the Ministry of Industry had definitely not incorporated all Chinese characters into the computer.

Because today's computers do not need to input all Chinese characters.

Computers at this time were not used to process text.

English programming will not complete the addition, so this word requires 64B of space to accommodate it.

Typing dozens of words into a piece of code will take up KB-level memory, and the English system cannot support it either.

It must be as easy as possible, just write ADD.

Computers are not designed to process text anyway, and there were only a few dozen commands at that time, so it was easy to recognize the words using abbreviations.

This is definitely how Chinese characters are processed, and it can only be processed this way.

Zhu Jingyuan suspected that this computer could only display one to two hundred, or even dozens of Chinese characters.

It is very likely that one key press will produce a fixed word, one corresponds to a fixed program command, and the rest are just punctuation marks and numbers.

There will be no difference between full-width and half-width symbology, and the input process does not require converting the input method.

If this is the case, Chinese character compilation is simpler than English.

Because a single Chinese character has the function of an English word, especially in an era when traditional classical Chinese is still prevalent.

The commands in the program on the screen in front of Zhu Jingyuan were indeed all single words.

In the English environment, a single letter rarely has actual meaning. At least two to three letters must be used to allow programmers to create associations with actual meaning.

At the same time, the screen in front of you must be a very "advanced" function.

Low-end models of computers may not have a screen at all.

Because displaying Chinese characters and letters on the screen, even if there are only a few dozen, is a huge waste of storage space.

Early English computers also had no screens.

The operators are touch typers.

As for the complete eight thousand Chinese characters, we can only wait for the next generation of computers to make integrated circuits.