tag: operating-system os architecture is_child_of: operating-systems

CPU contains several registers to store intermediatery variables and other data which is frequently used. Some of the examples are,

  1. General registers that a programmer doesn’t have access to.
  2. Program counter which stores the address of next instruction to fetch.
  3. Stack pointer which points to the top of the stack in memory. Stack is used to store the procedure data such as arguments, what is the return address etc.
  4. PSW (Program Status Word) to store result of conditional instructions and some other information.