Pointers, Stacks and Memory Addressing Computer Science and Programming Concepts
Lesson Objectives Know what a pointer is Know what they are used for Explain the purpose of using pointers in computing and computer memory
Operators *= value of cell & = address of cell
The Matrix and Memory Addressing
Links Claymation animation on pointers – Binky! Claymation level_Computing/AQA/Problem_Solving,_Programming,_ Operating_Systems,_Databases_and_Networking/Progra mming_Concepts/Pointers level_Computing/AQA/Problem_Solving,_Programming,_ Operating_Systems,_Databases_and_Networking/Progra mming_Concepts/Pointers
Memory Addressing “A digital computer's memory, more specifically main memory, consists of many memory locations, each having a physical address, a code, which the CPU (or other device) can use to access it” Ref:
Stacks A real life example is a stack of books you might have on your desk:
LIFO AND FILO A stack is a last-in-first-out (LIFO) or first-in-last-out (FILO) ADT. Implementations should include two operations, pushing and popping, and a pointer to the top of the stack.
Pushing and Popping in a Stack Let's take a look at a computer implementation of a stack: Pushing: Adds a new specified item to the top of the stack Popping: Removes the item from the top of the stack level_Computing/AQA/Problem_Solving,_Progra mming,_Operating_Systems,_Databases_and_N etworking/Programming_Concepts/Stacks
Wikibooks file path Wikibooks Wikibooks A-level Computing | A-level Computing AQA | AQA Problem Solving, Programming, Operating Systems, Databases and Networking | Problem Solving, Programming, Operating Systems, Databases and Networking Programming Concepts Programming Concepts Stacks Stacks