Programming Languages Flashcards
What are programming languages?
Programming languages are specially written code used for writing software
What are the two categories of programming languages?
- High-level programming languages
- Low-level programming languages
Define high-level programming languages.
High-level programming languages abstract many complexities of interfacing with hardware, providing a simpler and more understandable set of grammar for developers.
Define low-level programming languages
Low-level programming languages work closer with hardware on a computer, allowing developers to have direct access to hardware resources.
What are the 3 translation software used to convert program code into machine code?
- Assemblers
- Compilers
- Interpreters
What is the purpose of an assembler?
Assemblers translate Assembly Language instructions into machine code
How do compilers differ from interpreters?
Compilers translate high-level program code into machine code in one go, creating an executable file.
Interpreters translate high-level program code instruction-by-instruction.
Give examples of compiled programming languages
C++
Java
Give examples of interpreted programming languages
Python
JavaScript,
What are the advantages/disadvantage of using Low-level programming languages?
Disadvantage :
-Difficult to develop programs not human-readable
-Not portable written specifically for a hardware
-Harder to debug (as they are being executed on the CPU immediately)
-Little to no abstraction in the program (need to state explicitly how to perform every task)
Advantage:
-Easier to use as CPU-specific instructions can be used
-Provide direct access to hardware.
What are the advantages/disadvantage of using High-level programming languages?
Advantages
Human-friendly language
Easy to understand
Easy to debug
Disadvantages
Less memory efficient
Harder to optimise for specific hardware
Portable (can be executed on other hardware without changes)
Hardware independent
What is an assembler?
An assembler is a program that translates assembly language code into machine code
What is a compiler?
A compiler is a program that translates high-level programming language code into machine code all at once.
What is an interpreter?
An interpreter is a program that translates high-level programming language code into machine code line by line during execution.
What are the advantages of using assemblers?
Assemblers produce fast and efficient machine code, allowing for direct control over hardware resources.