2.5 Programming Languages and IDE's Flashcards
(12 cards)
What is machine code?
An instruction that can run inside a CPU is called machine code and is in binary
What are high level languages?
High-level programming languages use code written in a way that is similar to a natural human language, such as English, making it easier to understand and use the language
What are low level languages?
Low-level languages do not closely resemble a natural human language, making it harder for humans to understand and write in.
Pros of high level languages?
Using high-level languages leads to fewer errors and allows for more powerful and complex commands compared to low-level languages.
Cons of high level languages?
A high-level language must be translated into machine code (binary) before it can be run, as high-level languages cannot be executed directly by the CPU.
Pros of low level languages?
Low-level languages are used when a program must be executed quickly or when programmers need to write code that interacts directly with the hardware, such as device drivers.
What is a translator?
A translator changes (translates) a program written in one language into another language (usually machine code) to be executed by the CPU
Decribe what interpreters do?
- Translates source code into machine code one line at a time
- Slower than a compiler because the code must be reinterpreted each time the program is run
- Interpreters are smaller, simpler programs
- The interpreter would encounter the errors and report it to the user immediately and stops the program
- Can be edited and run without translating the whole program
Decribe what compilers do?
- Translates all the source code (high level code) into machine code in one go
- Produces an executable file that will run on other machines without the compiler needing to be installed.
- Produce much more efficient code than interpreters making the compiled programs run faster
- Tend to be large complex programs
- Analyse the entire program, taking note of where errors have occurred and record them in an error file
- Requires analysis and the generation of the code only once
- Compiled programs have to be re-compiled after any changes have been made
What do editors do?
Software that allows a programmer to enter and edit source code
Features may include:
* Automatic formatting
* Automatic line numbering
* Automatic colour coding
* Statement completion
What do error diagnostics and debuggers do?
Display information about an error when it occurs such as the line it occured on and the error type
May suggest solutions to help programmer to solve this error
What does a run time environment do?
- Allows a program to run on a computer system, checks for runtime errors
- Runtime error occurs as program is being executed, such as dividing a number by 0
- Allows tools such as rtace and breakpoint to be used