What is a computer program?

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
13-1 Programming… General Purpose The computer is a “general purpose” tool –General purpose means it can do more than one thing –How do we make.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
101.  When you communicate with people you use a language that you both understand.  The trick is that the computer does not speak English.  To communicate.
CSC 200 Spring 2006 Instructor: Matt Kayala. What is a “Computer”? We all use them for all kinds of tasks: –Games –Word Processing Good at repetitive.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
9-Aug-15 Vocabulary. Programming Vocabulary Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation!
Computers & Logic An Overview. Hardware Hardware is the equipment, or the devices, associated with a computer. For a computer to be useful, however, it.
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.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
THE PROCESS OF WRITING SOFTWARE Python: System Engineering 1.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Algorithms and Programming
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
UNIT - 1Topic - 3. Computer software is a program that tells a computer what to do. Computer software, or just software, is any set of machine-readable.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Assembly Language Friday, Week 5 Monday, Week 6. Assembly Language  Set of mnemonic names for the instructions in a particular computer's machine language.
 Programming - the process of creating computer programs.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Programming Languages
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
INTRODUCTION TO COMPUTER PROGRAMMING ITC-314. Computer Programming  Computer Programming means creating a sequence of instructions to enable a computer.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
1 What we want: execute High Level Language (HLL) programs What we have: computer hardware (a glorified calculator)
Computer Basics.
Software Development Environment
CSC235 Computer Organization & Assembly Language
Why don’t programmers have to program in machine code?
Component 1.6.
Assembly Language for x86 Processors 6th Edition
High or Low Level Programming Language? Justify your decision.
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Lecture 1 Introduction Richard Gesick.
Topics Introduction Hardware and Software How Computers Store Data
Control Unit Lecture 6.
CSCI-235 Micro-Computer Applications
Computer Programming.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Algorithm and Ambiguity
A451 Theory – 7 Programming 7A, B - Algorithms.
Introduction CSE 1310 – Introduction to Computers and Programming
Teaching Computing to GCSE
TRANSLATORS AND IDEs Key Revision Points.
Translators & Facilities of Languages
Language is a medium of communication.
Computers: Hardware and Software
Topics Introduction Hardware and Software How Computers Store Data
Computer Programming.
Programming.
Programming Languages
Instructions in Machine Language
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Tonga Institute of Higher Education IT 141: Information Systems
Computers, Programs, and Programming Languages
Instructions.
Introduction to Computer Science
Algoritmos y Programacion
Presentation transcript:

What is a computer program?

What is a Computer Program? A solution to a problem? A confusing mess? A sequence of instructions?

What is a Computer Program? A computer program is a sequence of statements written in a formal language and executed in sequential order There are some statements that can jump to another position in the sequence

Languages Languages have Natural language Formal language syntax (the way in which words can be combined) and semantics (roughly, the meaning; the relation between the language and the world) Natural language Languages we speak: English, Spanish, Chinese, Finnish, etc Can grow (infinitely?) Can be redundant and ambiguous Pronouns Formal language A language we invent for some particular reason (like a programming language) Some might be meant to be machine interpretable Can grow but slowly and not infinitely Can not be redundant or ambiguous Programming languages are formal languages

Software Languages High level language Mid/Low level language Highest level of abstraction C#, Java, Python, C++ Mid/Low level language Less abstraction – closer to the hardware C Assembly language No abstraction Mnemonics for instructions, memory location names Machine code (hardware) These are the binary op codes (instructions) that execute on the hardware

Software Languages "Vaporators? Sir, my first job was programming binary loadlifters—very similar to your vaporators in most respects."

CPU Instruction Set The instructions that the computer understands are its native Machine Language instructions (assembly language programs are written using these instructions directly). 8008 Instruction Set

Assembly Language A very small assembly language program to add two numbers from memory and place the result back in memory would look like this: LAM    5E00     ; Load data from address 5E0016 into A LBM    5E01     ; Load data from address 5E0116 into B ADB             ; Add A and B and put result in A  LMA    5E02     ; Move data from A to address 5E0216 HLT

What is a CPU Good At? Remembering things Simple math operations Moving values to/from memory Computer moves things from CPU bus to display or network Simple math operations Add, subtract Multiply, divide are sometimes provided in separate floating-point processor Repetition Over, and over, ….. and over again Low level decision making Compare two values, jump on condition The job of the programmer is to implement an algorithm using these simple instructions to do the job that needs to be done Think about long division – step by step process (algorithm) to divide two numbers

Exercises in Describing an Algorithm What are the steps to? Make a peanut butter and jelly sandwich Sort playing cards Sort cards by suit (spades, hearts, diamonds, clubs) and Rank (A, K, Q, J, 10 – 2) Count Legos by color Counts of each color of Legos Long division These processes must described in simple steps and must be complete so that someone else (even a computer) could follow them Think about how you would tell another person (or a computer) to do this Write down the steps Computer programming is a written form of art