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.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
Programming Types of Testing.
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
CSC 200 Spring 2006 Instructor: Matt Kayala. What is a “Computer”? We all use them for all kinds of tasks: –Games –Word Processing Good at repetitive.
Introduction to a Programming Environment
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Computer Science 101 Introduction to Programming.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
1 Chapter-01 Introduction to Computers and C++ Programming.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Software – Applications software and programming languages
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Technology in Action Chapter 10 Behind the Scenes: Software Programming Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1 Introduction to Computing and Programming.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
Computer Science 101 Introduction to Programming.
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,
Software – Applications software and programming languages.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
What am I?. Translators Translators – Module Knowledge Areas Types of translators and their use Lexical analysis Syntax analysis Code generation and.
I Power Higher Computing Software Development Development Languages and Environments.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task.
 Programming - the process of creating computer programs.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
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.
Compilers and Interpreters
Introduction to Computer Programming using Fortran 77.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Chapter 1: Introduction to Computers and Programming.
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Software Development Environment
Topic 2: Hardware and Software
Why don’t programmers have to program in machine code?
Component 1.6.
Component 1.6.
GCSE COMPUTER SCIENCE Computers 1.5 Assembly Language.
High or Low Level Programming Language? Justify your decision.
Introduction to programming
Operating System Interface between a user and the computer hardware
Lecture 1 Introduction Richard Gesick.
CSCI-235 Micro-Computer Applications
A451 Theory – 7 Programming 7A, B - Algorithms.
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
Unit 1: Introduction Lesson 1: PArts of a java program
CMP 131 Introduction to Computer Programming
Programming.
ICT Programming Lesson 1:
WJEC GCSE Computer Science
Presentation transcript:

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 languages Make notes on your whiteboard and be ready to share with the class

Programming Languages Topic 7 – Programming Theory Lesson 3

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Introduction CPUs are very impressive but they are actually quite simple when it comes to processing. They can only process 1’s and 0’s. They therefore do not understand how to process programming code in the form in which we write it (e.g. Python). So what has to happen to get our code into a form that the CPU can work with…?

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. From Our Brain to the CPU…

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Difference between high level and low level code… Machine Code (Very Low Level Language) The CPU can only understand one type of code: Machine Code Made up of Coded Instructions and Data e.g. 01001100 (binary) Or B8200 (hexadecimal) Each piece of machine code is stored as a binary number and then decoded and executed by the CPU’s logic circuits. This means that writing programs in ‘Machine Code’ is difficult for a human to do. High Level Language Assembly Language Machine Language (Code) Hardware (CPU)

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Difference between high level and low level code… Assembly Language (Low Level Language) To overcome this issue, assembly language was created. This language has a small set of commands which represent certain pieces of machine code This helped programmers as they didn’t have to remember sets of binary code, instead they learnt commands. EG: Instead of memorising what 1011 or 1001 meant, they just had to remember commands like ADD and SUB These commands are known as Mnemonics (simple memory aids). Assembly language is still quite difficult to learn and use and this is why High Level Languages were produced. (Due to less code, assembly language can be processed by the CPU far more quickly than high level languages) High Level Language Assembly Language Machine Language (Code) Hardware (CPU)

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Difference between high level and low level code… High Level Languages (Python, Java, C++ etc) High level code (aka ‘source code’) is far more easy to write and therefore for humans to understand. Its purpose is to be easier to write AND STILL be easily translated into machine code so that it can be processed by the CPU. To help it be translated, it makes use of: KEY WORDS and SYNTAX (rules for the keywords and arguments that go with them) Using keywords as opposed to any old English means that translations can happen – reserved words such as PRINT are known to translators where as ‘put on screen’ is not etc. High Level Language Assembly Language Machine Language (Code) Hardware (CPU)

Programming Languages - WBs Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. From Our Brain to the CPU…

Task – 10 mins Open the worksheet titled: “From Idea to CPU” Draw a diagram to show how a software problem journeys from idea, to algorithm, to high level code, to machine code, to CPU. Next to each stage of the journey, explain the stage in as much detail as possible.

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Introducing Translators So how does our ‘HUMAN WRITTEN CODE’ get turned into Machine Code? Translators! High Level Language Assembly Language Machine Language (Code) Hardware (CPU) ?

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Translators Translators are programs that convert high level language commands: print, IF, For etc. …into a set of machine code commands: 1011, 11001, 11000011110 etc …so that the CPU can process the data! There are 2 ways in which translators work: Take the whole code and convert it into machine code before running it (known as compiling). Take the code one instruction at a time, translate and run the instruction, before translating the next instruction (known as interpreting).

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Types of Translator There are 3 types of translator: Compiler Interpreter Assembler Converts the whole code into one file (often a .exe file). The file can then be run on any computer without the translator needing to be present. Can take a long time to compile source code as the translator will often have to convert the instructions into various sets of machine code as different CPUs will understand instructions with different machine code from one another. Converts the source code into machine code 1 line at a time. Program therefore runs very slowly. Main reason why an interpreter is used is at the testing / development stage. Programmers can quickly identify errors and fix them. The translator must be present on the computer for the program is to be run This type of translator is used for Assembly Language (not High Level Languages). It converts mnemonic assembly language instructions into machine code. Translators Compilers Interpreters Assemblers

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Integrated Development Environment (IDE) An Integrated Development Environment (IDE) is a software package. It provides the tools for a computer programmer to develop a software. It allows programmers to write their high level code, test it and translate it.

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Integrated Development Environment (IDE) IDEs will be specific to a certain high level language (eg: PyScripter is built for Python). They will normally consist of: Source Code Editor – allowing the writing and editing of code Interpreter – allows source code to be translated into machine code one line at a time for testing Automation Tools – automate tasks such as finishing off key words and indenting on your behalf Debugger – identifies logic and syntax errors and shows where they are. Compiler – converts entire source code into machine code so it can be run as its own individual program file. Auto-Documentation – stores lists of variables, modules, functions calls etc which are documented for other programmers. PyScripter is an IDE and is specific to Python

“Exam Questions Practice” Task – 10 mins Open the worksheet titled: “Exam Questions Practice” Complete the exam questions. Remember to do the following: Answer the question written (not any old information about the topic) Look at the key words and answer accordingly Look at the marks available and answer accordingly

Programming Languages Learning Objectives: (c) explain the difference between high level code and machine code (d) explain the need for translators to convert high level code to machine code (e) describe the characteristics of an assembler, a compiler and an interpreter (f) describe common tools and facilities available in an integrated development environment (IDE): editors, error diagnostics, run-time environment, translators, auto-documentation. Plenary CPUs are very impressive but they are actually quite simple when it comes to processing. They can only process 1’s and 0’s. They therefore do not understand how to process programming code in the form in which we write it (e.g. Python). So what has to happen to get our code into a form that the CPU can work with…?