Daming 1805

Chapter 496 Ming-style computer underlying concepts

Zhu Jingyuan issued a formal order, and the relevant personnel immediately stood up to accept the order:

"The ministers obey the order."

Zhu Jingyuan raised his hand to signal them to sit back, and then continued to ask new questions:
"Speaking of collecting data for calculations, are your computers enough for the Qin Tianjian, the Ministry of Industry, and the Ordnance Department?"

Qi Yanhuai responded immediately:

"Thanks to Your Majesty for your concern. After the relocation of the Qin Tianjian was completed, the latest three-type general-purpose silicon crystal computing machine was also activated simultaneously.

"The computing power of a single computer has reached 100 million times per second, which should be able to meet the current computing needs of Qin Tianjian."

Wang Lai, the new Secretary of the Ministry of Industry, followed suit and added:

"Thanks to His Majesty's blessing, Daming's silicon crystal computer has advanced by leaps and bounds in the past ten years.

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

"Including Qin Tianjian, the Ministry of Industry, the Ministry of Ordnance, the Governor's Mansion, the Royal Bank, and the Daming Bank.

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

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

Zhu Jingyuan heard two key words from their answers.

100 million times per second is easy to understand, this is the level of computers in the early 60s in the United States in the previous life.

As for a general-purpose computer, that is, a computer that uses a unified architecture, can use the same program, and can expand storage space and external devices.

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

This kind of thing that later generations are accustomed to is something that many people can hardly imagine in the earliest days of the computer.

Almost 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 60s.

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

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

Ten years ago, Zhu Jingyuan listed a lot of goals for Daming's computer project.

These goals are at the same time guidelines, directly providing a proven direction for development.

For electronic tube computers, Daming only developed two generations of verification machines, and there was no large-scale promotion at all, so there was no further manufacturing.

According to Zhu Jingyuan's suggestion, he directly drilled into the direction of the transistor, and moved directly towards the general-purpose computer.

The craftsmen of Daming worked hard for 12 years and finally made this set.

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

The first public mainframe computer, the Eniac, was born in 1946.

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

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

Under his own direct promotion, it took Daming 12 years to complete the 19-year journey of the Americans in his previous life.

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

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

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

So Zhu Jingyuan stood up directly:
"Okay, Mr. Wang and Mr. Qi, you two take me to have a look. Let's stop here for today's meeting."

The people around stood up and saluted together again.

Wang Lai and Qi Yanhuai stepped out quickly, followed by Shao Fu and Si Kong.

Led by Qi Yanhuai, the group went down to the computer room of Qin Tianjian.

When he reached 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 it occupied an entire hall at that time.

The current "three-type general-purpose silicon computing machine" is a transistor computer, and its volume is significantly smaller.

Now all that remains is a large cabinet that fills one wall.

On the side of the cabinet is a large operating table, on which is an old-fashioned TV that looks like a previous life.

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

It already has a monitor and keyboard!
There are also external devices such as teletype printers, fax machines, punching machines, etc. connected around.

There were several people in the room using computers.

When they received the news that the emperor was coming, they stood on both sides of the computer and waited in advance, and saluted immediately when they saw the emperor.

Zhu Jingyuan waved his hand, and then walked straight to the console.

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

But it's more complicated than a typewriter keyboard.

In addition to the 56 typing keys, some function and symbol keys were added around, and it is estimated that there are about one hundred keys in total.

There are several documents beside the keyboard.

There are graphs and text descriptions, obviously data prepared for calculations.

And on the monitor that looks like an old-fashioned TV, some text is still displayed.

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

I know every word by myself, but I can't understand it when put together.

At first glance it looks like gibberish.

If you look carefully, you can also find some rules, which seem to use specific words and numbers to express 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 made Zhu Jingyuan confirm two important pieces of information.

This computer can directly display Chinese characters.

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

Possibly even an early high-level language.

Zhu Jingyuan was not a programmer in his previous life, and he didn't know much about the programming language used in programming. He only learned the basic knowledge in public classes when he was in school.

Knowing the programming language used by computers can be roughly divided into three major levels.

