1.3.7 High- and low-level languages and their translators

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

GCSE Computing Lesson 5.
compilers and interpreters
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
The Binary Machine Modern high-level programming languages are designed to make programming easier. On the other end, the low level, all modern digital.
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.
Computer Systems Nat 4/5 Computing Science Translator Programs.
Compiled by Benjamin Muganzi 3.2 Functions and Purposes of Translators Computing 9691 Paper 3 1.
Systems Software Operating Systems.
1 Chapter-01 Introduction to Computers and C++ Programming.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
There are different types of translator. An Interpreter Interpreters translate one instruction at a time from a high level language into machine code every.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Standard Grade Computing SYSTEM SOFTWARE CHAPTER 19.
Slide 1 Standard Grade Computing Studies Systems Software.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
PROGRAMMING LANGUAGES
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
Compilers and Interpreters. HARDWARE Machine LanguageAssembly Language High Level Language C++ Visual Basic JAVA Humans.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
The Functions and Purposes of Translators Translators, Interpreters and Compilers - High Level Languages.
Compilers and Interpreters
The Functions and Purposes of Translators Translators, Interpreters and Compilers - High Level Languages.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
Programming Languages
Software Engineering Algorithms, Compilers, & Lifecycle.
Machine Language Computer languages cannot be directly interpreted by the computer – they are not in binary. All commands need to be translated into binary.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
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.
Evolution and History of Programming Languages
1-1 The Python IDE.
Computer Basics.
Computer Systems Nat 5 Computing Science
Computer Applications in Business
Why don’t programmers have to program in machine code?
Lecture 1b- Introduction
Development Environment
Component 1.6.
GCSE COMPUTER SCIENCE Computers 1.5 Assembly Language.
High or Low Level Programming Language? Justify your decision.
Topic: Programming Languages and their Evolution + Intro to Scratch
Unit 2.5 Translators and Facilities of Languages – Lesson 1
High and low level languages
Introduction to programming
CSCI-235 Micro-Computer Applications
Computer Systems Nat 5 Computing Science
A451 Theory – 7 Programming 7A, B - Algorithms.
Application Development Theory
Teaching Computing to GCSE
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
Teaching Computing to GCSE
Translators & Facilities of Languages
Translators & Types of Languages
CS105 Introduction to Computer Concepts Intro to programming
Programming.
There are different types of translator.
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Nat 4/5 Computing Science Translator Programs
Tonga Institute of Higher Education IT 141: Information Systems
Programming language translators
CS105 Introduction to Computer Concepts Intro to programming
Algoritmos y Programacion
Running & Testing Programs :: Translators
Presentation transcript:

1.3.7 High- and low-level languages and their translators show understanding of the need for both high-level and low-level languages show understanding of the need for compilers when translating programs written in a high-level language show understanding of the use of interpreters with high-level language programs show understanding of the need for assemblers when translating programs written in assembly language

Low Level Languages Assembly: To make it easier to program computers a programming language was invented. It was called ‘Assembly‘ and was made up of a small set of command words called mnemonics which programmers typed instead of binary Examples of mnemonics are “MOV”, “ADD” and “PUSH” Computers could not understand Assembly so it had to be converted to machine code by an ‘assembler‘ before it could be run Low-level languages are more similar to machine code than they are to languages spoken by humans They are not very developed and just offer quicker ways to write binary This means they give the programmer close control over the computer because their instructions are very specific Unfortunately they are hard to learn Since the machine code for each computer is different, programs translated to machine code on one computer will not work on a different one: Low level languages are not very ‘portable’

High-level languages High level programming languages are more developed than low-level languages so are closer to human spoken language Some examples of high level languages are: C#, Visual Basic, C, C++, JavaScript, Python, BASIC and Pascal. High-level programming languages are easier for humans to write, read and maintain They support a wide range of data types They allow the programmer to think about how to solve the problem and not how to communicate with the computer. This is called abstraction

What do you think Python is?

Converting to Machine Code Translators: Just like low-level languages, high-level languages must be converted to machine code before a computer can understand and run them This is done using a ‘translator‘ Different translators convert the same high level code into machine code for different computers High level code ready to be translated into machine code is called ‘source code’ There are two different types of translator: Compilers and Interpreters

Compilers: Compilers convert (or ‘compile’) the source code to machine code all at once This is then stored as an executable file which the computer can run (for example, something ending with the ‘.exe’ file extension) Errors in the source code can be spotted as the program is compiling and reported to the programmer Does this remind you of anything?

Compilers Advantages Fast code is produced Source code remains hidden so cannot be modified by customer Compiled once only so doesn’t need a translator Disadvantages Compilers use a lot of computer resources: It has to be loaded in the computer’s memory at the same time as the source code and there has to be sufficient memory to hold the object code Difficult to pin-point errors its source in the original program.

Interpreters: Interpreters convert the code as it is running They take a line of source code at a time and convert it to machine code (which the computer runs straight away) This is repeated until the end of the program No executable file is created If the interpreter comes across an error in the source code the only things it can do is to report the error to the person trying to use the program (or it may just refuse to continue running) In short: Interpreters Translates each instruction is taken in turn and translated to machine code. The instruction is then executed before the next instruction is translated. Does this remind you of anything?

Interpreters: Advantages Error messages are output as soon as an error is encountered so easy to debug Useful for prototypes as program will run even when part of it has errors. Disadvantages Execution of a program is slow compared to that of a compiled program. Instructions inside a loop have to be translated each time the loop is entered.

Little test: Hello Video 1