Algorithms in Programming Computer Science Principles LO 5.1.1.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Machine cycle.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Topic 1: Introduction to Computers and Programming
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Computer Architecture rInput devices: l keyboard l mouse rOutput devices: l screen l printer RAM (memory) I/O Devices Central Processing Unit (CPU) Secondary.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
Tools make jobs easier to do -A computer is a tool used by many professions A computer can do many different jobs because they are programmable - Machine.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
1. Fundamentals of Computer Systems Define a computer system Computer Systems in the modern world Professional standards for computer systems Ethical,
Topics Introduction Hardware and Software How Computers Store Data
1 Intro to Computer Science I Chapter 1 Introduction to Computation Algorithms, Processors, and Programs.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Introduction Lecture 01.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer.
Topic 1Topic 2Topic 3Topic 4Topic
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
The Central Processing Unit (CPU) and the Machine Cycle.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
J. Stover, CSD-HS.  A computer is an electronic device that is programmed to accept data (input), process it into useful information (output), and store.
Exam Format  105 Total Points  25 Points Short Answer  20 Points Fill in the Blank  15 Points T/F  45 Points Multiple Choice  The above are approximations.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Chapter 1 Introduction. Components of a Computer CPU (central processing unit) Executing instructions –Carrying out arithmetic and logical operations.
CS 1308 Exam 2 Review. Exam Format 110 Total Points 24 Points Short Answer 28 Points Fill in the Blank 16 Points T/F 36 Points Multiple Choice The above.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Software Engineering Algorithms, Compilers, & Lifecycle.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
Chapter 1: Introduction to Computers and Programming
Software Development Environment
Engineering Problem Solving With C An Object Based Approach
Topics Introduction Hardware and Software How Computers Store Data
Lecture 1: Introduction to JAVA
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Computer System and Programming
The Central Processing Unit
Chapter 2 – Computer hardware
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
CS 1308 Exam 2 Review.
Chapter 1: Introduction to Computers and Programming
Computer Science I CSC 135.
CSCE Fall 2013 Prof. Jennifer L. Welch.
Topics Introduction Hardware and Software How Computers Store Data
National Diploma in Computer Studies
MARIE: An Introduction to a Simple Computer
CSCE Fall 2012 Prof. Jennifer L. Welch.
Principles of Programming Languages
Programming language translators
CS 1308 Exam 2 Review.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Algorithms in Programming Computer Science Principles LO 5.1.1

What is an algorithm How do you get here: from here: Write your algorithm now!

How does Google do it? Map and directions – which way: What is Google maps doing?

More to consider: How do you tie your shoes? Or, brush your teeth? Or, WHATEVER? How do we see these the same and different? These can all be represented by algorithms. Now, how does a computer do it? Using data representation and programming languages!

Data representation Binary representation of information – Any information that can be represented by decimal numbers can be represented by binary numbers – 1 or 0 corresponds to on or off – Bits and bytes

Languages Low level – Match machine instruction set of microprocessor – Abstract and difficult for humans – generally require less computer memory and run more quickly High level – More easily understood by humans – No one to one to instruction set of microprocessor – portable between different microprocessors

Using high level languages Interpreted languages – Require translation program called interpreter – Converts program language into machine instructions as every time the program is run Compiled languages – Complier program translates program source code into an object file – Linker adds machine language to object file to produce executable file – Executable file remains same and can be run many times

Advantages of complied languages Executable file stands alone, can be run many times Requires less memory and runs faster than interpreted programs Can be utilized by many computers without additional software Gives program portability NOTE: Programming changes require recompiling and linking to produce new executable file with changes

Basic program execution Program instructions converted to machine code are processed by the Central Processing Unit (CPU) – Instructions received from memory – FETCH – Decoded by CPU, directs data to Arithmetic/Logic Unit (ALU) – ALU performs arithmetic or logical task – EXECUTE – ALU stores results and releases output or secondary storage device

This is process is repeated many times This process is models von Neumann architecture

An algorithm for Big Data MapReduce – Handles many terabytes of data – Partitions data to be handled by many computers in a system (running parallel) – Partitioned data from a machine returns intermediate values (mapping) – Intermediate values are clustered (combined) across machines (reducing) – The reduced data is returned for evaluation, producing trends or predictions

Scratch 2.0 Web browser based interpreted language Blocked-based language where many structures are readily available Generally eliminates syntax (programming language requirements) errors Block structures produce the algorithms to complete the tasks of the Scratch program

Group programs Draw a square – Iterations Average 3 grades Each member needs these to modify later

Individual programs Draw a figure with number of side as a choice Average any number of grades – Conditionals Extension: Add letter grade to average program – if statements Additional practice