What is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved?

Similar documents
What is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved?

0 Introduction: Computer systems and program development

Introduction to Programming

Lecture 1: Preliminaries

Programming Languages

Programming Languages

Fundamentals of Programming (C)

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Algorithm: 1. Introduction

Chapter 1 Introduction to Computers and C++ Programming

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

INFS 214: Introduction to Computing

Fundamentals of Programming. Lecture 1: Introduction to C Programming

Introduction to Computers, the Internet and the Web Pearson Education, Inc. All rights reserved.

CS 113: Introduction to

ENT 189: COMPUTER PROGRAMMING. H/P: Home page:

by Pearson Education, Inc. All Rights Reserved.

Principles of Programming Languages. Lecture Outline

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

Chapter 1 & 2 Introduction to C Language

Assembly Language Fundamentals

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Chapter 1: Introduction to Computers and Programming

Introduction. A. Bellaachia Page: 1

What is a programming language?

Chapter 1: Why Program? Computers and Programming. Why Program?

CSCI170 Lecture 1: Analysis of Programming Languages. John Magee 1 September 2011 Some material copyright Jones and Bartlett

Högnivåspråk och översättning

AP Computer Science A: Java Programming

C++ Spring Break Packet 11 The Java Programming Language

CSC 453 Operating Systems

CMPT 379 Compilers. Anoop Sarkar.

Lecture 1: CS2400 Introduction to Computer Science

Fundamentals of Programming. By Budditha Hettige

Computer Principles and Components 1

Announcements. Java Review. More Announcements. Today. Assembly Language. Machine Language

Structured Languages. Rahul Deodhar

Java Programming. Zheng-Liang Lu. Java 308 Spring Department of Computer Science & Information Engineering National Taiwan University

Programming Languages FILS Andrei Vasilateanu

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Chapter 1 Introduction to Computers and C++ Programming

The births of the generations are as follow. First generation, 1945 machine language Second generation, mid 1950s assembly language.

Compilation I. Hwansoo Han

History of Computing. Ahmed Sallam 11/28/2014 1

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Chapter Twelve. Systems Design and Development

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

Chapter - 2 The Basics of Programming. Practical C++ Programming Copyright 2003 O'Reilly and Associates Page1

An Introduction to Python (TEJ3M & TEJ4M)

Java Programming. Zheng-Liang Lu. Java 301 Summer Department of Computer Science & Information Engineering National Taiwan University

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

CS120 Computer Science I. Instructor: Jia Song

Topic 1: Programming concepts

ECE 3210 Laboratory 1: Develop an Assembly Program

COMPILER DESIGN LECTURE NOTES

1a Computers, Problem Solving!

CSI32 Object-Oriented Programming

Dependently Typed Functional Programming with Idris

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Programming Language. Machine Code. CS200: Computer Science I. Module 3 Programming Languages

Chapter 1 Introduction to Computers and Programming

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Pioneering Compiler Design

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Programming: detailed instructions which tell the computer hardware what to do aka software Computer Science: the study NOT of computers, but of what

Lecture 01 & 02 Computer Programming

C++ Programming Language Lecture 1 Introduction

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

Software Lesson 2 Outline

Introduction. Linking, which combines two or more separate object programs and supplies the information needed to allow references between them.

Unit 1: Introduction to Programming. Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune

Software and Licences. Lecture 3 COMPSCI111/111G S2 2017

Software and Licences

Cache Performance and Memory Management: From Absolute Addresses to Demand Paging. Cache Performance

Identifiers. Identifiers are the words a programmer uses in a program Some identifiers are already defined. Some are made up by the programmer:

Software and Licences. Lecture 3 COMPSCI111/111G

Which of the following is not true of FORTRAN?

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

CS Prof J.P.Morrison

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java

Introduction to Computers and Visual Basic.Net Pearson Education, Inc. All rights reserved.

Operating Systems CS3502 Spring 2018

Visual Basic Primer A. A. Cousins

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

Software Project. Lecturers: Ran Caneti, Gideon Dror Teaching assistants: Nathan Manor, Ben Riva

CS101 Introduction to Programming Languages and Compilers

ENGR/CS 101 CS Session Lecture 3

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development


Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts

A Set Of Machine Language Instructions For A Program Is Called Source Code >>>CLICK HERE<<<

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Transcription:

What is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved?

A step-by-step set of instructions to accomplish a task. Example: Make KoolAid - Fill jug with water - Add KoolAid mix - Stir - Pour from jug into cups

A step-by-step set of instructions to accomplish a task expressed in a Computer Language

Machine Language - Consists of binary codes for very simplistic commands Ex: 1001 (move), 1100 (add) - Codes differ by CPU model - Is the only language a CPU can follow - Using ML Requires detailed knowledge of the CPU/hardware.

Machine Language ENIAC being programmed Univ of Penn, 1940 s (photo: U.S. Army)