Machine language, assembly language, high-level language.

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

The performance of the program written in the earlier language is higher, because it can be directly input into the machine and directly perform calculations at the physical level.

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

The performance of the program compiled in the later language is lower, because it has to be read and translated, and then converted into machine language before running.

However, being able to execute commands can be more complicated, and the difficulty of implementing complex functions is 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 human languages ​​in essence.

Those English letters inside are essentially logic and definition symbols.

Boxes with numbers or even stars are fine too.

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

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

This tradition forms a butt that limits the width of the rails.

The British, who were the first to build railways, chose the width of the rails to be just wide enough for two horses to walk.

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

The same goes for computer languages.

The foundation of a computer is the transistor, 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 the state of whether the light bulb is on or not.

Represented by binary numbers, it is 0 and 1.

In Daming's research on computing machines, 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 Ming Dynasty, it was called a "number", or "yao (yáo)".

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

A continuous horizontal line is a yang line, and a broken line in the middle is a yin line.

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

For the craftsmen of Ming Dynasty, this kind of naming is a natural choice.

All the instructions sent by people to the machine must be converted into a series of switch commands if they want to be recognized and executed by the machine.

There are too many switches in the computer, and people divide them into groups for the convenience of management and use.

The earliest computers in the previous life 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 of a group of four to eight switches is called a "byte" in later generations.

It is called a "character" or "gua" in Ming Dynasty, which is the hexagram of gossip.

Machine language is to directly input two signals of on and off. It is conceivable to press the zero and one keys repeatedly.

In fact, it is performed using a hollow paper tape, and whether there is a hole in a position is used to indicate on and off.

As far as binary machines are concerned, he can only understand on and off.

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

From the perspective of the machine, the name and meaning of this command are "turn off and turn off", without any other additional meaning.

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

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

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

The people of the Ming Dynasty wrote down "Add = Yin Yin Yin Yang" in small books, or drew lines of three Yin and one Yang.

Whether it is addition or addition, it is just a "remark" for human beings to remember

In the machine, it is actually doing the work of "turning off and turning on and off".

To control the computer, it is necessary to directly control the four switches to form the effect of "turning off and turning on".

Finally, the data calculated by the computer is also represented by the sequence of holes in the corresponding positions on the paper tape to represent a series of on and off.

Humans then translate these regular switches into a language that humans can understand.

The earliest computers have nothing to do with human language, it depends on how users name and interpret them. .

But this is too much trouble.

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

The point is, why am I, a human being, translating my own words into the language of your machine.

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

Of course the machine doesn't know how to do it.

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

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

After the computer completes the output, let the translator translate it into human language.

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

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

It's a pity, not to mention fully understanding the human language and executing it perfectly, simply letting the machine directly execute the most basic commands made the earliest researchers work hard.

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

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

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

Tell the machine, I input addition or add, and you go to execute "off, off, on, off" for me.

However, the further question is how to "input" addition or addition.

The input method, which is very common in later generations, is definitely a black technology on early computers.

Even if it seems to be an English letter that can be pressed directly, it is necessary to do a physical button to bind the alphabet. ,
Otherwise, the machine doesn't know what a is, what c is, and there is no b number at all.

So make another form, bind a switch sequence to a, a switch sequence to b, and a switch sequence to c... 26 letters and punctuation marks are all done.

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

I press the buttons with the letters addition in sequence, and the computer receives the signal corresponding to the buttons to look up the meter.

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

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

At the same time, this series of commands of off switch, off off on off, off off on off, etc., are combined in order to correspond to another command "off off off on off".

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

Finally, the computer goes to execute the final "off off off on off" command.

Inputting English is a same form with several letters that are checked several times in a loop, and Chinese characters are designed to be nested in two to four layers and checked one by one.

Doing this is already very difficult.

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

The earliest computer bytes were four bits long.

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

This doesn't even hold all the English letters.

To record all letters, at least the byte length should be increased to five, thus increasing the encoding capacity to 32.

Can hold all letters, plus a few 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 numbers.

So the byte length was increased to six bits, and the encoding capacity was increased to 64.

