Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pointers, Stacks and Memory Addressing Computer Science and Programming Concepts.

Similar presentations


Presentation on theme: "Pointers, Stacks and Memory Addressing Computer Science and Programming Concepts."— Presentation transcript:

1 Pointers, Stacks and Memory Addressing Computer Science and Programming Concepts

2 Lesson Objectives  Know what a pointer is  Know what they are used for  Explain the purpose of using pointers in computing and computer memory

3 Operators *= value of cell & = address of cell

4 The Matrix and Memory Addressing

5 Links  Claymation animation on pointers – Binky! Claymation  http://en.wikibooks.org/wiki/A- level_Computing/AQA/Problem_Solving,_Programming,_ Operating_Systems,_Databases_and_Networking/Progra mming_Concepts/Pointers http://en.wikibooks.org/wiki/A- level_Computing/AQA/Problem_Solving,_Programming,_ Operating_Systems,_Databases_and_Networking/Progra mming_Concepts/Pointers  http://www.youtube.com/watch?v=Rxvv9krECNw http://www.youtube.com/watch?v=Rxvv9krECNw

6 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

7 Stacks A real life example is a stack of books you might have on your desk:

8 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.

9 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,_Progra mming,_Operating_Systems,_Databases_and_N etworking/Programming_Concepts/Stacks

10 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


Download ppt "Pointers, Stacks and Memory Addressing Computer Science and Programming Concepts."

Similar presentations


Ads by Google