High Level Languages and Machine Code - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

High Level Languages and Machine Code

Description:

1. Which type of language (high or low level) is easier to understand? 2. Which type would be easier to ... Compile program runs faster since it is machine code ... – PowerPoint PPT presentation

Number of Views:140
Avg rating:3.0/5.0
Slides: 17
Provided by: Whitti3
Category:

less

Transcript and Presenter's Notes

Title: High Level Languages and Machine Code


1
High Level Languages and Machine Code
  • Intermediate 2
  • Unit 2 Software Development

2
Computer Languages
  • Program 1
  • PRINT HELLO
  • PRINT PLEASE TELL ME YOUR NAME
  • INPUT YOUR NAME

Program 2 10101001 00000001 10000101
01110000 10100101 01110000
High level language
Machine Code
3
Low Level Languages
  • Give the computer instructions in Binary Code
  • Ie 1s and 0s
  • Binary code is also known as machine codes

4
High Level Languages
  • Use commands and instructions based on English
    words and phrases
  • Easier to understand than machine codes
  • Easier to spot mistakes and correct errors

5
Common features
  • Commands and instructions look like English
  • Easily edited
  • Common internal structures
  • Eg IF statements, Case statements
  • Designed for use in specific areas
  • Eg FORTRAN science and engineering
  • COBOL commercial data processing
  • Built in error checking
  • Must be translated into machine code before
    computer will recognise instructions or commands

6
Portability
  • High level languages are not processor specific
  • This means that programs written on them should
    run easily on different types of computer systems
  • This makes programs more portable

7
Class Activity
  • Use the Internet to help you make a list of 6
  • or so programming languages. For each
  • one,write down where it gets its name from,
  • and what it is used for.

8
Class Activity
  • Answer the following questions in your jotter
  • 1. Which type of language (high or low level) is
    easier to understand?
  • 2. Which type would be easier to correct if it
    had a mistake in it?
  • 3. Name two low level languages.
  • 4. Name two high level languages.
  • 5. Explain the main differences between high and
    low level
  • languages.
  • 6. List two advantages of high level languages.

9
High Level Language to Machine Code

High Level Language
Machine Code
Translator Program
Interpreter
Compiler
10
Interpreter
Print Hello
1000 1101
Print What is your name?
1110 0011
Input your name
1000 1101
11
Interpreter
  • Takes one line of program at a time
  • Converts it to machine code
  • Advantage
  • Good for learners to use
  • Good for developers to use
  • Why? Debugging is easier!
  • Disadvantage
  • Program runs slower because
  • Program must be translated each time it is run
  • Translator must be resident in memory when
    program is run

12
Compiler
PRINT HELLO PRINT PLEASE TELL ME YOUR
NAME INPUT YOUR NAME
1000 1101 1110 0011 1000 1101
13
Compiler
  • Translates complete program to machine code
  • Translated code is called object code
  • Original program is called source code

14
CompilerAdvantages and Disadvantages
  • Advantages
  • Final program only translated once
  • Compile program runs faster since it is machine
    code
  • Compiled program can be loaded and run on
    computer which don't have complier
  • Disadvantages
  • Errors can only be detected when program is
    compiled-extends development time
  • Any changes to the program require new object
    code to be created

15
Class Exercise
  • Complete Computer Languages quiz found in the
    following area
  • Student Area\S3\Intermediate 2\Software
    Development
  • Once finished the above exercise answer the
    questions in Exercise 7

16
Class Activity
  • Log on to Webcal Software Development found in
    the
  • following directory path Student
    Area\S3\Intermediate2
  • Go to the following link
  • Software Development Languages Environments
  • Then
  • Software Development Environment's Facilities
  • Scroll to the bottom of the page
  • Read both sections on Compilers and Interpreters
    and then do
  • Exercise on Environment's Facilities Questions 3
    8 -14
Write a Comment
User Comments (0)
About PowerShow.com