Language Systems Flashcards
What types are there
Machine Language Binary coded instructions Also called object code or machine code Assembly Language Symbolic coded instructions Also called mnemonic codes High-level Programming Languages Structured English-like procedural statements with some Mathematical notation Script and Markup Languages More recent, influenced by the Web
Assembler
An assembler convert an assembly language program into its machine code equivalent
It translates mnemonic codes to their machine code equivalents
I.e. ADD 200, 216, 220 00010000 0001100…
The assembler also assigns machine addresses (i.e. memory locations) to symbolic labels
Compiler
A program that changes high-level language source code to object code that can be executed by the CPU
Compilers do more than just produce object code:
Checks syntax of program
Checks semantics of program
Generates code for target CPU
Primary reason for compiling source code is to create an executable program
Examples of compiler based language:
C, C++, Java
Interpreter
An interpreter executes source code instructions written in a high-level programming language but does not produces an executable file
Interpreter:
Checks syntax of program
Takes one instruction at a time and convert it into machine language which is executed before moving on to the next instruction
Examples of interpreter based language:
PHP, JavaScript, BASIC
Compiler vs Interpreter
Compiled languages (C, C++) produce executable files that are efficient (i.e. run faster)
Hence their use in computer games
Interpreted languages (Basic, JavaScript, PHP) and hybrids (Java) are notably slower
Interpreted languages and hybrids (Java) are simpler in terms of program development
They tell you where the error is
E.g. Eclipse/Java reports the line were the error occurred
Java
Hybrid approach – compiled then interpreted
Introduced in 1996 and swept the computing community by storm
Portability was of primary importance
Java is compiled into a standard machine language called Bytecode
A software interpreter called the JVM (Java Virtual Machine) takes the Bytecode program and executes it
C++
A compiled language with a complex compiler
Powerful object-oriented language based on the popular C programming language
Originally called “C with classes”
Widely used in 1990s (until Java came along)
Efficient and complex and suited to many programming applications
Particularly suited to low level and systems programming
Operating systems like windows are written in C++ and C