Unit 2.5 Translators and Facilities of Languages – Lesson 1

Slides:



Advertisements
Similar presentations
A Level Business Investment Appraisal Lesson Elements.
Advertisements

Expressions with ‘AVOIR’ + ‘DEPUIS’ Formation Exercises.
Women in Literature An introductory lesson. Equality When we ask the question, Are women equal to men? in what ways are we using the word "equal"? Discuss.
A Level Physics A Delivery Guide Modelling decay of charge Key Concepts.
© OCR 2016 Motion graphs. © OCR 2016 MOTION GRAPHS LESSON ELEMENT.
© OCR 2016 H070 Topic Title H470 Topic Title Urban Futures Learner Resource 4 – Push and Pull Factors.
© OCR 2016 H070 Topic Title H470 Topic Title Rotations.
The purpose of one Christian Aid Agency
Marriage and the wedding ceremony
Learner Activity 2: Boltzmann Distribution Curves Part of the ‘Rates of reaction and the Arrhenius equation’ Topic Exploration Pack.
The Boltzmann Distribution
A Level Business Investment Appraisal Lesson Elements.
Vectors H070 Topic Title H470 Topic Title.
Burglary picture game.
Why don’t programmers have to program in machine code?
H070 Topic Title H470 Topic Title Delivery Guide (Learner Resource)
Balancing Equations Lesson Element.
Delivery Guide Distinctive Landscapes © OCR 2017
Liberals & Conservatives FR.
Unit 2.5 Translators and Facilities of Languages – Lesson 2
H070 Topic Title H470 Topic Title Urban Futures
Glacier National Park, MT
A Level Physics Delivery Guide.
The Maxwell–Boltzmann Distribution
A451 Theory – 7 Programming 7A, B - Algorithms.
Interpreting the past delivery guide Learner resource 3
Watch this video clip taken from Futurama
Unit 2.3 Robust Programs Lesson 2 - Testing Programs
H070 Topic Title H470 Topic Title Urban Futures
Unit 2.3 Robust Programs Lesson 1 - Defensive Design Consideration
Environmental Challenges
Unit 1.4 Wired and Wireless Networks Lesson 2
Unit Network Topologies, protocols and layers Lesson 3
Landscapes of the UK Learner Resource 3 Comparing characteristics.
Teaching Computing to GCSE
Unit 1.4 Wired and Wireless Networks Lesson 1
Unit 1.6 Systems security Lesson 3
Unit Network Topologies, protocols and layers Lesson 2
TRANSLATORS AND IDEs Key Revision Points.
Teaching Computing to GCSE
Translators & Facilities of Languages
Unit Network Topologies, protocols and layers Lesson 1
Theft picture game.
A Level Business Lesson Elements.
Electromagnetic spectrum
Combination of Transformations
Electromagnetic spectrum
Unit 1.6 Systems security Lesson 4
Unit 1.6 Systems security Lesson 2
An introductory lesson
Roots and Shoots Lesson Element.
Unit 1.4 Wired and Wireless Networks Lesson 3
Unit 1.3 Storage Lesson 2: Storing Data
The stack is eroded and weathered creating a stump
What makes these UK landscapes distinctive?
Translators & Types of Languages
Unit 1.1 Systems Architecture Lesson 1
Learner Activity 2: Boltzmann Distribution Curves Part of the ‘Rates of reaction and the Arrhenius equation’ Topic Exploration Pack.
TCP/IP routing simulation
H070 Topic Title H470 Topic Title Urban Futures
Unit 1.3 Storage Lesson 1: Storage Devices
Unit 1.1 System Architecture Lesson 2
Unit 1.3 Storage Lesson 1: Storage Devices
A Level Business Investment Appraisal Lesson Elements.
Who… What… Why… When… Where… How… Could… Should….
Who… What… Why… When… Where… How… Could… Should….
What evidence is there to suggest climate change is a natural process?
1.3.7 High- and low-level languages and their translators
Describing Graphs Describe the overall trend shown on the graph
Unit 1.6 Systems security Lesson 1
Presentation transcript:

Unit 2.5 Translators and Facilities of Languages – Lesson 1

Contextual Video https://www.youtube.com/watch?feature=player_embedded&v=1OukpDfsuXE

