High And Low Level Languages Flashcards
Describe high level languages
One instruction of high level represents many instructions of machine code.
The same code will work for many different machines and processors.
The programmer can easily store data in lots of different structures without knowing about the memory structure.
Code is easy to read, understand and modify.
Must be translated into machine code before a computer is able to understand it.
You don’t have much control over what the CPU actually does so programs will be less memory efficient and slower.
Describe Low level languages
One instruction os assembly code usually only represents one instruction of machine code.
Usually written for one type of machine or processor and won’t work on any others.
The programmer needs to know about the internal structure of the CPU and how it manages the memory.
Code is very difficult to read, understand and modify.
Commands in machine code can be executed directly without the need for a translator.
You control exactly what the CPU does and how it uses memory so programs will be more memory efficient and faster
What is a logical error
An error that arises from an incorrect algorithm design
What is systematic error
An error that arises from incorrect spelling or grammar in the code not consistent with the program language.
What is a truncation error?
Error that arises from executing a finite number of steps to approximate an infinite process
What is a rounding error
Error that occurs due to exact numbers being approximated to a lower number of significant figures
What is a linking error
Error that arises due to connection problems with other code or databases
What is a run time error
Error that arises due to an unexpected event happening when the code is executed , e.g the program running out of memory
What is function
A subroutine that returns a value to the main program
What is a scope
The range in which a variable can be accessed in a program.
What is a global variable
A variable declared outside any subroutines and accessible throughout the program including the subroutines.
What is a local variable
A variable declared within a subroutine which can only be accessed in that subroutine
What is a procedure
A subroutine that does not return a value back to the main program
What is a parameter
Placeholders for values that a procedure or function expects to pass when it is called.
What is lexical analysis
First stage of compilation
Comments and unneeded spaces are removed
Keywords, constants and identifiers are replaced by ‘tokens’
A symbol table is created which holds the addresses of variables and subroutines.