How do programming languages, source code, machine code and IDEs fit together in writing software?
How programming languages, source code, translators and integrated development environments fit together: why source code must be translated to machine code, and how the choice of language and tools supports writing software.
An OCR J277 2.5 answer tying the topic together: source code versus machine code, why translation is needed, how language level (high or low) is chosen, and how an IDE supports the whole process of writing, translating, running and debugging software.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
OCR wants you to see how the whole of topic 2.5 fits together: the difference between source code and machine code, why a translator is needed between them, how the level of language is chosen, and how an IDE supports the process of writing, translating, running and debugging software. This is the synthesis that the extended-response style questions on 2.5 reward, and it ties the three other pages together.
Source code and machine code
Why translation is needed
Choosing a language and a translator
How the IDE ties it together
Try this
Q1. State the difference between source code and machine code. [2 marks]
- Cue. Source code is the human-written code in a programming language; machine code is the binary instructions the CPU executes directly.
Q2. State why a translator is needed. [1 mark]
- Cue. The CPU can only execute machine code, so source code must be translated into machine code to run.
Q3. Name the four kinds of tool an IDE brings together. [1 mark]
- Cue. An editor, debugging tools, a run-time environment, and a translator (compiler or interpreter).
Exam-style practice questions
Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
OCR 20214 marksExplain the difference between source code and machine code, and explain why a translator is needed between them.Show worked answer →
Source code (up to 2): the code a programmer writes in a programming language (high-level such as Python, or low-level such as assembly); it is designed to be read and written by humans.
Machine code (up to 2): the binary instructions (1s and 0s) that the CPU executes directly; it is what the hardware actually understands.
Why a translator is needed (within the marks): the CPU can only run machine code, but humans write in source code, so a translator (compiler, interpreter or assembler) is needed to convert the source code into machine code that the processor can execute.
Markers reward source code as human-written and machine code as the binary the CPU runs, and the clear point that translation bridges the two.
OCR 20226 marksA team is developing a new game. Discuss the choices they face over programming language and development tools, referring to language level, the choice of translator, and the use of an IDE.Show worked answer →
A 6-mark question, so a developed discussion across the three areas.
Language level: a high-level language is the likely choice for productivity and portability (easier to write and debug, runs on different machines), though performance-critical parts might use lower-level code for efficiency. State the trade-off.
Translator: during development an interpreter is convenient (runs immediately, reports errors as it goes); for release a compiler produces a fast executable that can be distributed without the source code. So the choice depends on the stage.
IDE: an IDE supports the whole process with an editor (syntax highlighting, auto-complete), debugging tools (breakpoints, stepping, watches) to find logic errors, a run-time environment to test, and a built-in translator, all in one place, speeding development and catching errors early.
Markers reward developed points across language level, translator choice and IDE tools, with reasons and a sense of the trade-offs, rather than three short lists.
Related dot points
- The characteristics and purpose of high-level and low-level languages, the difference between machine code and assembly language, and the advantages and disadvantages of each level.
An OCR J277 2.5.1 answer on high-level and low-level languages: their characteristics and purpose, the difference between machine code and assembly language, and the advantages and disadvantages of programming at each level.
- The purpose of translators, the characteristics of a compiler and an interpreter and how they differ, and the role of an assembler in translating assembly language.
An OCR J277 2.5.2 answer on translators: why source code must be translated, the characteristics of a compiler and an interpreter and how they differ, and the role of an assembler in translating assembly language to machine code.
- The common tools and facilities available in an integrated development environment (IDE): the editor, error diagnostics, run-time environment and translators, and how each helps a programmer.
An OCR J277 2.5.2 answer on integrated development environments: what an IDE is and the common tools it provides (editor, error diagnostics and debugging, run-time environment and translators), and how each helps a programmer write and test code.
- The two main types of programming error: syntax errors and logic errors, what causes each, how they are found, and how they differ.
An OCR J277 2.3.2 answer on the two main types of programming error: syntax errors (breaking the rules of the language) and logic errors (the program runs but gives the wrong result), what causes each, and how they are found and corrected.
- The purpose and functions of the operating system: user interface, memory management and multitasking, peripheral management and drivers, user management, and file management.
An OCR J277 1.5.1 answer on the purpose and functions of an operating system: the user interface, memory management and multitasking, peripheral management and drivers, user management, and file management.
Sources & how we know this
- OCR GCSE (9-1) Computer Science (J277) specification — OCR (2020)