Big Picture – Lesson Activity 1 How does code need to be written for a Computer to Understand? How does code need to be written for a programmer to understand?

Learning Objectives To be able to describe the different generations of programming language To be able to describe the differences between Low Level and High Level Languages To evaluate the benefits of programming in both Low and High Level languages To state which translator is needed for each and why

Engagement – Activity 2 Identify the errors in a section of Machine Code that you have been given. What are the issues to the programmer? Imagine if the code was much larger? What are the advantages of programming in the language that you are familiar with?

Key Words Low Level Language High Level Language 1st Generation 2nd Generation 3rd Generation Machine Code Language Translator Assemble Compiler Interpreter Device Driver Debug

Content There are several Generations of Programming Languages Low Level 1st Generation 2nd Generation High Level 3rd Generation 4th Generation

1st Generation Machine Code Directly Executable by the processor The Generation that “computers understand” Difficult to program in, hard to understand, hard to find errors (hard to debug)

2nd Generation Assembly Code Uses mnemonics Easier to program in than 2nd Generation but still difficult. One Assembly Language instruction translates to one Machine Code Instruction (1-1 relationship)

2nd Generation Needs to be translated into Machine Code for the computer to be able to execute it Uses an Assembler Assembler – Assembles Assembly Language

2nd Generation Despite 2nd Generation being difficult to Debug it still has its uses Debug means to go through the code to search for where/why an error has occurred It is most commonly used to program Device Drivers Device Drivers are loaded into memory by the Operating System and used to control the operation of a Hardware Device e.g. Graphics Card Drivers, Printer Drivers.

3rd Generation Easier to understand (programmer) Easier to find errors, easier to de-bug Uses English-Like Keywords One instruction translates into many machine code instructions E.g.’s Java, Basic, Pascal, C+

3rd Generation Translated using: Compiler Interpreter

4th Generation Known as a Declarative Language Facts and Rules are stated Describes what computation should be performed and not how to perform it Examples include: SQL Expert Systems Artificial Intelligence

Activity 3 – Identify the generation Dim Num1, Num2, Tot as Integer Num1 = Console.Readline() Num2 = Console.Readline() Tot = Num1 + Num2 Console.Writelein(“Total is: “ & Tot) High Level (3rd Generation) 01010101010100101010100101010101010011111001000100001010100101 Low Level (2nd Generation) LOAD r1, c LOAD r2, d ADD r1, r2 DIV r1, #2 Low Level (1st Generation – Machine Code)

Activity 3 - Answer Dim Num1, Num2, Tot as Integer Num1 = Console.Readline() Num2 = Console.Readline() Tot = Num1 + Num2 Console.Writelein(“Total is: “ & Tot) High Level (3rd Generation) 01010101010100101010100101010101010011111001000100001010100101 Low Level (2nd Generation) LOAD r1, c LOAD r2, d ADD r1, r2 DIV r1, #2 Low Level (1st Generation – Machine Code)

Activity 4 Produce Graphics organiser to identify the differences between the different Generations of Programming Languages using the following method:

Activity 4 - Answer 1st 2nd 3rd Low Level Machine code: Needs translating into Machine Code 1-1 relationship between Assembly Instruction and Machine Code Machine code: Directly Executable by CPU Doesn’t need a translator 0’s and 1’s Difficult to program in, Hard to understand, Hard to De-Bug Assembler No Translator 1st 2nd High Level Easier for programmer to understand, de-bug and write 1-Many relationship Use’s English like Key words 3rd Compiler / Interpreter

Plenary Programming Parliament Split class into groups Each group is given a generation of programming language (1st, 2nd or 3rd) They have 10 minutes to prepare an argument as to why their generation is best Students then vote on which argument ‘won’ at the end of the debate

OCR Resources: the small print OCR’s resources are provided to support the teaching of OCR specifications, but in no way constitute an endorsed teaching method that is required by the Board, and the decision to use them lies with the individual teacher. Whilst every effort is made to ensure the accuracy of the content, OCR cannot be held responsible for any errors or omissions within these resources. © OCR 2016 - This resource may be freely copied and distributed, as long as the OCR logo and this message remain intact and OCR is acknowledged as the originator of this work. OCR acknowledges the use of the following content: n/a Please get in touch if you want to discuss the accessibility of resources we offer to support delivery of our qualifications: resources.feedback@ocr.org.uk