Ch. 1 — Data Representation
1.1 Number Systems 1.2 Text, Sound & Images 1.3 Data Storage & Compression
Ch. 2 — Data Transmission
2.1 Data Transmission 2.2 Error Checking 2.3 Encryption
Ch. 3 — Hardware
3.1 Computer Architecture 3.2 Input & Output Devices 3.3 Data Storage 3.4 Network Hardware
Ch. 4 — Software
4.1 Types of Software & Interrupts 4.2 Programming Languages & IDE
Ch. 5 — The Internet
5.1 Internet & World Wide Web 5.2 Digital Currency 5.3 Cyber Security
Ch. 6 — Emerging Tech
6.1 Automated Systems 6.2 Robotics 6.3 Artificial Intelligence
// All Chapters
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Home/ Paper 1/ 4.2 Types of Programming Language, Translators and IDE
4.2

4.2 Types of Programming Language, Translators and IDE

High-level and low-level languages, compilers, interpreters and IDEs.

High Level Programming Language

  • Closer to human language // closer to English
  • Independent of a particular type of computer/device/platform // portable language
  • A language such as Python, Java, Pascal, etc.

Advantages of High Level Programming Language

  • Easier/faster to write code as uses English-like statements
  • Easier to modify as uses English-like statements
  • Easier to debug as uses English-like statements
  • Portable language code

Low Level Programming Language

  • Close to the language processed by computers
  • May use mnemonics
  • Low level languages relate to the specific architecture and hardware of a computer
  • Can be machine code (binary), requires no translation
  • Can be assembly language, requires translation using an assembler

Advantages of Low Level Programming Language

  • Can be executed faster
  • No requirement for the program to be portable
  • Program will be more memory efficient
  • No requirement for a compiler/interpreter
  • Can use specialised hardware

Why a compiler or an interpreter is needed when running a high-level program

  • Code is required to be converted into machine code/binary
  • Code needs to be produced that can be understood by the computer

Compiler

  • Translates high-level language to low level language
  • It translates all code before it is executed
  • A list of errors in the code is created
  • It creates an executable

Describe how a Compiler reports errors

  • It creates an error report after trying to compile
  • …displaying all errors in the code
  • …that require correction before execution can take place

Compiler Advantages/Disadvantages

  • Executable files can easily be produced and distributed to users.
  • Once the executable file is produced, users do not need the compiler software.
  • Users cannot change or illegally use the original source code.
  • Faster execution of program
  • The final object file is only produced when all errors in the source code have been located and fixed.
  • Uses a lot of resources. During the compilation process, memory contains the compiler software, source code, object code, memory for working storage.
  • Difficult to find errors so the procedure is time consuming with several runs of the compiler before all the errors are located.

Interpreter

  • Translates a program one line of code at a time
  • Machine code is directly executed // The interpreter is used each time the program/code is executed
  • Will identify an error as soon as it finds one in a line of code
  • Interpreters are commonly used for testing a program

Interpreter Advantages/Disadvantages

  • Produces error messages as each instruction is translated so debugging is easier and faster.
  • An interpreter halts (stops) when it encounters a syntax error. So errors can be corrected in real time.
  • The programmer can attempt to run and test the program at any time including before all the code has been written.
  • The effect of any change made to the code can be seen immediately.
  • Execution is slower than compilers because no executable files are produced. Every time the program is executed it has to be first translated.
  • The interpreter software has to be present in memory every time an attempt is made to run the program.
  • No executable file produced: so all users must have the interpreter software available and the code is not protected therefore other programmers could make unwanted changes.

Assembler

  • Translates a low level language into machine code
  • An executable file of machine code is produced
  • One low-level language statement is usually translated into one machine code instruction
  • Assembled programs can be used without the assembler
  • An assembled program is usually distributed for general use

IDE (Integrated Development Environment)

What is an IDE?

  • Used by programmers to aid in the writing, editing and development of programs.
  • Provides a code editor
  • Provides translation for code with an Interpreter/Compiler
  • Allows testing program code / observe outputs

Features of an IDE:

  • Code editor
  • Run-time environment
  • Translators
  • Error diagnostics
  • Autocompletion
  • Auto-correction
  • Pretty-print