Classification Of Programming Languages Flashcards
What is a processor instruction set?
It is a built-in set of binary (machine code) instructions that a processor understands.
Why were translation programs developed?
To make programming faster and less error-prone by converting human-readable code into machine code.
What are the three types of translator software?
Assembler: Converts assembly language into machine code.
Interpreter: Converts high-level code line by line into machine code.
Compiler: Converts the entire high-level code into machine code at once.
What is the main difference between a compiler and an interpreter?
A compiler translates the entire program before execution, while an interpreter translates and executes code line by line.
Why use an interpreter?
It is useful during development and for making programs portable across different architectures.
What are high-level languages?
Programming languages like Python, Java, and C, designed for human readability and productivity.
What is assembly language?
A low-level language closer to machine code but slightly more readable than binary.
Why are high-level languages preferred over low-level languages?
They are easier to read, write, debug, and maintain
What happens during compilation?
The source code is fully converted into machine code, which is saved for later execution.
What happens during interpretation?
A: Each line of source code is translated and executed immediately without generating a saved machine code file.
What is bytecode?
An intermediate language executed by a virtual machine (e.g., Java Virtual Machine). It is portable but slower than native machine code.
What are the advantages of compilers?
Faster execution since the code is precompiled and saved in machine code.
What are the disadvantages of interpreters?
Slower overall execution because translation happens during runtime.
Why use bytecode?
It enables platform independence, allowing the same code to run on multiple systems with a compatible virtual machine.