Using Algorithms Copyright © 2008 by Helene G. Kershner.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Chapter 1 - An Introduction to Computers and Problem Solving
Using Algorithms Copyright © 2008 by Helene G. Kershner.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Chapter 1 Introduction to Programming. Computer Hardware CPU Memory –Main or primary –Secondary or auxiliary Input device(s) Output device(s)
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Algorithms CS139 – Aug 30, Problem Solving Your roommate, who is taking CS139, is in a panic. He is worried that he might lose his financial aid.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
1. Introduction Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Algorithm:a finite set of instructions.
Programming Introduction. What is a program? Computers cannot think for themselves, they can only follow instructions. A program is a set of instructions.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
Programming Languages
Algorithms and Flowcharts
Algorithms Sept 4, Tuesday’s Lab You developed an algorithm Input – an 8 ½ x 11 inch piece of paper Audience – Fellow classmates Process – Instructions.
INTRODUCTION TO COMPUTER PROGRAMMING ITC-314. Computer Programming  Computer Programming means creating a sequence of instructions to enable a computer.
Computer Applications in Business
How to develop a program
Algorithms and Problem Solving
Programming what is C++
Introduction: Computer programming
High or Low Level Programming Language? Justify your decision.
Topic: Programming Languages and their Evolution + Intro to Scratch
Programming Languages
CSCI-235 Micro-Computer Applications
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Copyright © 2008 by Helene G. Kershner
1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor.
Copyright © 2008 by Helene G. Kershner
A451 Theory – 7 Programming 7A, B - Algorithms.
Introduction to Computer Programming
Teaching Computing to GCSE
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
Teaching Computing to GCSE
Language is a medium of communication.
Using Algorithms Copyright © 2008 by Helene G. Kershner.
Problem Solving Techniques
Algorithm The key is the step-by-step instructions.
Karel the Robot – Making Decisions
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
CS105 Introduction to Computer Concepts Intro to programming
Introduction to Structured Programming
Chapter One: An Introduction to Programming and Visual Basic
The Programming Process
How to develop a program
Programming What?! How?!.
Algorithms.
Algorithms and Problem Solving
University of Gujrat Department of Computer Science
ICT Programming Lesson 1:
Algorithm The key is the step-by-step instructions.
An Introduction to Programming with C++ Fifth Edition
Computational Thinking
Quiz: Computational Thinking
1.3.7 High- and low-level languages and their translators
CS105 Introduction to Computer Concepts Intro to programming
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Using Algorithms Copyright © 2008 by Helene G. Kershner

Using Algorithms Algorithm? What’s an Algorithm? An algorithm is a procedure for solving a problem. An algorithm need not be complex Recipe Directions Even heating a TV dinner has instructions So, an algorithm is a step-by-step set of instructions, that if carried out exactly, solves the problem. Copyright © 2008 by Helene G. Kershner

Algorithms Making a plan is designing an algorithm In many situations we do this unconsciously In other situations we cannot let our unconscious work on its own. Grocery shop Plan a party Write a 20 page research paper In each of the cases above what do we do first? Grab a piece of paper Make of list of tasks Copyright © 2008 by Helene G. Kershner

Algorithms A large complex task, like planning a large party, or writing a 20 page paper is unmanageable if attacked as a whole. Top-down analysis – break it down into its basic parts. This is not a computer technique, it is a life skill Let’s look at the research paper Copyright © 2008 by Helene G. Kershner

Algorithms – A Research Paper What is the topic of the paper? Every paper starts with three basic parts Introduction Paper Conclusion Tell them, tell them what you are going to tell them, tell them what you told them In 20 pages, intro should be 2-3 page, conclusion should be 3-4 pages, this leaves 14 pages to make our case. Now break down these 14 pages into smaller parts Background, current theories, future research Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

Using Algorithms The key is the step-by-step instructions. A computer is a machine designed to follow specific instructions very rapidly; BUT The computer does only and exactly what it is told. Computers cannot think! Computers cannot make assumptions Copyright © 2008 by Helene G. Kershner

Algorithms An algorithm written so that it can be carried out by a computer is called a program. To be understood by a computer, the program or algorithm must be written in a programming language. Copyright © 2008 by Helene G. Kershner

Algorithms – Problem Solving Steps People naturally think at a level of abstraction far too complex for even the most abstract and futuristic computer. Get simple, get “stupid”, make NO assumptions. Define the problem Define the output Define the input Define the initial algorithm Refine the algorithm Define the program Copyright © 2008 by Helene G. Kershner

Algorithms There are three large classes of programming languages: Machine Language Code used to communicate with a particular computer Instructions are coded as groups of 1’s and 0’s Can be thought of as the computer’s “native” language Language is machine-dependent, each type of computer has its own code Every statement in machine language contains an instruction and the data or the location of the data that the instruction will use. Very difficult for humans to use Copyright © 2008 by Helene G. Kershner

Algorithms Assembly Language: Instead of long series of 1’s and 0’s uses abbreviations of mnemonics Ex. SUB for subtract, CLR for clear, or MOV for move Data is represented directly as numeric quantities or variables. Compared to machine language, much easier for people to use and understand Machine dependent, different computers require different assembly languages Must be translated into machine language for the computer to understand program Copyright © 2008 by Helene G. Kershner

Algorithms High Level Language: Structure more like natural language (Ex. English) with a limited set of rules Must be translated into machine language for the computer to understand program One statement may translate into many machine language statements Largely machine independent Easier to use by people Copyright © 2008 by Helene G. Kershner