Instruction system refers to the * * * system of all instructions that a CPU can handle, which is the fundamental attribute of a CPU. For example, the CPU we are using now adopts x86 instruction set, and they are all of the same type, whether it is INTEL's CPU, Athlon or IMD's Joshua. There are faster CPUs in the world, such as Alpha, but they don't use x86 instruction set and can't use a lot of programs based on x86 instruction set, such as Windows98. The reason why the instruction system is the fundamental attribute of CPU is because the instruction system determines what programs the CPU can run.
All programs written in high-level languages need to be translated (compiled or interpreted) into machine language to run. These machine languages contain instructions.
1, instruction format
An instruction generally includes two parts: operation code and address code. Opcode is actually the instruction serial number, which is used to tell the CPU which instruction needs to be executed. The address code is complex, mainly including the address of the source operand, the destination address and the address of the next instruction. In some instructions, the address code can be partially or completely omitted, for example, an empty instruction has only the operation code and no address code.
For example, the instruction length of an instruction system is 32 bits, the operation code length is 8 bits, and the address length is 8 bits. The first instruction is addition and the second instruction is subtraction. When it receives the instruction "0000000100000001000000100000", it first takes out its first eight opcodes, namely 000000/kloc-0. Then CPU takes out the minuend of memory address 00000 100, takes out the minuend of 000001,sends it to ALU for subtraction, and then sends the result to 0000010.
This is just a rather simplistic example, and the actual situation is much more complicated.
What is instruction and instruction system?
An instruction is a command for a computer to perform an operation. An instruction usually includes two aspects: operation code and address code. Among them, the operation code is used to characterize the running characteristics and functions of an instruction; The address code gives the address of the data involved in the operation in the memory. Instruction system refers to the collection of all instructions that a computer can execute. Instruction system determines the main performance and basic functions of computer hardware. Instruction system generally includes the following types of instructions. (1) data transmission class instruction. (2) Operation instructions include arithmetic operation instructions and logical operation instructions. (3) The program control instruction is mainly used to control the flow direction of the program. (4) Input/output instructions are called I/O instructions, which are used to exchange information between the host and peripherals. 2. Instruction cycle The time required for a computer to execute an instruction. 3.3 performance. CPU Development of Integrated Circuit Technology —— Moore's Law of Silicon Transistor Large-scale Integration Technology: Every 18-24 months, the number of transistors on a chip will double. 4. Clock frequency The system clock determines the speed or frequency of data transmission and instruction execution. 5. The word length determines the data width of the register and CPU bus. 6. Cache The larger the cache, the faster the processing speed.
What is an instruction system?
It is the language system of computer hardware, also called machine language. It is the main interface between software and hardware. From the perspective of system structure, it is the main attribute of computer seen by system programmers. Therefore, the instruction system represents the basic functions of the computer, determines the required capabilities of the machine, and also determines the instruction format and the structure of the machine factory. When designing instruction systems for different computers, we should pay due attention to instruction formats, types and operating functions.
What instructions should a complete instruction system include?
I. Description of data transmission
1. Universal data transmission instruction
MOV (mobile) transfer
Push (push the stack)
Pop (pop from the stack)
exchange
. MOV instruction
Format: MOV daylight saving time, SRC
Operation performed: (Daylight Saving Time)
. Push stack instruction
Format: push SRC
Operation performed: (sp)
((SP)+ 1,(SP))& lt; -(SRC)
. Pop stack instruction
Format: Popular Daylight Saving Time
Operation performed: (Daylight Saving Time)
(SP)& lt; -(SP)+2
. XCHG exchange instruction
Format: XCHG OPR 1, OPR2.
Operation performed: (opr 1)
2. Accumulator dedicated transfer instruction
Input input
Output output
XLAT (translation) escape code
This set of instructions is limited to using accumulator AX or AL to transmit information.
. Input instruction
Long format: input port (bytes)
In AX, port (word)
Operation performed: (al) <-(port) (bytes)
(AX)& lt; -(PORT+ 1,PORT) (word)
Short format: in AL, DX (bytes)
In AX, DX (word)
Operation performed: Al
AX & lt-((DX)+ 1,DX) (word)
. OUT output instruction
The long format is: OUT PORT, AL (bytes).
Output port, AX (word)
Operation performed: (port)
(PORT+ 1,PORT)& lt; -(axe) (word)
Short format: OUT DX, AL (bytes)
Output DX, AX (word)
Operation performed: ((dx)) < -(AL) (bytes)
((DX)+ 1,(DX))& lt; -AX (word)
In IBM-PC, external devices can have up to 65,536 I/O ports, and the ports (that is, the port addresses of peripherals) are 0000~FFFFH. The first 256 ports (0~FFH) can be directly specified in the instruction, and they are long format ports. At this time, the machine instruction is represented by two bytes, and the second byte is the port number. Therefore, when the long format is used, the port number can be directly specified in the specification. When =256, only short format can be used. IN this case, the port number must be put into the DX register (the port number can be from 0000 to 0FFFFH), and then the information can be transmitted through the in or OUT instruction.
. XLAT escape instruction
Format: XLAT OPR
Or: XLAT
Operation performed: (al) < -((BX)+(AL))
3. Effective address of register instruction
LEA (Load Effective Address) The effective address is sent to the register.
Pointers to registers and DS.
Pointers to registers and ES.
. Effective address of LEA registration
The format is: LEA REG, SRC.
Operation performed: (reg)
Instruction sends the effective address of the source operand to the specified register.
. LDS pointers to registers and DS instructions.
Format: LDS REG, SRC
Operation performed: (reg)
(DS)& lt; -(SRC+2)
Send the four consecutive bytes specified by the source operand to ... specified by the instruction >; & gt
What is instruction and instruction system?
An instruction is a command for a computer to perform an operation. An instruction usually includes two aspects: operation code and address code. Among them, the operation code is used to characterize the running characteristics and functions of an instruction; The address code gives the address of the data involved in the operation in the memory. Instruction system refers to the collection of all instructions that a computer can execute. Instruction system determines the main performance and basic functions of computer hardware. Instruction system generally includes the following types of instructions. (1) data transmission class instruction. (2) Operation instructions include arithmetic operation instructions and logical operation instructions. (3) The program control instruction is mainly used to control the flow direction of the program. (4) Input/output instructions are called I/O instructions, which are used to exchange information between the host and peripherals. 2. Instruction cycle The time required for a computer to execute an instruction. 3.3 performance. CPU Development of Integrated Circuit Technology —— Moore's Law of Silicon Transistor Large-scale Integration Technology: Every 18-24 months, the number of transistors on a chip will double. 4. Clock frequency The system clock determines the speed or frequency of data transmission and instruction execution. 5. The word length determines the data width of the register and CPU bus. 6. Cache The larger the cache, the faster the processing speed.
What is the instruction system of a computer? What are the usual types of machine instructions?
An instruction is a command for a computer to perform an operation.
An instruction usually includes two aspects: chicken code and address code. Among them, the operation code is used to characterize the running characteristics and functions of an instruction; The address code gives the address of the data involved in the operation in the memory.
Instruction system refers to the collection of all instructions that a computer can execute.
Instruction system determines the main performance and basic functions of computer hardware.
Instruction system generally includes the following types of instructions.
(1) data transmission class instruction.
(2) Operation instructions include arithmetic operation instructions and logical operation instructions.
(3) The program control instruction is mainly used to control the flow direction of the program.
(4) Input/output instructions are called I/O instructions, which are used to exchange information between the host and peripherals.
What does instruction set mean?
CPU relies on instructions to calculate and control the system, and each CPU is designed with a series of instruction systems that match its hardware circuits. The strength of instruction is also an important indicator of CPU, and instruction set is one of the most effective tools to improve the efficiency of microprocessor. From the current mainstream architecture, instruction set can be divided into two parts: complex instruction set and simplified instruction set, while from the specific applications, such as Intel's MMX (Multimedia Extensions), SSE, SSE 2 (Streaming-Single Instruction Multiple Data Extensions 2) and AMD's 3DNow! They are all extended instruction sets of CPU, which respectively enhance the processing capabilities of multimedia, graphics and images and the Internet of CPU. We usually call the extended instruction set of CPU "CPU instruction set".
1, reducing the use of instruction sets
In the decades since the computer was invented, with more and more functions and performances, more and more internal components and more complex instruction sets. Too many instructions seriously affect the working efficiency of the computer. Later, after research, it was found that 80% of the programs in the computer used only 20% of the instruction set. Based on this discovery, RISC reduced instruction set is put forward, which is a profound revolution in computer architecture. The basic idea of RISC architecture is to grasp the shortcomings of CISC instruction system, such as too many instruction types, nonstandard instruction formats and too many addressing methods. By reducing instruction types, standardizing instruction formats and simplifying addressing methods, parallel processing within the processor is facilitated, and the use efficiency of VLSI devices is improved, thus greatly improving the performance of the processor.
RISC instruction set has many characteristics, the most important of which is:
There are few instruction types and standard instruction formats: RISC instruction sets usually use only one or several formats. Instruction length is single byte (usually 4 bytes), aligned at word boundaries, and field position, especially opcode position, is fixed.
Simplification of addressing mode: almost all instructions use register addressing mode, and the total number of addressing modes generally does not exceed 5. Other more complex addressing methods, such as indirect addressing, are synthesized by software using simple addressing methods.
Inter-register operations are widely used: most operations in RISC instruction set are register-to-register operations, and only simple load and store operations are used to access memory. Therefore, the number of memory addresses accessed by each instruction will not exceed 1, and the operation of accessing memory will not be mixed with arithmetic operation.
Simplify the structure of the processor: using RISC instruction set can greatly simplify the design of the controller and other functional units of the processor, without using a large number of special registers, especially allowing hardware lines to realize the instruction operation, instead of using microprograms to realize the instruction operation like CISC processors. Therefore, RISC processor can execute instructions directly and quickly without setting up microprogram control memory like CISC processor.
Easy-to-use VLSI technology: With the development of LSI and VLSI technology, the whole processor (even multiple processors) can be put on one chip. RISC architecture can bring many benefits to the design of single-chip processors, which is conducive to improving performance and simplifying the design and implementation of VLSI chips. Based on VLSI technology, the workload and cost of manufacturing RISC processors are much less than CISC processors.
The parallel ability of the processor is enhanced: RISC instruction set can be very effectively applied to pipeline, superpipeline and superscalar technology, thus realizing instruction-level parallel operation and improving the performance of the processor. At present, parallel operation technologies commonly used in processors are basically developed based on RISC architecture.
Because of the advantages of RISC system, it is widely used in high-end systems, and CISC system occupies a dominant position in desktop systems. Nowadays, in the field of desktop, RISC is also infiltrating. It is predicted that RISC will dominate the Jianghu in the future.
2. Extended instruction set of 2.CPU
For CPU, the basic functions are not much different, and the basic instruction sets are similar. However, in order to improve the performance of a certain aspect, many manufacturers have developed extended instruction sets and defined new data and instructions, which can greatly improve the data processing ability of a certain aspect, but it must be supported by software.
MMX instruction set
......& gt& gt
What does the instruction system of a computer include?
It is the * * * of all the instructions that the computer can execute. It describes all the control information and "logical judgment" ability in the computer. The instruction systems of different computers contain different kinds and quantities of instructions. Generally, it includes instructions such as arithmetic operation, logical operation, data transmission, judgment control, input and output.
Computer instruction system computer instruction system type
Commonly used instructions can be divided into: ① data processing instructions: including arithmetic operation instructions, logical operation instructions, shift instructions, comparison instructions, etc. ② Data transfer instructions: including transfer instructions between registers and between registers and main memory. ③ Program control instructions: including conditional transfer instructions, unconditional transfer instructions, rotor program instructions, etc. ④ Input and output instructions: including reading and writing instructions of various peripheral devices. Some computers include input and output instructions in the data transmission instruction class. ⑤ State management instructions: including memory protection, interrupt handling and other management instructions. With the development of computer system structure, some computers constantly introduce new instructions. For example, the "test juxtaposition" instruction is set to prevent re-entry into common subroutines in multi-machine systems and multi-program systems. This instruction first tests the flag bit to determine whether the subroutine is in use. If it is not used, it is transferred to the subroutine and the flag bit is set to prevent other processes from re-entering. Later, more powerful signal (PV operation) instructions appeared. Some computers also have "execute" instructions. The execute instruction executes the instruction in the memory location determined by the address field. Its purpose is to avoid using the program to directly modify the instructions in the program. This is beneficial to the application of program detection and pipeline technology. Some computers use stacks to realize the calling instructions and returning instructions of programs. When calling, the return address and various states and parameters are pushed to the top of the stack, which can well realize the nesting and recursive calling of subroutines and the reentry of subroutines. In addition, some computers fix many complicated operations and form instructions such as polynomial evaluation, queue insertion, queue withdrawal and various translation and editing. Vector instruction and scalar instruction: Some mainframes and supercomputers have full-featured vector operation instruction systems. The basic operation object of vector instruction is vector, that is, a group of numbers arranged in order. If the instruction is a vector operation, the instruction determines the address of the instruction system number (main memory start address or vector register number) of the vector operation, and directly or implicitly specifies other vector parameters such as increment and vector length. Vector instruction stipulates that the processor processes all components in the vector according to the same operation, which can effectively improve the operation speed of the computer. Instructions that do not have vector processing function and only operate on a single quantity, namely scalar, are called scalar instructions. Privileged instructions and user instructions: In a multi-user environment, improper use of some instructions will cause systematic confusion of the machine. Instructions such as memory protection, interrupt handling, input and output are all called privileged instructions, and users are not allowed to use them directly. Therefore, a processor generally sets two states, namely, a privileged state and a user state, or a management state and a destination state. In the privileged state, the program can use all instructions, including privileged instructions. In the user state, only non-privileged instructions or user instructions are allowed. If users use privileged instructions, they will violate the rules. If users need to apply for an operating system for certain services, such as input and output, etc. , they can use "general instructions", or instructions called "access supervision" and "access management".
Every computer has a different instruction system. What do you mean? What is the difference?
That's not true.