Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How an instruction is formed in a computer

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how an instruction in the computer is composed, which is very detailed and has a certain reference value. Friends who are interested must read it!

An instruction usually consists of an opcode and an address code. An instruction is a statement of machine language, it is a group of meaningful binary code, the basic format of the instruction is: opcode field, address code field, where the opcode indicates the operation nature and function of the instruction, the address code gives the address of the Operand or Operand.

Computer instructions are the instructions and commands that direct the work of the machine, the program is a series of instructions arranged in a certain order, and the process of executing the program is the working process of the computer.

The controller directs the machine to work by instructions, and people use instructions to express their intentions and hand them over to the controller for execution.

An instruction usually consists of an opcode and an address code.

An instruction is an order given to a computer. It tells the computer what to do, where the data involved in the operation comes from, and where the results of the operation will be sent, so an instruction must include an opcode and an address code.

There are three kinds of organization and coding of opcodes:

(1) the organization scheme of fixed length opcodes

Advantages: the hardware design of the computer is simple and the instruction decoding and execution speed is fast.

Disadvantages: when the number of instructions increases and the instruction word divides a fixed number of bits for the opcode, the number of bits left to represent the Operand address will be seriously insufficient.

It is suitable for computer systems with long words, such as 32 bits or more.

(2) the organization scheme of variable length opcodes

Advantages: in a relatively short instruction word, it can not only express a large number of instructions, but also meet the requirements of Operand address as far as possible.

Disadvantages: the hardware design of the computer is complex, and the instruction decoding and execution speed is slow.

It is suitable for computer systems with short word length, such as 16 bits or less.

(3) the scheme in which the opcode field is crossed with the Operand address.

Advantages: in a relatively short instruction word, it can not only express a large number of instructions, but also meet the requirements of Operand address as far as possible. The opcode is no longer concentrated in the highest bit of the instruction word, but crosses the field that represents the address of the Operand.

Disadvantages: the hardware design of the computer is complex, and the instruction decoding and execution speed is slow.

This kind of scheme is not very common.

The above is all the contents of the article "how an instruction in a computer is made up". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report