“How the computer works: Understanding the Computer from the root”, is the MySQL series of small books (selling more than 20,000 copies) author children, launched after two years of new small books, it is completely oriented to zero-based users, let you understand the core concepts related to the computer.
🎤 Author Introduction
Children are the authors of “How MySQL works: Ribs Understanding MySQL”, “How MySQL is used: Learning MySQL from Zero egg”, and the public account “We are all little frogs”.
He studied how to write simple technical books and thought it was cool to explain complex problems clearly.
🚀 The birth of this little volume
As a programmer, whether you’re doing front-end development, back-end development, data analysis, algorithms, or writing programs in C, Java, PHP, Javascript, or Python, you’re working with computers.
As computers become more and more powerful, have you ever wondered how a computer actually works?
I’m sure most of you have thought about this, and probably have taken courses like “Principles of Computer Composition” in school. But most people bring up this topic either as too basic to learn, or as too difficult to learn.
So, is it really not necessary to learn the knowledge at the bottom? In fact, a lot of people have given the answer to this question. All kids want to say is, “Basic knowledge can help us learn new skills and become the most beautiful ones who know everything, so learn it.”
But what about “hard” problems? Children seriously thought about it, we think that “difficult” reasons for nothing more than the following:
-
Not too many concepts. I just opened a book on computer principles, and the concepts looked like they’d come out of a Gatling gun. And knowledge point is like bulk rise, each other seems to have contact but did not have too big contact.
-
A top-down storytelling strategy. That is, divide the computer into several parts and then divide them into smaller parts. This is done in a very crude way, friendly enough to the disseminator of knowledge (because it is easy to write) and unfriendly enough to the receiver of knowledge (because human cognition is not holistic and then concrete).
-
Use new concepts to explain new concepts. This may be because the author assumes that the reader already knows something, or because the author fails to consider cause and effect relationships between concepts in the first place (because adults have a hard time remembering what it was like to be a child).
-
The details! The details! Details! Details are the devil. Details play a crucial role in understanding the nature of a problem. Learning without details makes people feel as if they have learned something, but after a meal they will feel as if they have learned nothing.
-
Boring language brings a strong “academic” atmosphere, a cold knowledge point is reluctantly loaded into the brain, let friends can not help but sigh: learning is really a chore.
So what improvements have been made to the small volume how Computers Work?
-
Give a hierarchy of concepts and do your best to ensure that you introduce only one concept at a time.
-
In the order people know it. Introduce the simple knowledge first, and then expand on the simple knowledge to create a very gentle learning curve for everyone.
-
This volume is completely zero-based (although a high school knowledge of electricity is required), and you will do your best to avoid introducing new concepts by referring to concepts that have not been introduced before.
-
As computers evolve from simple to complex, we’ll keep some of the core stuff and try to give enough detail to make it happen.
-
Children do not like to write so serious, we may feel that someone is talking with you when reading a small volume, in the process of learning in talking or quite pleasant!
How is the 🏆 booklet designed?
The volume design draws on people’s experience in managing complex things, which is to divide complex things into layers. By exposing simple communication interfaces between the upper and lower layers, the complexity of the problems faced at each layer is reduced.
For example, it is difficult to govern a country, so it is divided into provinces, cities, counties, townships and villages. It is very difficult to govern an army, so the army is divided into army, division, brigade, regiment, battalion, company, platoon, small engineers (so brigade commander only need to give Li Yunlong the order: kill the dog yamazaki brigade! And don’t care about Li Yunlong is through the group charge or the way of earthwork yamazaki brigade killed).
To reduce the complexity of this behemoth of a computer, we can break it down into layers as shown below:
Why is that? Suppose we type a line of printf in C, compile and run it, and display it on the screen. Such a simple operation, in fact, is through layers of call to get.
First, our application calls the interface provided by the operating system to print a line to the screen, called a system call. The application doesn’t care about the details of how the operating system prints that line to the screen.
Then, when the operating system receives a system call to print a line to the screen, it calls the driver of the hardware to actually manipulate the hardware. Programs are actually made up of machine instructions, and we only need to write the instructions in the format specified in the instruction set architecture of the CPU we use, regardless of how the instructions are implemented.
Then, for the same instruction set architecture, different vendors can draw different circuit diagrams for the same machine instructions. For example, with the x86 instruction set architecture, Intel and AMD can actually develop different circuit diagrams for the same machine instruction. This circuit diagram is called microarchitecture.
Microarchitecture is composed of several circuit components. For example, you need an adder for addition, a multiplier for multiplication, registers for storing data, and so on. There can also be different implementations for the same circuit component. For example, for adders, we can use either a travelling wave carry adder or a carry ahead adder.
Among them, the circuit components are actually composed of logic gates, and the logic gates that accomplish the same function can be realized by relays, vacuum tubes or transistors.
How relays, vacuum tubes and transistors conduct electricity is the subject of physicists.
In summary, this volume will start with the electrical aspects of physics and work its way up from the lowest level to the computer architecture level. We’ll have to leave the details of operating systems for the next book.
In the book “How computers Work”, the child implemented a single operand miniCPU that supports 14 instructions from 0 and implemented it on FPGA. These instructions are:
Based on these instructions, we can write sequential, branching and cyclic software programs. In addition to babbling about CPU design from the ground up, the volume also introduces advanced concepts such as bus, interrupts, and instruction set architecture (using real-life MIPS as an example).
❤️ is at the end
It has been more than 2 years since “How MySQL Works: Understanding MySQL from the Root” and “How MySQL Is Used: Learning MySQL from Zero” were published by children. So far, there are more than 20,000 kids and kids who have learned MySQL together.
Children want to use a few years of time to write a number of very rich children characteristics of the computer subject books, so as to build a computer subject books pyramid, and this “how the computer is running” is undoubtedly the bottom of the pyramid that brick.
💬 Interactive communication group
After the successful purchase of the booklet, you can apply to join the interactive exchange group. The methods of group entry are as follows: