指令集體系結構_計算機體系結構:指令程式碼

cunfen6312發表於2020-07-28

指令集體系結構

While a Program, as we all know, is, A set of instructions that specify the operations, operands, and the sequence by which processing has to occur. An instruction code is a group of bits that tells the computer to perform a specific operation part.

眾所周知,一個程式是一組指令,用於指定操作,運算元和處理髮生的順序。 指令程式碼是一組位,它們告訴計算機執行特定的操作部分。

指令碼:操作碼 (Instruction Code: Operation Code)

The operation code of an instruction is a group of bits that define operations such as add, subtract, multiply, shift and compliment. The number of bits required for the operation code depends upon the total number of operations available on the computer. The operation code must consist of at least n bits for a given 2^n operations. The operation part of an instruction code specifies the operation to be performed.

一條指令的操作碼是一組位,這些位定義了諸如加,減,乘,移位和補碼之類的操作。 操作碼所需的位數取決於計算機上可用的操作總數。 對於給定的2 ^ n次操作,操作碼必須至少包含n位 。 指令程式碼的操作部分指定要執行的操作。

指令程式碼:註冊零件 (Instruction Code: Register Part)

The operation must be performed on the data stored in registers. An instruction code therefore specifies not only operations to be performed but also the registers where the operands(data) will be found as well as the registers where the result has to be stored.

該操作必須對儲存在暫存器中的資料執行。 因此,指令程式碼不僅指定要執行的操作,還指定將找到運算元(資料)的暫存器以及必須儲存結果的暫存器。

儲存程式組織 (Stored Program Organisation)

The simplest way to organize a computer is to have Processor Register and instruction code with two parts. The first part specifies the operation to be performed and second specifies an address. The memory address tells where the operand in memory will be found.

組織計算機的最簡單方法是將處理器暫存器和指令程式碼分為兩部分。 第一部分指定要執行的操作,第二部分指定地址。 記憶體地址告訴將在記憶體中找到運算元的位置。

Instructions are stored in one section of memory and data in another.

指令儲存在儲存器的一個部分中,資料儲存在另一部分中。

Instruction Codes

Computers with a single processor register is known as Accumulator (AC). The operation is performed with the memory operand and the content of AC.

具有單個處理器暫存器的計算機稱為累加器(AC) 。 該操作是通過儲存運算元和AC的內容執行的。

通用巴士系統 (Common Bus System)

The basic computer has 8 registers, a memory unit and a control unit. Paths must be provided to transfer data from one register to another. An efficient method for transferring data in a system is to use a Common Bus System. The output of registers and memory are connected to the common bus.

基本計算機具有8個暫存器,一個儲存單元和一個控制單元。 必須提供將資料從一個暫存器傳輸到另一個暫存器的路徑。 在系統中傳輸資料的有效方法是使用公共匯流排系統 。 暫存器和儲存器的輸出連線到公共匯流排。

負荷(LD) (Load(LD))

The lines from the common bus are connected to the inputs of each register and data inputs of memory. The particular register whose LD input is enabled receives the data from the bus during the next clock pulse transition.

來自公共匯流排的線連線到每個暫存器的輸入和儲存器的資料輸入。 LD輸入使能的特定暫存器在下一個時鐘脈衝轉換期間從匯流排接收資料。

Before studying about instruction formats lets first study about the operand address parts.

在研究指令格式之前,首先要研究運算元地址部分。

When the 2nd part of an instruction code specifies the operand, the instruction is said to have immediate operand. And when the 2nd part of the instruction code specifies the address of an operand, the instruction is said to have a direct address. And in indirect address, the 2nd part of instruction code, specifies the address of a memory word in which the address of the operand is found.

當指令程式碼的第二部分指定運算元時,該指令被稱為具有立即運算元 。 並且當指令程式碼的第二部分指定運算元的地址時,該指令被稱為具有直接地址 。 在間接地址 (指令程式碼的第二部分)中,指定一個儲存字的地址,在該地址中可以找到運算元的地址。

電腦指令 (Computer Instructions)

The basic computer has three instruction code formats. The Operation code (opcode) part of the instruction contains 3 bits and remaining 13 bits depends upon the operation code encountered.

基本計算機具有三種指令程式碼格式。 指令的操作碼 (操作碼)部分包含3位,剩餘的13位取決於遇到的操作碼。

There are three types of formats:

共有三種型別的格式:

1.記憶體參考指令 (1. Memory Reference Instruction)

It uses 12 bits to specify the address and 1 bit to specify the addressing mode (I). I is equal to 0 for direct address and 1 for indirect address.

它使用12 bits指定地址,並使用1 bit指定定址模式( I )。 對於直接地址等於0 ;對於間接地址, 等於1

2.註冊參考說明 (2. Register Reference Instruction)

These instructions are recognized by the opcode 111 with a 0 in the left most bit of instruction. The other 12 bits specify the operation to be executed.

這些指令由操作碼111在指令的最左位識別為0 。 其他12位指定要執行的操作。

3.輸入輸出指令 (3. Input-Output Instruction)

These instructions are recognized by the operation code 111 with a 1 in the left most bit of instruction. The remaining 12 bits are used to specify the input-output operation.

這些指令由操作碼識別1111中指令的最左位元。 其餘12位用於指定輸入輸出操作。

指令格式 (Format of Instruction)

The format of an instruction is depicted in a rectangular box symbolizing the bits of an instruction. Basic fields of an instruction format are given below:

指令的格式在矩形框中表示,該矩形符號表示指令的位。 指令格式的基本欄位如下:

  1. An operation code field that specifies the operation to be performed.

    一個操作程式碼欄位,用於指定要執行的操作。

  2. An address field that designates the memory address or register.

    指定儲存器地址或暫存器的地址欄位。

  3. A mode field that specifies the way the operand of effective address is determined.

    一個模式欄位,指定確定有效地址的運算元的方式。

Computers may have instructions of different lengths containing varying number of addresses. The number of address field in the instruction format depends upon the internal organization of its registers.

計算機可能具有不同長度的指令,其中包含不同數量的地址。 指令格式中的地址欄位數取決於其暫存器的內部組織。

翻譯自: https://www.studytonight.com/computer-architecture/instruction-codes

指令集體系結構

相關文章