A451 Theory – 7 Programming 7A, B - Algorithms.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

compilers and interpreters
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Program Flow Charting How to tackle the beginning stage a program design.
Compilers and Interpreters. Translation to machine language Every high level language needs to be translated to machine code There are different ways.
Systems Software Operating Systems.
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.
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.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
1 Software Development Topic 2 Software Development Languages and Environments.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
I Power Higher Computing Software Development Development Languages and Environments.
Computing System Fundamentals 3.1 Language Translators.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
1 3. Computing System Fundamentals 3.1 Language Translators.
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.
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.
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.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Programming Language Basics. What is a Programming Language? “A computer, human-created language used to write instructions for a computer.” “An artificial.
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
Computer Systems Nat 5 Computing Science
Software Development Environment
Topic 2: Hardware and Software
Installing Java on a Home machine
Why don’t programmers have to program in machine code?
Lecture 1b- Introduction
Component 1.6.
Component 1.6.
GCSE COMPUTER SCIENCE Computers 1.5 Assembly Language.
14 Compilers, Interpreters and Debuggers
A451 Theory – 7 Programming 7A, B - Algorithms.
High or Low Level Programming Language? Justify your decision.
Topic: Programming Languages and their Evolution + Intro to Scratch
High and low level languages
Component 1.6.
Introduction to programming
Unit 2.5 Translators and Facilities of Languages – Lesson 2
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Lecture 1 Introduction Richard Gesick.
CSCI-235 Micro-Computer Applications
7 - Programming 7P, Q, R - Testing.
Microprocessor and Assembly Language
Programming, Data & Testing
Teaching Computing to GCSE
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
Teaching Computing to GCSE
Translators & Facilities of Languages
Installing Java on a Home machine
Lesson Objectives Aims Key Words Compiler, interpreter, assembler
Topics Introduction Hardware and Software How Computers Store Data
CMP 131 Introduction to Computer Programming
Programming.
Programming Languages
Programming Language Basics
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
ICT Programming Lesson 1:
Introduction to programming
1.3.7 High- and low-level languages and their translators
Programming language translators
Presentation transcript:

A451 Theory – 7 Programming 7A, B - Algorithms

Learning Intentions To develop an understanding of how algorithms are used to represent computer systems and programs

Assessment Outcomes 7C - Explain the difference between high level code and machine code 7D - Explain the need for translators to convert high level code to machine code 7E - Describe the characteristics of an assembler, a compiler and an interpreter 7F - Describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, and auto-documentation.

7C - Explain the difference between high level code and machine code The processor uses something called Machine Code to perform a task. Machine Code is usually represented as Binary – this is the 1st generation of coding language. Binary Code is often difficult for a human to understand so the code is given mnemonics – short words that represent a function – for example ‘Add’, ‘Store’, or ‘Load’. – This is the 2nd generation of coding language. Humans however prefer to code in languages that are closer to English – we call these ‘High Level’ languages and these are the 3rd generation of coding language.

7C High and Low Level Code Machine Code   High Level Languages Processor specific: one language per processor Portable: will work on different types of architecture, won’t work on another machine machine/processor Designed with hardware in mind Designed with a type of problem in mind One assembly language command will be translated One high level program instruction will be translated into one binary instruction in machine code into several machine code instructions Translated using an assembler Translated using a compiler or interpreter

7D – Translating High Level code into Low LEvel Whatever language a program is written in, it must be translated into machine code so it can run on the processor. Translators are a type of system software. There are 3 types of translator: Assemblers Compilers Interpreters High Level Code Assembly Code Machine Code Compiler or Interpreter Assembler

7E – Translating High Level Code into Low Level Compiler Interpreter   Translates the whole program to produce the Translates and executes one line at a time. executable object code. The object code is the version that the computer The source code is the version that the computer runs. Faster run time because the program is translated Slower run time because the program is translated once, object code is run after that. every time it is run. Customers cannot see the actual code you wrote If you distributed source code with an interpreter when you distribute the program. then customers would have your actual code. Used for distributed software. Used in development. A compiler translates a high level programming language into machine code – it compiles every line of code at the same time. An Interpreter translates a high level programming language into machine code – it translates each line of code separately. This helps programmers to debug their program and see which parts work and which do not!

7E Interpreters and compilers Good for developing programs as you can execute parts of the program Have to correct all the syntax errors before you can run the program Slower execution as every line is translated before it is executed Fast execution of object code A user has to have the programming language and interpreter on their computer Once the object code is produced, it can be installed and run on any computer A user who has purchased your program can make changes and sell it on A user who has purchased your program cannot see the source code

7E - Assemblers The translator that converts assembly language programs into machine code.

7F – IDE Tools IDEs are software packages that help programmers to write code more easily. IDEs provide programmers with lots of handy tools when they are coding. While not all IDEs are exactly the same they all have similar basic tools. IDEs provide several tools that help programmers to write code easier: Colour (Syntax) Highlighting Debugging Tools Translators Auto-Indentation

7F – IDE Tools Colour (Syntax) Highlighting Debugging Tools These highlight or change the colour of code as it is typed. This makes it easier for the programmer to see if their command words, data types, and programming structures have been written correctly. Debugging Tools These may show the programmer why a piece of code isn’t running – they may show the programmer the area of code that is affected Translators These translate the code line by line so that the programmer can test their code throughout development. Auto-Indentation Sometimes the IDE will put in indents inside programming structures – for example if statements or for loops in python

Crib – Fundamental topics Explain the 3 generations of code Explain why humans use high level code Identify the difference between Assemblers, and Compilers/Interpreters Explain the difference between Compilers and Interpreters Explain 4 different IDE tools that make it easier to program and how they make it easier.

Exam Questions I have ripped off every exam question for Unit 1 – Fundamentals of Computing.. Answer all of the questions in the A, B, C folder. Self Assess them all. Get me to check them!