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

Slides:



Advertisements
Similar presentations
VCE Software Development Theory Slideshows By Mark Kelly Vceit.com Stacks.
Advertisements

Stacks and Queues. Not really data structures – More of an enforcement of policy – Can be implemented using an array or linked list – Can store just about.
Procedures 2 Intructions Supporting Procedures Making Use of a Stack.
CPU Review and Programming Models CT101 – Computing Systems.
Stacks and Queues CSC220 Data Structure Winter
Stacks  a data structure which stores data in a Last-in First-out manner (LIFO)  has a pointer called TOP  can be implemented by either Array or Linked.
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Stack and Queues.
Copyright © 2012 Pearson Education, Inc. Chapter 18: Stacks And Queues.
 Abstract Data Type Abstract Data Type  What is the difference? What is the difference?  Stacks Stacks  Stack operations Stack operations  Parsing.
Stacks A stack is a data structure that only allows items to be inserted and removed at one end We call this end the top of the stack The other end is.
Stacks. What is a stack? Last-in first-out data structure (LIFO) New objects are placed on top Removal restricted to top object Examples?
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 12: Stacks and Queues.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (4) Data Structures 11/18/2008 Yang Song.
CS 206 Introduction to Computer Science II 10 / 26 / 2009 Instructor: Michael Eckmann.
COMP 110 Introduction to Programming Mr. Joshua Stough.
Summary of lectures (1 to 11)
Ali Abdul Karem Habib Kufa University / mathematics & Science Of Computer.
Object Oriented Data Structures
Data Structures Winter What is a Data Structure? A data structure is a method of organizing data. The study of data structures is particularly important.
Review 1 Introduction Representation of Linear Array In Memory Operations on linear Arrays Traverse Insert Delete Example.
1 Joe Meehean.  Conceptual Picture access only to top item last-in-first-out (LIFO) item 1 item 2 item 3 Values in Values out 2.
 qT4 qT4  txh/mc_txh3_002.html.
Chapter 8: Data Abstractions Senem Kumova Metin. 8-2 Chapter 8: Data Abstractions 8.1 Basic Data Structures – Arrays – Lists, Stacks, Queues – Trees 8.2.
Adapted from instructor resources Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights.
Data Structures and Algorithms Stacks. Stacks are a special form of collection with LIFO semantics Two methods int push( Stack s, void *item ); - add.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Data structures Abstract data types Java classes for Data structures and ADTs.
DATA STRUCTURE & ALGORITHMS (BCS 1223) NURUL HASLINDA NGAH SEMESTER /2014.
Data Structures and Algorithms Lecture 3 Instructor: Quratulain Date: 8 th September, 2009.
Foundation of Computing Systems Lecture 3 Stacks and Queues.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Stacks.
Stacks And Queues Chapter 18.
3 Data. Software And Data Data Data element – a single, meaningful unit of data. Name Social Security Number Data structure – a set of related data elements.
Chapter 16 – Data Structures and Recursion. Data Structures u Built-in –Array –struct u User developed –linked list –stack –queue –tree Lesson 16.1.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Stack Data Structure By Marwa M. A. Elfattah. Stack - What A stack is one of the most important non- primitive linear data structure in computer science.
1 Midterm 1 on Friday February 12 Closed book, closed notes No computer can be used 50 minutes 4 questions Write a function Write program fragment Explain.
3/3/20161 Stacks and Queues Introduction to Data Structures Ananda Gunawardena.
Click to edit Master text styles Stacks Data Structure.
Stacks Chapter 3 Objectives Upon completion you will be able to
CPS120: Introduction to Computer Science Nell Dale John Lewis Abstract Data Types.
Data Structures Intro2CS – week Stack ADT (Abstract Data Type) A container with 3 basic actions: – push(item) – pop() – is_empty() Semantics: –
Stacks. Stack ADT where we can only work with "top" – Top() : get value on top – Pop() : remove value on top – Push(value) : put new value on top.
Chapter 3 Lists, Stacks, Queues. Abstract Data Types A set of items – Just items, not data types, nothing related to programming code A set of operations.
STACKS & QUEUES for CLASS XII ( C++).
Stack ADT (Abstract Data Type) N …
Comprehensive Introduction to OOP with Java, C. Thomas Wu Stack ADT
Cpt S 122 – Data Structures Abstract Data Types
Queues.
Data Structure By Amee Trivedi.
G64ADS Advanced Data Structures
Chapter 15 Lists Objectives
Introduction to Analysis of Algorithms
Introduction to Analysis of Algorithms
ENERGY 211 / CME 211 Lecture 25 November 17, 2008.
Data Structures and Algorithms
Stacks and Queues.
COMPSCI 107 Computer Science Fundamentals
Data Structures and Database Applications Stacks in C#
Lesson Objectives Aims
ITEC 2620M Introduction to Data Structures
CSE 214 – Computer Science II Stacks
Data Structures and Algorithms
Stack A data structure in which elements are inserted and removed only at one end (called the top). Enforces Last-In-First-Out (LIFO) Uses of Stacks Evaluating.
Data structures.
STACK DATA Expert Arena ea STACK LIFO ( Stack rule) PUSH (function)
Abstract Data Types Stacks CSCI 240
DATA STRUCTURES IN PYTHON
Presentation transcript:

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