100 likes | 229 Vues
This lesson delves into fundamental computer science concepts including pointers, stacks, and memory addressing. Learners will gain insights into what pointers are and their critical role in memory management. The session will cover stack data structures, emphasizing the Last In, First Out (LIFO) principle. Additionally, practical implementations through operations like pushing and popping stack items will be explored. Resources such as animations and videos supplement these concepts, making the learning experience engaging and informative.
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