Programming Languages Flashcards
(40 cards)
What are the three generations of programming languages?
First Generation: Machine code, Second Generation: Assembler, Third Generation: Imperative high level programming languages
What does ‘imperative’ mean in the context of high-level programming languages?
Command
What is a key characteristic of high-level programming languages?
Closer to English language, easier to understand
What is the role of a translator in high-level programming languages?
Converts instructions into code that the computer understands
What advantage do high-level programming languages offer regarding processor architecture?
Greater portability
What is one instruction in high-level programming languages mapped to in machine code?
Several machine code instructions
What programming constructs do high-level languages support?
- Sequencing
- Selection
- Iteration
- Assignment
- Functions
How do declarative programming languages operate?
Determine what is to be computed rather than how it is computed
Name three examples of declarative high-level programming languages.
- SQL
- HTML
- CSS
What do low-level programming languages refer to?
Machine code and assembly language
What does ‘low level’ indicate in low-level programming languages?
A low level of abstraction
What can low-level programming languages control?
The hardware of the computer
Why are low-level programming languages considered not portable?
They depend on the architecture of the processor
What are low-level programming languages appropriate for?
- Developing new operating systems
- Embedded systems
- Hardware device drivers
In what format is machine code expressed?
Binary values 0 and 1
What is the language that computers understand?
Machine code
What are the two parts of a machine code instruction?
- Operator
- Operand
What does the processor decode in a machine code instruction?
The operator to identify the task to be carried out
What does the operand in a machine code instruction represent?
The value or memory address that the instruction is to be operated on
Fill in the blank: Machine code instructions are made up of the ______ and the operand.
Operator
Fill in the blank: Machine code is specific to a ______.
Processor
What does assembly language provide?
Basic computer instructions for programs to run
What is the relationship between machine code and assembly code?
One-to-one relationship; one assembly instruction maps to one machine code instruction
How does assembly language differ from machine code in terms of readability?
Assembly language uses names (mnemonics), making it easier for programmers to understand