Collection
zero Useful+1
zero

Memory data register

Terminology of computer data storage
open 8 entries with the same name
synonym MDR (Main memory data register) generally refers to memory data register
Memory Data Register (MDR), also known as data register , buffer register, is a computer control unit The register in the contains the data to be written into the computer main memory (such as RAM) or read by the computer main memory. It is like a buffer, holding data copied from memory ready for use by the processor. The memory data register is one half of the micro interface between the microprogram and the computer data storage, and the other half is the memory address register.
Chinese name
Memory data register
Foreign name
Memory Data Register
Field
Principles of Computer Composition
Alias
Data register
Relevant terms
register
Role
Data buffer

definition

Announce
edit
Memory data register refers to the register used to store the data to be written into the memory, or temporarily store the data read from the memory, ready for processing by the processor, that is, it is used to temporarily store the operands, results and information used by the processor in the calculation process. Data register It is used to temporarily store an instruction or a data word read from the main memory; Conversely, when an instruction or a data word is stored in main memory, they are also temporarily stored in the data register. In the arithmetic unit with single accumulator structure, the data register can also be used as the operand register [1] The data register has the fastest access speed and can work in coordination with the CPU.

category

Announce
edit
AX, BX, CX, DX can be called data registers, and these four 16 bit registers can be divided into high 8 bits (AH, BH, CH, DH) and low 8 bits (AL, BL, CL, DL) respectively. Therefore, they can be used as either four 16 bit data registers or eight 8-bit data registers. During programming, they can store source operands, destination operands, or operation results. A data register is a register that stores operands, operation results and intermediate results of operations to reduce the number of accesses to memory, or stores data read from memory and data written to memory.
AX (accumulator) accumulator. Used as an accumulator. It is the main register for arithmetic operations. Specify to store operands in multiplication, division and other instructions. And all I/O Instructions Both use this register to transfer information with external devices.
BX (base) base address. Can be used as General register use. In addition, when a computer stores an address, it is often used as Base register
CX (count) count. It can be used as a general register. It is often used to save count values, such as implicit counters in loop, displacement and string processing instructions.
DX (data) data. It can be used as a general register. In general, DX and AX are combined to store a double word length number during double word length operation, and DX is used to store high bit numbers. For some I/O operations DX can be used to store the port address of I/O.

register

Announce
edit
Register, which is a very important memory unit in integrated circuits, is usually composed of flip flops. In the design of integrated circuits, registers can be divided into two categories: registers used inside the circuit and registers acting as internal and external interfaces. Internal registers cannot be accessed by external circuits or software, but only store functions for internal circuits or meet the timing requirements of circuits. The interface register can be accessed by internal circuit and external circuit or software at the same time. The register in CPU is one of them. As the interface of software and hardware, it is well known by a wide range of general-purpose programming users. There must be at least six types of registers in the CPU: instruction register (IR), program counter (PC), address register (AR), data register (DR), accumulation register (AC) Program Status Word Register (PSW)。 These registers are used to temporarily store a computer word, and the number can be expanded as needed.
Instruction register
Instruction register (Instruction Register, IR) is used to save a currently executing instruction. When executing an instruction, read the instruction from main memory to Data register And then transferred to the instruction register.
Instructions include two fields, operation code and address code. In order to execute instructions, the operation code must be tested to identify the required operation. Instruction Decoder (ID) is to complete this work. Instruction decoder The operation code part of the instruction register is decoded to generate the control potential for the operation required by the instruction, and sent to the micro operation control circuit to generate specific operation control signals under the action of timing signals of the timing unit. The output of the opcode field in the instruction register is the input of the instruction decoder. Once the operation code is decoded Operation controller Send specific signals for specific operations.
Program counter
Program counter (Program Counter, PC) is used to indicate the address of the next instruction in main memory. Before the program is executed, the first address of the program, that is, the address of the main memory unit where the first instruction of the program is located, must be sent to the PC, so the content of the PC is the address of the first instruction extracted from main memory. When executing an instruction, the CPU can automatically increment the contents of the PC so that it always saves the main memory address of the next instruction to be executed, preparing for taking the next instruction. If it is a single word instruction, then (PC)+1 à PC, if it is a double word instruction, then (PC)+2 à PC, and so on. However, when a branch instruction is encountered, the address of the next instruction will be specified by the address code field of the branch instruction instead of being obtained by sequentially increasing the contents of the PC. Therefore, the structure of the program counter should have two functions: storing information and counting.
Address register
Address register (Address Register, AR) is used to save the address of the main memory unit currently accessed by the CPU. Due to the difference in operating speed between main memory and CPU, address registers must be used to temporarily store the address information of main memory until the access operation of main memory is completed. The address register and Data register If we address peripheral devices and main memory units in a unified way, we will also use address registers and data registers when CPU and peripheral devices exchange information.
Accumulation register
Accumulation register Usually referred to as Accumulator (AC), it is a General register The function of the accumulator is: Arithmetic logic unit When ALU performs arithmetic or logical operations, it provides a workspace for ALU to temporarily save an operand or operation result for ALU. Obviously, there must be at least one accumulation register in the arithmetic unit.
Program Status Word Register
Program status word Program Status Word (PSW) is used to represent the current operation status and the working mode of the program. Program Status Word Register It is used to save the content of various condition codes created by the results of arithmetic/logic instruction running or testing, such as the sign of operation result entering/borrowing (C), sign of operation result overflow (O), sign of operation result being zero (Z), sign of operation result being negative (N), sign of operation result (S), etc. These flag bits are usually saved with 1-bit triggers. In addition, the program status word register is also used to store information such as interrupts and system working status, so that the CPU and the system can timely understand the machine running status and program running status. Therefore, the program status word register is a register that stores various status condition flags.

Main memory

Announce
edit
Main memory (hereinafter referred to as memory or main memory) is a major component of computer system, which is used to save the program and data when the process is running, also known as executable memory. Its capacity may generally be tens of MB to several GB for the current microcomputer system and large and medium-sized computers, and the capacity is increasing, while the embedded computer system is generally only tens of KB to several MB. The control unit of the CPU can only obtain instructions and data from the main memory, and data can be read from the main memory and loaded into registers, or stored from registers to the main memory. The information exchanged between CPU and peripheral devices generally depends on the address space of main memory. Since the access speed of main memory is far lower than the speed of CPU executing instructions, registers and cache are introduced into the computer system to alleviate this contradiction.