This is able to accommodate letters, numbers, common symbols.

So six-bit computers, long before computers even existed, were on punched cards.

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 is also a headache to look at all capital letters.

So just keep going up to seven figures.

In this way, there is a total of 120 eight encoding capacities, which is basically perfect for English.

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

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

The ASCII standard developed by the United States is a seven-bit code.

The byte length of general-purpose computers in later generations is eight bits, because the first set of general-purpose computers designed by IBM added a check code on the basis of seven bits.

Later, with the improvement of technology, the check code was omitted, and the capacity of the eight-bit code was increased to 250 six.

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

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

The "Universal Standard Chinese Character Table" currently in use in the Ming Dynasty has [-] characters.

The length of a character hexagram must be increased to at least thirteen lines, and there is a capacity of 190 two to accommodate it.

The length of the hexagrams needs to be increased to fifteen lines, with a capacity of 3 ba, so that all the Chinese characters in the "General Table of Standard Chinese Characters of the Ming Dynasty" can be included.

The current production process level is relatively low, and IBM's practice must also be referred to for price verification.

In this way, the byte length is increased to sixteen lines.

At the same time, the total encoding capacity of more than 3 sixteen-character hexagrams has reached 65536 lines, which is equivalent to 65KB in the previous life.

This is a very large number for early computers.

More importantly, this is just a Chinese character number.

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

To allow Chinese characters to be displayed on the screen, Chinese characters must also be made into dot matrix images.

According to the experience of the previous life, to make the Chinese characters appear relatively natural, it is necessary to use a dot matrix multiplied by sixteen.

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

Sixteen multiplied by sixteen is 256 hexagrams, 32768 Chinese characters totaling 8388608 hexagrams, which is equivalent to 16MB in the previous life.

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

In order for Chinese characters to be fully displayed, there is no shortage of strokes, and a dot matrix of twelve times twelve is required.

This would be a total of 9MB.

Even if only the common Chinese character table is recorded, 2.25MB is required.

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

Again, basically, 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 select the desired Chinese characters from the font library through a specific key combination according to the logic that humans can understand.

This process is the same as typing words in English, the difference is that the letters are displayed one by one, and finally combined to form a command.

Still press the key of specific combination one by one, the target Chinese character is displayed while the combination is formed into a command.

If it does not involve advanced associative functions, using a highly mechanical and rigid input method to limit which Chinese characters can only be used is such a logic.

However, the dot matrix data can also be placed on the hard disk, and the word list and input method will be loaded into the memory.

At that time, the supercomputer memory was only in the early 100KB.

This was a huge challenge for computers at the time.

First run the input method program, screen out the Chinese characters to be input from the character list, and then go to the hard disk to check the dot matrix and output it to the screen.

Even at any cost, all the functions of the font input method have been realized.

Most of this computer will also be in a state where it takes several seconds to type a word.

Therefore, now that Zhu Jingyuan sees Chinese characters on the computer screen, he knows that the Ministry of Industry has definitely not put all Chinese characters into the computer.

Because the current computer does 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 needs 64B of space to accommodate it.

Typing dozens of words in a piece of code will take up KB-level memory, and the English system can't support it either.

If you can save it, you can save it, just write an ADD.

Anyway, computers don't handle text, and there were only a few dozen commands at that time, and the words were all abbreviated without being mistaken.

Chinese characters must be handled in this way, and it can only be handled in this way.

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

It is likely that a key can fix a word, one corresponds to a fixed program command, and the rest are all punctuation marks and numbers.

There will be no difference between full-width and half-width in the symbol system, and there is no need to convert the input method during the input process.

If this is the case, the compilation of Chinese characters is simpler than that of English.

Because a single Chinese character has the function of an English word, especially in the 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 practical meaning, and at least two to three letters are required to make programmers associate with actual meaning.

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

Low-end models of computers will most likely not have a screen at all.

Because Chinese characters and letters are displayed on the screen, even if there are only dozens of them, it is a waste of storage space.

Early English computers also had no screens.

Operators are touch typing.

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

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like