100 likes | 220 Views
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.
E N D
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
Links • Claymation animation on pointers – Binky! • http://en.wikibooks.org/wiki/A-level_Computing/AQA/Problem_Solving,_Programming,_Operating_Systems,_Databases_and_Networking/Programming_Concepts/Pointers • http://www.youtube.com/watch?v=Rxvv9krECNw
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: http://en.wikipedia.org/wiki/Memory_address
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 http://en.wikibooks.org/wiki/A-level_Computing/AQA/Problem_Solving,_Programming,_Operating_Systems,_Databases_and_Networking/Programming_Concepts/Stacks
Wikibooks file path • Wikibooks • A-level Computing | • AQA | • Problem Solving, Programming, Operating Systems, Databases and Networking | • Programming Concepts • Stacks