6. principles of programming Flashcards
What is a high level language?
Uses code written in a way which is similar to a natural human language, making it easier to understand and use the language. They lead to fewer errors and can create more powerful and complex commands. Examples:
- python
- java
- C++
What is a disadvantage of high level languages?
They are slower to execute than low level languages because the code must first be translated into binary before it can be executed by the CPU.
What is a low level language?
Do not closely resemble natural human language and are therefore harder to read and write. They are used when a program must be executed quickly, or when a program needs to interact directly with hardware. There are two types:
- assembly language
- machine code
What is assembly language?
Uses specialised command mnemonics to perform actions, such as INP and HLT. It is a lot easier to understand and spot errors than in machine code.
What is machine code?
Pure binary code that computers can directly process and execute. It is extremely difficult for humans to write and understand, but programmers may choose to use this when they need to execute a highly specific command that cannot be achieved with high level languages.