• What is CPU Registers ?

    What is CPU Register:-

    Register is a temporary storage memory that is built into Processor(CPU). In the Computer Architecture, registers are special types of computer memory which are performed their tasks quickly such as (Fetching, transferring, and storing) data and instructions.

     These are the high speed memory location built into the microprocessor.Register  small areas of extremely fast storage
    usually measured by the no of bits they hold e.g._a "32 bit register or a ""64 bit regi
    ster".

    x86 architecture provide 16 basic program register:




    General Purpose Register (EAX,EBX,ECX,EDX,ESL,ESL,EBP,ESP,)
    Segment Register(CS,DS,SS,ES,FS,GS,EFLAG,EIP)

    X64 ADDRESS an additional 8 general purpose register:



    RAX, RBX, R CX, RDX, RDL, RSL ,RBP ,RSP  ,R8-R15. 


    REGISTER-CACHE -RAM - HDD



    • The cpu usages these location to store data and instruction temporarily for pro  
    •    cpu  process , store and transfer data from one components to another with the help of register .
    • The number of register variable among computers.
    • it increases the performance of cpu.
    • Each register receive the information , holds the temporarily and pass it on, as direct by CU
    • the size of register depend on the computer architeture..

    1. PC(Program Counter)
    2. IR(Instruction register)
    3. MAR (Memory Address Register)
    4. IP(Instruction Pointer)
    5. SPR(Stack Pointer Register(SP)
    6. GPR (General Purpose Register)(A,B,C,D)
    7. Address and Segment Register(CS,DS,ES,SS)
    8. Index Register(Dl , Sl)









     PC(Program counter):_

               1.    it holds the add of the next instruction to be fetched and executed .
               2.      when instruction is fetched the value us automatically incremented and its points to the add of next instruction.

    IR(Instruction Register):-

                         it holds the current instruction that is being executed.

    MAR Register

    MAR stand for “Memory Address Register”, and its main objective is to store all memory addresses of entire data and instructions.MAR helps to make the communication with using of MDR (Memory Data Register) in between the CPU and Main Memory

    MBR(Memory Buffer Register):-

        it holds the content of memory location read from or written in the memory. 

    FR Register

    FR register stands for “Flag Register“, and this register helps to indicate the specific condition. Flag register contains the one or two bytes, and further every byte is splitted into 8 bits. And every bit delivers the flag means condition.

    Few flags register are Carry flag, Parity flag, Sign flag, Zero flags, and Overflow flag.

    GPR Registers

    GPR stands for “General Purpose Registers“, and these are unified types of registers. These registers are capable to store the memory addresses, data values as well as floating-point values. Mostly, GPR registers are used into modern CPU and GPUs due to their best flexibility. 

    SPR Register

    SPR stands for “Special Purpose Registers“, and they are used to hold the program state. SPR registers are enabled with PC (Program Counter) and SR (Status Register).




    General Purpose Register:-

    •        These register are used to perform arithmetic and logical operation
    • EAX, EBX, EDX, are 4 byte register AX, BX, CX and DX are 2byte AH ,AL BH,BL,CH,CL,DH and DL are 1 byte register.
    AX(Accumulator Register)

                 it is used to asthmatic and logical operation,it holds the initial data to be operated upon and the final result for processing .
             the result of arithmetic operation are returned to accumulator to transfer to the main memory through buffer.
    BX(Base Register)
                     it is an address register that can be used for in directing addressing.
     CX(counter Register)
            it is used for counting purpose,it acts as counter loop ex .for(int i=10;i>0;i--)
    DX(Data Register)
       it is special role in division and multiplication.
                        

    Segment Register / Address Register:

    it is a group of four segment CS,DS,ES,SS.
    size of each segment register is 2 byte.
    CS(Code Segment)
    it hold the base location of all executable instruction in the program .CS along with ip register fetches the next instruction.
     DS(Data Register)
           it is default base location for memory variable.
    DS points of data in memory using Dl and  SI
    CPU calculate the offset variable using the values of DS.
    ES(Extra Segment)
                it is additional base location for memory of DS .
     SS(Stack Segment):
                it contains the base location of the current program stack.
    • Index Register:
    • index Registry are used for data movement.
    • there are two type of index registers.
    • SI(Source Index)
    • DI(Destination Index
    • DS Point to data in memory using DI (destination index) or SI(source Index) registes.
    IP(Instruction Pointer)
    CS along with ip Register fetched the next instruction.











    THANKS FOR READING 


    SHIVASNHU TIWARI







  • SSKKT

    .

    SSKKT

    if you want to be happy, set a goal that commands your thoughts, liberates your energy and inspires your hopes.

    SSKKT

    System programmers are the high priests of a low cult.

    SSKKT

    Without programming, life would be a mistake.

    Hello

    Author Name

    Shivanshu Tiwari

    Contact Info

    shivanshut9889@gmail.com

    My Hobbies & Interests

    My hobby is playing cricket. It makes me feel fresh and energetic.I have made so many friends while playing cricket. Cricket encourages teamwork.
    My second hobby is playing chess ,Chess Teaches You Problem Solving and making complex decision it helps me in programming.

    Carrier

    Shivanshu Tiwari is a game developer with 5 year of experience working with online companies. He specializes in using Java, c,c++,c#, to build customer facing APIs, and also has experience of software programmer.

    Hello, I am Shivanshu Tiwari