Homebrew: 8-bit Computer Program Counter: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
[[Category:Electronics]] | [[Category:Electronics]] | ||
[[Category:HowTo]] | [[Category:HowTo]] | ||
[[Category:THS-Homebrew-Computer]] | [[Category:THS-Homebrew-Computer]] |
Latest revision as of 03:46, 23 May 2017
Program Counter
A program is a series of instructions, these instructions, in the case of a computer are mostly stored in sequential format, in the computers memory. Each unit of memory has an address to distinguish it from the other memory. Memory addresses are numbers, so there is a memory unit with the address 0 and 1 and 2 and so on. So if we want the retrieve program instructions from memory we can start with a given address retrieve the instruction at that memory address and just count up by one to retrieve the next instruction. The program counter is what allows us to do this. It stores a number and when commanded to will increment that number up, by one. In addition to this we can also write a number into the program counter, allowing for moving around the program memory in a non sequential way.