Central processing unit
Reason for Register
Central Processing Unit (CPU) has three important parts which contain of the Arithmetic and Logic Unit (ALU), Control Unit and Register. Register is one of the important parts because it has the connection with ALU and Control Unit. In the modern computer, the moving data are operating from the main memory and send it to the register which it named as load-store architecture. Register can be accessed and stored faster in the processor compare to RAM because it is not part of the main memory. As to compare the fastest speed for a CPU to access data, register will be the fastest because it located at the top of the memory hierarchy. Register are used for temporary storage or internal memory for the CPU [Shamila, 2003]. The modern computer usually use the array of registers at least 32 general purposes as it will increase the speed of the processor.
Type of Register
Struggling with your essay?
There are two types of register used in Intel x86 which is the General Purpose Register (GPR) and the Special Purpose Register (SPR). General Purpose Register (GPR) can store both data and address such as store immediate result, store final output and store instruction. Special Purpose Register (SPR) is used to perform an individual task and it is not used for any other purpose [Ravi, 2003]. There are 8 type of General Purpose Register (GPR) which used in Intel x86. The 8 GPRs are the Accumulator, Base, Counter, Data, Base Pointer, Stack Pointer, Source Index and Destination Index. Accumulator function is used in arithmetic operations, base register function is used as a pointer to data, and index register function is used when program contains looping or indexed addressing [Kahfi, 2003]. The Special Purpose Register (SPR) used in Intel x86 are the Segment Register, EFlags (Program Status and Control Register) and Program Counter (Instruction Pointer). Segment register function is used to reduce address translation time and coding complexity and the processor provides register for holding up to 6 segment selectors. The CPU in Intel x86 needed the Base register and Segment register in order to calculate the memory address. The program counter stores address of next instruction to execute and controls the flow if program execution. EFlags contain a group of status flag and system flag. The status flag used are the carry, parity, adjust, zero, sign and overflow flag. Intel x86 also uses the Index register to loop or indexed addressing.
- General Purpose Register (GPR) = 32 bit
- Segment Register = 16 bit
- Program Status and Control Register (EFlags) = 32 bit
- Instruction Pointer (Program Counter) = 32 bit or 64 bit
GPR uses 32 bit to hold operands for logical and arithmetic operations, operands for address calculation and memory pointers. The 32 bit are divided to 2 categories which are the 16 bit and 32 bit. There are high bytes and low bytes named as AH, BH, CH, DH for high bytes and AL, BL, CL, DL for low bytes.
Segment Register 16 bit is a special pointer that identifies a segment in memory and there are three types of storage which is the code, data or stack.
EFlags contain 32 bit where the advantage is the processor will automatic save the EFlags when been interrupt while handler the procedure.
The 64 bit mode program counter let the register hold the next instruction to be executed and supports a special technique RIP- relative addressing (Max, 2009).
Source is taken from the book name Computer System Organization and Architecture, (Chandanav, 2003).
It shows how the data type organization is arranged. There is a system bus to let all the data type to be connected.
It shows the data type size and how is works with the high bytes and low bytes.
If you are the original writer of this essay and no longer wish to have the essay published on the UK Essays website then please click on the link below to request removal: