High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Chapter 1 An Overview of Computers and Programming Languages.
Lecture 1: Overview of Computers & Programming
Systems Software.
Compiler Construction by Muhammad Bilal Zafar (AP)
Programming Types of Testing.
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
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.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
CHAPTER 1: INTORDUCTION TO C LANGUAGE
Types of software. Sonam Dema..
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Programming Languages Lecture 12. What is Programming?  The process of telling the computer what to do  Also known as coding.
1 Chapter-01 Introduction to Computers and C++ Programming.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
Programming Languages: Telling the Computers What to Do Chapter 16.
Computer Programming I Hour 1-Getting Started. Word of Day —Chinese proverb A journey of a thousand miles is started by taking the first step. —Aristophanes.
Introduction to Programming Language CS105 Programming Language First-generation: Machine language Second-generation: Assembly language Third-generation:
Software – Applications software and programming languages
High-level Languages.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
CS101 Introduction to Computing Lecture Programming Languages.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Software – Applications software and programming languages.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Algorithms & Flowchart
Programming language. Definition Programming language is a formal language designed to communicate instructions to a computer. Programming languages can.
PROGRAMMING LANGUAGES
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
Overview of Previous Lesson(s) Over View  A program must be translated into a form in which it can be executed by a computer.  The software systems.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
CS-303 Introduction to Programming
 Programming - the process of creating computer programs.
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
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.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Software Engineering Algorithms, Compilers, & Lifecycle.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Evolution and History of Programming Languages
Component 1.6.
Chapter 1 Introduction.
CSCI-235 Micro-Computer Applications
Computer Programming.
Microprocessor and Assembly Language
CS101 Introduction to Computing Lecture 19 Programming Languages
Chapter 1 Introduction.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
CS105 Introduction to Computer Concepts Intro to programming
CMP 131 Introduction to Computer Programming
Programming.
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
ICT Programming Lesson 1:
1.3.7 High- and low-level languages and their translators
CS105 Introduction to Computer Concepts Intro to programming
Presentation transcript:

High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level languages. Higher level languages are also easier to read and can typically sometimes work on many different computer operating systems. Some examples of higher level languages are Java, Visual Basic, COBOL, BASIC, C++, and Pascal to name only a few. Lower level languages are typically assembly languages that are machine specific.

Typically, in low level languages, you write 1 instruction, and it generates 1 machine instruction. low level languages are typically assembly language High level languages, you write 1 instruction, and it generates a series of machine instructions. In a high level language, you think about the problem, and write instructions to solve it. In a low level language, you think of the problem, and you have to write the instructions to have the computer solve your problem.

In general, it requires more skill to be able to do the same problem in a low level language than in a high level language. AND, if there is a problem with a program, it's usually far more easy to fix a high level language program than a low level language program. A processor operates using binary codes, which are difficult for programmers to use in programming. Therefore, a low level language, such as assembly, is one where the text instructions are essentially translated 1:1 into binary.

In a high level language, like C or Pascal, each instruction represents several assembly instructions and must be translated into assembly and the assembly then is translated into binary.

COMPILER A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.

CS 540 Spring 2009 GMU6 What is a compiler? A program that reads a program written in one language and translates it into another language. Source language Target language Traditionally, compilers go from high-level languages to low-level languages.

Fall 2009“Advanced Compiler Techniques” What is a Compiler? A program that translates a program in one language to another language – The essential interface between applications & architectures Typically lowers the level of abstraction – analyzes and reasons about the program & architecture We expect the program to be optimized, i.e., better than the original – ideally exploiting architectural strengths and hiding weaknesses

Interpreter An interpreter is program that translates the higher level language code into equivalent machine level code and the execution is done line by line. An interpreter translates high-level instructions into an intermediate form, which it then executes. IN Contrast a compiler translates high level instructions directly into machine language. Compiled program generally run fast than interpreted programs.

The advantage of interpreter is that it does not need to go through the compilation stage during which machine instruction genrates.

Fall 2009“Advanced Compiler Techniques” Compiler vs. Interpreter Compilers: Translate a source (human-writable) program to an executable (machine-readable) program Interpreters: Convert a source program and execute it at the same time.

Fall 2009“Advanced Compiler Techniques” Compiler vs. Interpreter (2/5) Ideal concept: Compiler Executable Source codeExecutable Input dataOutput data Interpreter Source code Input data Output data

Fall 2009“Advanced Compiler Techniques” Compiler vs. Interpreter (3/5) Most languages are usually thought of as using either one or the other: – Compilers: FORTRAN, COBOL, C, C++, Pascal, PL/1 – Interpreters: Lisp, scheme, BASIC, APL, Perl, Python, Smalltalk BUT: not always implemented this way – Virtual Machines (e.g., Java) – Linking of executables at runtime – JIT (Just-in-time) compiling

Fall 2009“Advanced Compiler Techniques” Compiler vs. Interpreter (4/5) Actually, no sharp boundary between them. General situation is a combo: Translator Virtual machine Source code Intermed. code Input Data Output

Fall 2009“Advanced Compiler Techniques” Compiler vs. Interpreter (5/5) Compiler Pros – Less space – Fast execution Cons – Slow processing Partly Solved (Separate compilation) – Debugging Improved thru IDEs Interpreter Pros – Easy debugging – Fast Development Cons – Not for large projects Exceptions: Perl, Python – Requires more space – Slower execution Interpreter in memory all the time

Assembler An assembler is a program that translates symbolic code (assembly language) into executable object code.

16 Language Levels High Level Language Assembler Language Machine Language Micro - programming Hardware „Firmware“ Normally deepest free accessible Level

Chap 2 Role of Assembler Source Program Assembler Object Code Loader Executable Code Linker

Characteristics of good Algorithm An algorithm is written in simple English and is not a formal document. An algorithm must: - be lucid, precise and unambiguous - give the correct solution in all cases - eventually end 1) Finiteness: - an algorithm terminates after a finite numbers of steps. 2) Definiteness: - each step in algorithm is unambiguous. This means that the action specified by the step cannot be interpreted (explain the meaning of) in multiple ways & can be performed without any confusion. 3) Input:- an algorithm accepts zero or more inputs 4) Output:- it produces at least one output. 5) Effectiveness:- it consists of basic instructions that are realizable. This means that the instructions can be performed by using the given inputs in a finite amount of time.