Peking University Computer composition principle Note 2.1 Why Command System

Source: Internet
Author: User
Designing your own processor has a big title. In fact, it is from scratch to explore the idea of learning how a processor is designed. The question is, why are there CPUs of different architectures and different assembly languages? A computer consists of two parts: Software and Hardware (computers without software are inferior to scrap iron, haha semiconductor ). Then the Hardware Engineer

Designing your own processor has a big title. In fact, it is from scratch to explore the idea of learning how a processor is designed. The question is, why are there CPUs of different architectures and different assembly languages? A computer consists of two parts: Software and Hardware (computers without software are inferior to scrap iron, haha semiconductor ). Then the Hardware Engineer

Design your own processor


The title is a bit big. In fact, it is from scratch to explore how learning processors are designed.


The question is, why are there CPUs of different architectures and different assembly languages?

A computer consists of two parts: Software and Hardware (computers without software are inferior to scrap iron, haha semiconductor ).



Therefore, hardware engineers need to communicate with software engineers and develop the computers we want. Communication requires a standard. Just like the password telegram of the spy fighters, you must "understand your own language ". The Hardware Engineer and the software engineer agreed, so the standard is the command system.


At first, in order to facilitate human memory, the corresponding commands were replaced by simple writing of words in the human language as much as possible. ADD and JMP (jump wrote JMP to facilitate memory)

In fact, computers do not recognize these human characters. He can only recognize two logics-0 and 1. But based on these two logical expressions 0 and 1, different sequences can be used to derive other rich logical expressions. For example, "0001" indicates "ADD 0000" indicates "LOAD.


The following is the instruction format. Assume that the instruction length of the computer CPU we designed is 2 bytes (in fact, x86 is not equal to the instruction length)

We can assume the following design concepts.





As long as we have established the correspondence relationship between the corresponding characters and the 01 combination, we can easily "translate the character to the 01 combination ". In fact, this process is compiled by the assembly language to obtain the machine code.



If everything is really clear, you must know the ins and outs. The above answers are the questions raised at the beginning of the blog. Why do we need a command system?

For better collaboration!

Certificate ----------------------------------------------------------------------------------------------------------------------------------------------

For personal notes only, we recommend that you study and discuss the "Computer composition principles" issued by Peking University at coursera. Instructor Lu spoke very well!

I plan to summarize my problems or learned things. For personal discussion only.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.