Types Of Programming Language, Translators & Integrated Development Environments (IDEs)
Learn it by playing
Answer these questions to earn energy, then fish and explore. No account needed.
Notes
Levels of Programming Languages
- A programming language is a bridge between human understanding and computer execution.
- **Low-level languages** (1st & 2nd generation) directly translate to machine code and allow direct hardware control.
- **Machine code** (1st generation) is binary (0s and 1s) directly executable by the processor.
- **Assembly language** (2nd generation) uses **mnemonics** like LDA, STA; one assembly instruction = one machine code instruction.
- **High-level languages** (3rd generation) use English-like statements (e.g., Python, Java, C++).
- One high-level instruction translates to many machine code instructions.
- High-level languages are **portable** (can run on any computer with a translator) and easier to debug.
Assembly Language
- Assembly language is a **second-generation low-level language** using mnemonics.
- Common mnemonics: **LDA** (load into accumulator), **ADD** (add to accumulator), **STO** (store accumulator to RAM).
- An **assembler** translates each mnemonic into its equivalent binary machine code.
- Used when direct hardware control is needed, or to save memory/execution time.
- Advantages: complete control over hardware, occupies less memory, executes faster.
- Disadvantages: machine dependent, difficult to write/understand, more prone to errors.
Translators: Compilers & Interpreters
- A **translator** converts source code into machine code so the processor can execute it.
- **Assembler** translates assembly language into machine code.
- **Compiler** translates high-level code all in one go, creating an **executable** file.
- Compiler advantages: faster execution, optimised code, source code hidden.
- Compiler disadvantages: memory intensive, difficult to debug, must recompile after changes.
- **Interpreter** translates and executes high-level code one line at a time.
- Interpreter advantages: easier to debug (stops at first error), uses less RAM.
- Interpreter disadvantages: slower execution, no optimisation, requires translator each run.
Integrated Development Environments (IDEs)
- An **IDE** is software that provides tools to make writing high-level code more efficient.
- **Editor** – write, edit, and maintain code; features include **prettyprint** (colour-coded keywords), auto-completion, bracket matching, and commenting.
- **Error diagnostics** – highlight errors and provide debuggers for step-by-step execution to find logic errors.
- **Run-time environment** – allows the program to be run and output seen within the IDE.
- **Translator** – built-in compiler or interpreter so no extra software is needed.
Comparison of low-level and high-level languages
Three types of translators: assembler, compiler, interpreter
Key components of an Integrated Development Environment (IDE)
Practice questions
Free preview — 8 of 40 questions. Sign up to see them all.
1.Which generation of programming language is machine code?
Easy- AFirst generation
- BSecond generation
- CThird generation
- DFourth generation
2.What is a mnemonic in assembly language?
Easy- AAn abbreviated text command such as LDA or STA
- BA binary number representing an instruction
- CA high-level English-like statement
- DA memory address in RAM
3.Which of the following is an advantage of using a high-level language over a low-level language?
Medium- ADirect control over hardware
- BEasier to read and write
- COccupies less memory
- DFaster execution
4.How does a compiler translate high-level language code?
Medium- AIt translates one line at a time and executes immediately
- BIt translates all the code in one go before execution
- CIt translates code using mnemonics
- DIt translates code into assembly language first
5.A program written in a high-level language is being developed. Which translator is most suitable during the development stage?
Hard- AAssembler
- BCompiler
- CInterpreter
- DLinker
6.What does an assembler translate?
Easy- AHigh-level language to machine code
- BAssembly language to machine code
- CMachine code to assembly language
- DHigh-level language to assembly language
7.Which of the following is a feature of an Integrated Development Environment (IDE)?
Medium- AAssembler
- BPrettyprint
- COperating system
- DDatabase management system
8.Which of the following best describes why a program written in a high-level language must be translated before execution?
Hard- ATo make the code easier to read
- BTo convert it into machine code that the processor can understand
- CTo reduce the file size
- DTo add comments to the code
Unlock all 40 questions, slides & more
Create a free account to see every question, the slides, flashcards and revision notes for this topic.
Past papers
Past-paper practice for this topic is coming soon.