计算机主存 寄存器_计算机科学组织| 寄存器

计算机主存中的寄存器是CPU的一部分,分为用户可见寄存器和控制状态寄存器。用户可见寄存器如通用、数据、地址和条件代码寄存器,用于存储数据和计算操作。控制和状态寄存器则用于处理器控制及状态检查,如程序计数器、指令寄存器等。这些寄存器在操作系统的运行中起关键作用。
摘要由CSDN通过智能技术生成

计算机主存 寄存器

电脑注册 (Computer Register)

This is a part of the central processing unit, reside inside the CPU. The information from main memory is brought to CPU and keeps the information in register due to space and cost constraints, there is the limited number of registers in a CPU.

这是中央处理器的一部分,位于CPU内部。 从主存储器中的信息被带到CPU,并保持在寄存器中的信息,由于空间和成本的限制,有一个CPU中的寄存器的数量有限。

The registers in the processor performs two rules:

处理器中的寄存器执行两个规则:

1)用户可见的寄存器 (1) User-visible register)

The user-visible registers are those which enables the machine or assembly language programmer to minimize the main memory references by the operating system.

用户可见的寄存器是使机器或汇编语言程序员能够最小化操作系统对主存储器的引用的寄存器。

i) General purpose register

i)通用寄存器

  • It can be assigned to a variety of functions by the programmer.

    程序员可以将其分配给各种功能。

  • Sometimes their use within the instruction set is orthogonal (right angle )to the operations.

    有时它们在指令集中的使用与操作正交(直角)。

  • The general purpose register can contain the operand for any opcode.

    通用寄存器可以包含任何操作码的操作数。

  • This provides true general purpose register use.

    这提供了真正的通用寄存器使用。

  • However, there are restrictions.

    但是,有限制。

  • For example, there may be dedicated register for floating point and stack operations.

    例如,可能有用于浮点和堆栈操作的专用寄存器。

  • In some cases, general purpose register can be used for addressing functions (e.g register indirect, displacement).

    在某些情况下,通用寄存器可用于寻址功能(例如,间接寄存器,移位寄存器)。

ii) Data register

ii)数据寄存器

It is used only to hold data and cannot be employed in the calculation of an operand address.

它仅用于保存数据,不能用于计算操作数地址。

iii) Address register

iii)地址寄存器

They may be somewhat general purpose or they may be devoted to a particular addressing mode.

它们可能有些通用,也可能专用于特定的寻址模式。

Examples include the following,

示例包括以下内容,

  1. Segment pointers: In a machine with segmented addressing a segment register to hold the address of the base of the segment.

    段指针:在具有段寻址的机器中,段寄存器用于保存段基址。

  2. Index register: These are used for indexed addressing and maybe auto indexed.

    索引寄存器:这些用于索引寻址,也可以自动索引。

  3. Stack pointer: There is some user-visible stack addressing registers which basically points to the top of the stack. This allows implicit addressing that is pushed, pop and other stack instruction need not contain an explicit stack operand.

    堆栈指针:有一些用户可见的堆栈寻址寄存器,它们基本上指向堆栈的顶部。 这允许推送,弹出和其他堆栈指令的隐式寻址不需要包含显式堆栈操作数。

  4. Condition code: Condition codes are Partially visible to the user holds conditions(also referred to as flag). Condition codes are what types of bits which is set by the processor hardware as the result of operations. For example, arithmetic operations may produce a positive, negative zero, or overflow result.

    条件代码:条件代码对于用户持有的条件是部分可见的(也称为标记)。 条件码是处理器硬件根据操作设置的位类型。 例如,算术运算可能会产生正,负零或溢出结果。

2)控制和状态寄存器 (2) Control and status register)

The control register is used by the control units to control the operations of the processor and the status register are used to check the status of the register.

控制单元使用控制寄存器来控制处理器的操作,状态寄存器用于检查寄存器的状态。

Most of the machine these registers are not visible to the users. But some of the registers are visible to machine instructions which are executed in a control operating system mode.

在大多数机器上,这些寄存器对用户不可见。 但是某些寄存器对于在控制操作系统模式下执行的机器指令可见。

Four registers are essential to instructions execution,

四个寄存器对于指令执行必不可少,

  1. Program Counter (PC): It is a type of register that contains the address of an instruction to be fetched.

    程序计数器(PC):它是一种寄存器,其中包含要提取的指令的地址。

  2. Instruction register (IR): It is a type of register that contains the instruction most recently fetched.

    指令寄存器(IR):这是一种寄存器类型,包含最近获取的指令。

  3. Memory address register (MAR): It is a type of register that contains the address of a location in memory.

    内存地址寄存器(MAR):这是一种寄存器,其中包含内存中某个位置的地址。

  4. Memory buffer register (MBR): It is a type of register that contains a word of data to be written to memory or the word most recently read.

    内存缓冲寄存器(MBR):这是一种寄存器,其中包含要写入内存的数据字或最近读取的数据字。

Reference: Introduction to CPU

参考: CPU简介

翻译自: https://www.includehelp.com/cso/registers.aspx

计算机主存 寄存器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值