首页 > 编程知识 正文

什么是计算机指令集,计算机指令集代码

时间:2023-05-06 17:23:41 阅读:180230 作者:4509

指令集

命令系统(Instruction Set )。 aninstructionsetcanbedefinedasagroupofinstructionthataprocessorcanexecutetoperformdifferentoperations.onthebasisofcomplexity

指令集可以定义为处理器可执行以执行不同操作的指令集。 根据复杂性和使用的指令数量,可以将指令集分类如下

complex安装集

复杂指令集

精简安装集

简化指令集

1 )复杂指令集(1)复杂指令集。 thecomplexinstructionsetisthesetofinstructionwhichincludesverycomplexandlargenumberofinstructions.thenumberofinstructionthiontherontion instructioninthissetismostlymemorybasedinstruction、 whichinvolvesfrequenttothememory.thecomplexinstructionsetmakesuseofalargenumberofaddressingmodesbecauseofthefrequentreferenctrenctred . theinstructioninthisinstructiontakesalotoftimebecausetheinstructionsformatwhichisnotlimitedtoonly 32

复杂指令集是非常复杂且包含大量指令的指令集。 这个集中的命令数量是100到250。 这个集中的指令主要是基于内存的指令,与内存的频繁使用有关。 由于经常引用寄存器和内存,复杂的指令集使用了大量的寻址模式。 由于命令的格式不限于32位,因此此命令需要花费很多时间。

thecomplexwhichmakesuseofcomplexinstructionsetiscalledcomplexinstructionsetcomputer (CISC ).theinstructionsetofcischasasalalalargrgution

使用复杂指令集的复合体称为复杂指令集计算机(CISC )。 CISC指令集对于每种指令类型都有许多指令。

高级软件合成系统

复杂指令集的优点

thereisnoneedtoinventaninstructionsetforeachnewdesign.theinstructionsetofthepredecessorisusedbythenewuser。

每个新设计都不需要发明指令集。 新用户使用前身的指令集。

aprogramwritteninciscrequirelessmemoryspaceasthecodeisconfinedtolessnumberofinstruction。

用CISC编写的程序限制为代码较少的指令数,因此存储容量较少。

ciscmakesthejobofacomputereasierbyfacilitatingtheimplementationofhigh-levellanguageconstructs。

CISC通过促进高级语言结构的实现,使计算机的工作更简单。

disadvantagesofcomplexinstructionset

复杂指令集的缺点

theinheritanceofoldinstructionintonewprocessorincreasethecomplexity。

将旧指令继承到新处理器会增加复杂性。

manyciscinstructionsarenotfrequentlyused。

很多CISC命令不经常使用。

cisccommandistranslatedintoalargenumberoflines

of microcode which makes the CPU processing slower.

CISC命令被翻译成大量的微代码行,这使CPU处理速度变慢。

CISC system has a complex hardware, so they require more times for designing.

CISC系统具有复杂的硬件,因此需要更多的时间进行设计。

.minHeight{ min-height: 250px; } @media (min-width: 1025px){ .minHeight{ min-height: 90px; } } .minHeight{ min-height: 250px; } @media (min-width: 1025px){ .minHeight{ min-height: 90px; } } 2)精简指令集 (2) Reduced Instruction Set)

The reduced instruction set refers to a set of instruction that contains very few instructions ranging from 0 to 100. It comprises only those instruction that is frequently used by the processor for the execution of a program. The instruction is generally very simple to execute. The memory-based instruction includes the only load and stores instructions. The instruction in this instruction set has fixed length instruction format of 32 bits. An instruction format divides the bits of instructions into small group fields. Generally, an instruction has the following fields:

精简指令集是指包含很少的0到100范围内的指令的指令集。它仅包括处理器经常用于执行程序的那些指令。 该指令通常很容易执行。 基于存储器的指令仅包括加载和存储指令。 该指令集中的指令具有固定长度的32位指令格式。 指令格式将指令的位分成小组字段。 通常,一条指令具有以下字段:

Opcode field

操作码字段

It represents the operations to be performed by the instruction.

它代表指令要执行的操作。

Operand field

操作数字段

It represents the data on which the operations are to be performed or the memory location or registers where the data is stored.

它表示要在其上执行操作的数据或存储该数据的存储器位置或寄存器。

Mode field

模式字段

It represents the method of fetching the operands stored at specified memory location or register.

它表示获取存储在指定存储位置或寄存器中的操作数的方法。

The comparison of RISC and CISC processor indicated that the RISC processor is always preferred over the CISC processor because of their compact size and small instruction set.

RISC和CISC处理器的比较表明,RISC处理器始终比CISC处理器更受青睐,因为它们具有紧凑的尺寸和小的指令集。

Advantages of Reduced Instruction set computer

精简指令集计算机的优势

The other advantages of RISC processor over the CISC processor are as follow:

RISC处理器相对于CISC处理器的其他优点如下:

In RISC processor the instructions are executed by decoding but in CISC processors, the instructions are executed by first and then translating them into equivalent microcode instructions. The conversion of instruction into microcode consumes a lot of space in the memory thereby reducing the speed of executions.

在RISC处理器中,指令是通过解码执行的,而在CISC处理器中,指令是先执行的,然后将其转换为等效的微码指令。 将指令转换为微代码会占用内存中的大量空间,从而降低了执行速度。

The RISC processor executes an instruction in a single clock cycle, while the CISC processor requires multiple clocks cycles for the execution of an instruction.

RISC处理器在单个时钟周期内执行一条指令,而CISC处理器则需要多个时钟周期才能执行一条指令。

Disadvantages of Reduced Instruction set computer

精简指令集计算机的缺点

The only disadvantages of RISC in comparison to CISC is that the number of instructions required to perform an operation is comparatively large.

与CISC相比,RISC的唯一缺点是执行操作所需的指令数量相对较大。

翻译自: https://www.includehelp.com/cso/instruction-set-and-their-types.aspx

计算机指令集

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。