CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Systems Software.
PROGRAMMING Introduction To Programming Definition Types Of Programming Languages Programming Language Paradigm Translator
2 We need programming languages to communicate with a computer. The two broad classifications of programming languages are: Low-level and High- level.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Software Development CS 1 Rick Graziani Spring 2007.
1 CHAPTER 4 LANGUAGE/SOFTWARE Hardware Hardware is the machine itself and its various individual equipment. It includes all mechanical, electronic.
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
Introduction to Programming End Show. Resource Team R.P Ranjan-Lecturer, SPICTEC, Galle. W.M.A.S. Wijesekara-Centre manager,CRC Hali-Ela H.P.U.S Indra.
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to Computer Programming itc-314
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Slide 1 Standard Grade Computing Studies Systems Software.
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Evolution and History of Programming Languages 1.
PROGRAMMING LANGUAGES
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
CS-303 Introduction to Programming
Compilers and Interpreters. HARDWARE Machine LanguageAssembly Language High Level Language C++ Visual Basic JAVA Humans.
Introduction to Language Programming Hierarchy of programming lang. Based on machine independences: 1. Machine language 2. Assembly language 3. Higher.
Machine Machine language is PL in which program instructions are written in strings of 0s and 1s.The computer circuitry is wired in a manner that it can.
Introduction to Computer Programming itc-314 Lecture 04.
The Functions and Purposes of Translators Translators, Interpreters and Compilers - High Level Languages.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Compilers and Interpreters
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
The Functions and Purposes of Translators Translators, Interpreters and Compilers - High Level Languages.
CSC141 Introduction to Computer Programming Programming Language.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Programming Languages
Software Engineering Algorithms, Compilers, & Lifecycle.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
A LECTURE NOTE. Introduction to Programming languages.
Computer Language
Evolution and History of Programming Languages
Topic 2: Hardware and Software
Component 1.6.
Programming Languages
High and low level languages
Programming Languages
Introduction to programming
Operating System Interface between a user and the computer hardware
PROGRAMMING LANGUAGES
Programming Language Hierarchy, Phases of a Java Program
CSCI-235 Micro-Computer Applications
Computer Programming.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Teaching Computing to GCSE
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
Teaching Computing to GCSE
Translators & Facilities of Languages
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
High Level Programming Languages
Programming.
Programming Language Basics
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
1.3.7 High- and low-level languages and their translators
Presentation transcript:

CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared by Yang Song and Suresh Solaimuthu)

Programming Language How can we ask others to do something? Then how can we deal with computers? A system of communication bridge human and the machine, so that it can pass our data and instruction to the machine for some specific job. Thousands of different programming languages have been created, every year there’ll be new one come out.

Major Types Low level programming languages Machine Language Assembly Language High level programming languages

Low Level Languages That means the closeness to the way in which the machine has been built. They are machine oriented and require extensive knowledge of computer hardware and its configuration. Little or no natural language 1 st generation: Machine Language 2 nd generation: Assembly Language

Machine Language It is a system of instructions and data directly executed by computer’s CPU, it’s written as strings of 1s and 0s: … … Advantage: Fast! Disadvantage: Programmer has to know all the details of hardware Programmer has to remember lots of codes that results in program errors It’s very hard to debug the program

Assembly Language Came out in 1950s, it implements a symbolic representation of the numeric machine codes. This representation is defined by hardware manufacturer and is based on abbreviations First step to improve the programming structures Computer can handle numbers and letter e.g. : mov al, #061h means to move hexadecimal 61 (97) to the register al

Translate into Machine Code Assembly language is not machine readable language “Translator” is needed to convert one language to another language: Assembler

Assembly Language Advantage: Symbolic programming is easier to understand and can save time for programmers. It’s easier to correct errors and modify programs. Same efficiency of execution as the machine language, because it’s one-to-one translation. Disadvantage: A major one: It is machine dependent, computer’s hardware configuration means everything.

High Level Language Assembly language and machine level language require deep knowledge of computer hardware What do we expect? Instructions in English words and logic of the problem irrespective of the type of computer being used Using simple languages that use English and mathematical symbols (+, -, *, /….) for its program construction

Some C++ code example ……………………. int a=3, b=4, c; string out; c = a – b; if (c < 0) out = “a is less than b”; else if (c == 0) out = “a is equal to b”; else out = “a is greater than b”; cout << out; …………………….

Problem Oriented High level languages are problem oriented languages Instructions can be written that are suitable for solving a particular problem to make it more like the language of the problem itself Fortran – FORmula TRANslator COBOL – COmmon Business Oriented Language BASIC – Beginners All-purpose Symbolic Instruction Code Perl – scripting language

How Can Computer Understand High Level Language? In Assembly language we have “translator” named Assembler to convert Assembly language into machine code We have two different types of “translator” for high level language: Compiler Interpreter

Compiler Translates the high level language to machine language or assembly language Scans the ENTIRE program first and then translates it into machine code Syntax/Semantic check, optimize Source Program: written by the programmer in high level language Object Program: the program is converted to machine language

Compiler It can translate only those source programs, which have been written, in that language for which the compiler is meant for C++ compiler doesn’t work for PASCAL Object program from compiler is machine dependent: programs compiler for one type of machine won’t work on another type Every type of machine needs to have its particular compiler for a particular language Machine independence?

Interpreter Translates the high level language to machine language or assembly language Takes one statement of higher level languages, translates it into machine language and immediately execute it Translation and execution are carried out for each statement

Compiler V.S. Interpreter Both translate high level languages into low level languages Entire program V.S. Statement by statement Which one has the fast response to the changes in source program? Which one eliminates the need for a separate compilation after changes to each program? Which one is easier to write and don’t require large memory in computer? Which one is more efficient eventually ?

Advantage and Disadvantage of High Level Language Advantages Easy to learn and use Possible to make machine-independent Disadvantages Slower than low level languages May we make some hybrid version? The famous C