Programming languages and IDEs
High-level and low-level languages, compilers, interpreters and assemblers, and the tools an IDE gives a programmer.
Watch the lesson
Every point below, worked through in one video, and each point links straight to its own part.
Learn
Programming languages and IDEs, explained point by point
Everything the GCSE specification expects you to be able to do, and how to actually do it - the same lesson a signed-in student studies from.
Compare high-level and low-level languages
A high-level language, such as Python, uses words and symbols close to English and maths. It is quicker to write, easier to read and correct, and the same program can run on different kinds of computer. A low-level language is close to what the processor itself does. It is harder to write and only works on one type of processor, but it gives direct control of the hardware and can make very fast, compact programs, which is why it is still used in embedded systems.
Describe machine code and assembly languageAQA and Eduqas only
Machine code is the binary instructions a processor carries out directly. It is the only language a processor understands, so everything else has to be turned into it. Assembly language uses short words in place of the binary patterns, such as ADD or LOAD, with one assembly instruction for each machine code instruction. Both are low-level, and both are specific to one type of processor. AQA and Eduqas examine these.
Explain the purpose of translators, and compare compilers and interpreters
A translator turns program code into machine code. A compiler translates the whole program in one go and produces a separate file that can be run again and again without the compiler or the source code. Errors are reported together at the end. An interpreter translates and runs one line at a time and stops at the first error, which is helpful while writing and testing. The interpreter is needed every time the program runs, and the program runs more slowly. AQA and Eduqas also ask about the assembler, which turns assembly language into machine code.
Describe the tools an IDE providesOCR and Eduqas only
An integrated development environment (IDE) is the software programmers write code in. Its editor colours the different parts of the code, indents it and suggests completions. Its error diagnostics point to the line where something is wrong, and debugging tools let you pause the program at a chosen line, run it one line at a time and watch the variables change. The run-time environment runs the program inside the IDE, and a translator is built in. OCR and Eduqas examine IDEs, and Eduqas has a longer list of tools.
Describe the stages of compilationEduqas only
Eduqas asks what a compiler does in order. Lexical analysis removes comments and spaces and turns the code into tokens. Syntax analysis checks the tokens against the rules of the language and reports syntax errors. Semantic analysis checks that the code makes sense, such as a variable being declared before it is used. Code generation produces the machine code, and optimisation makes it run faster or use less memory.
Programming languages and IDEs key terms
The words the specification and the mark schemes use, each defined the way an examiner wants it.
- High-level language
- A programming language written in words and symbols close to English, which must be translated before it runs.
- Low-level language
- A programming language that is close to the instructions the processor carries out, such as assembly language.
- Machine code
- The binary instructions that a processor can carry out directly.
- Assembly language
- A low-level language that uses short words to stand for machine code instructions.
- Translator
- A program that converts program code into machine code.
- Compiler
- A translator that converts a whole program into machine code in one go, producing a file that can be run.
- Interpreter
- A translator that converts and runs a program one line at a time.
- Assembler
- A translator that converts assembly language into machine code.
- IDE
- An integrated development environment: software that brings together the tools for writing, running and debugging programs.
- Breakpoint
- A marker that makes a program pause at a chosen line so that the programmer can inspect it.
Common mistakes in Programming languages and IDEs
The slips that cost marks year after year, and what to do instead.
Saying a compiler translates code line by line
A compiler translates the whole program at once and produces a file to run. Line by line is the interpreter.
Writing that high-level languages run faster than low-level ones
High-level code is easier to write and read. Low-level code can be made faster and smaller, since it controls the hardware directly.
Naming an IDE tool without saying what it does
Say how the tool helps, such as a breakpoint pausing the program so that the variables can be checked.
Calling assembly language machine code
Machine code is binary. Assembly language uses short words and has to be translated by an assembler.
Practice
Try a Programming languages and IDEs question
A GCSE-style original question from this topic. Have a go before you open the working - deciding on an answer first is what makes the working stick.
Answer: After it has worked through the whole program
A compiler works through all of the code first, then gives a list of all the errors it found together.
- A compiler translates the whole program before any of it runs.
- It records each error it meets as it goes.
- At the end it reports them all together, so errors are reported after it has worked through the whole program.