Assembly Language - Consists of text codes for very simplistic commands Ex: ADD, SUB, MOVE - Codes differ by CPU model - 1-to-1 translation to Machine Language - Using Assembly requires detailed knowledge of the CPU/hardware

High Level Language - Consists of text codes for more complex expressions - Codes standardized across CPU models - 1-to-Many translation to Machine Language - Does not require detailed knowledge of the CPU/hardware.

ML vs ASSM vs HLL Assembler: Machine Lang: MOV @065 to CPU:R1 10010001 01000001 MOV @066 to CPU:R2 10010010 01000010 ADD 01010000 MOV CPU:REG3 to @067 10100010 01000011 High Level Language: x = a + b

Early High Level Languages Fortran (FORMula TRANSlation) - by IBM, 1950 s - Number cruncher for mathematicians, scientists and engineers. - Ex: A = 3.1415926 * R * R; - Very poor at manipulating pretty output and large volumes of data.

Early High Level Languages COBOL (COmmon Business Oriented Language) - by committee, funded by DoD, 1960 - For business/management apps: does pretty and handles large volumes of data easily. - Very English-Like. Ex: ADD SUBTOTAL TO TAX GIVING TOTAL.

High Level Languages - by Dennis Ritchie (AT&T), 1972 - Combines ease-of-use of a HLL with the power of Assembly - Used to write efficient systems software (Unix Operating System) C

Efficiency Accomplishing a task using the least amount of resources. In Programming, resources are: - Time (number of instructions executed) - Space (amount of memory required)

High Level Languages C++ - By Bjarne Stroustrup (AT&T), 1983 - Enhancement of C: major items: - Object-Oriented Programming - Extensibility: programmers can add new features to the language itself. Today: one of the most common languages.

Tools, Files and Errors

Software Tools Editor used to write the program in a HLL. Compiler translates program in a HLL into Machine (or other low level) Language Linker combines Object Files into an Executable. Loader copies an Executable into memory and starts program execution.

Software Tools Integrated Development Environment (IDE) Combines the editor, compiler, linker, loader and often other helpful tools into one programming tool. Example: Microsoft Visual Studio IDE

Files Source a text file containing a program written in a HLL Object part of a program translated in Machine Language Executable a complete program in Machine Language

Errors Syntax (aka Compiler) found in the Source, these are violations of the rules for writing programs in the HLL. Link the linker is unable to link the object files into an executable. Typical errors indicate something is missing or the parts (objects) do not fit together as expected.

Errors Load the loader is unable to copy the executable into memory and start execution. Typical errors include not enough memory or not a trusted program (virus protection). Run-Time occurs during execution. Typical errors include division by 0, file not found, memory access violation. Execution halts when a RTE occurs; normally called a program crash and may not have an error message.

Errors Logic (Semantic) when there is no error from the perspective of the computer, but rather the program does something unexpected by the user. Example: The program prints: The area of a square with a length of 3m is 6m 2

Errors Bug informal name for a Logic (or Run-Time) Error

- Programming is writing instructions for a computer to follow. - Various languages have been invented over the years to assist programmers. - While variations exist, there is a basic process for writing code in a HLL and translating it into ML, including use of a basic set of tools.

Term Algorithm Program Machine Language Assembly Language Definition A step-by-step set of instructions to accomplish a task A step-by-step set of instructions to accomplish a task expressed in a computer language. Binary computer language that differs by CPU model the only language a computer can follow. Language made up of simple text codes for simplistic instructions. It differs by CPU model and has a 1-to-1 translation of commands into Machine Language. High Level Language Language made up of more complex and human-language-like codes with a 1- to-many translation of commands into Machine Language. FORTRAN COBOL C Early language used to solve mathematical/scientific/engineering problems. Early language used for business data processing. Language combining the functionality of a HLL with that of Asssembly, used to write Systems Software.

Term C++ Extensibility Editor Compiler Linker Loader Source File Object File Executable File Definition An enhancement of the C language providing support for Object-Oriented Programming and language Extensibility. The ability of a programmer to extend an existing language with new features. Software tool that allows a programmer to write a program in a HLL. Software tool that translates a program in a HLL into Machine Language. Software tool that combines Object Files into a single Executable. Software tool that copies an Executable into memory and initiates program execution. Text file that contains a program written in a HLL. File that contains instructions in Machine Language, but is not a complete program. File that contains instructions in Machine Language that is a complete program.

Term Syntax Error Compiler Error Link Error Load Error Run-Time Error Logic Error Semantic Error Bug Definition Violation of a HLL rule in a Source File, discovered by the Compiler (same as Syntax Error) Error meaning the Linker is unable to combine Object Files into an Executable Error meaning the Loader is unable to copy an Executable into memory and initiate program execution. Error that occurs while a program is executing, causing the program to halt. Unexpected output/behavior of a program when there is no other type of error. (same as Logic Error) Informal word meaning Logic (or Run-Time) Error