Register is just like a small memory they are used to store data or bit in binary form 0 and 1 .
A register is a group of flip-flop. Each flip-flop is storing one bit of information. We can use register to store the binary information there are many types of register are- :
1- Accumulator(ACC)
2- General purpose register
3- Pointer counter(PC)
4- Stack pointer(SP)
5- Instruction register
6- Temporary register
7- Index register
8- Instruction formate
Sunday, 8 September 2019
What is register?
Thursday, 8 August 2019
What is storage classes??
The register Storage Class
The register storage class is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).
The static Storage Class
The static storage class instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope. Therefore, making local variables static allows them to maintain their values between function calls.
The static modifier may also be applied to global variables. When this is done, it causes that variable's scope to be restricted to the file in which it is declared.
In C programming, when static is used on a class data member, it causes only one copy of that member to be shared by all the objects of its class.