Which term describes the way of writing programs that uses short codes such as LDA and ADD, where each instruction corresponds directly to a single machine code instruction?
Assembly language
What is meant by machine code?
The binary instructions that a processor can execute directly
What is meant by a high-level language?
A language whose statements look similar to English or maths
What is meant by a low-level language?
A language whose instructions each correspond to one machine code instruction
What is the name for the feature of a high-level language that lets the same program run on different types of processor with few or no changes to the statements?
Machine independence
Which term describes the program statements that a programmer writes, before they are translated into instructions a processor can execute?
Source code
What name is given to a short code such as LDA or STO in assembly language?
A mnemonic
Which of these is a feature of high-level languages rather than low-level languages?
Data structures such as arrays and records
Which of these languages is a low-level language?
Assembly
Why is assembly language classified as a low-level language?
Each instruction corresponds to one machine code instruction
Assembly language is processor-specific. What does this mean for a program written in it?
It must be changed to run on a different processor
Why are high-level languages generally easier to learn than low-level languages?
Their statements look like English or maths
Why can a program written in a high-level language be run on different types of processor?
A different compiler or interpreter translates it for each processor
What usually happens to a single statement written in a high-level language?
It is translated into several machine code instructions
Which type of program is most likely to be written in assembly language?
A device driver that controls hardware
Which is an advantage of high-level languages over low-level languages?
Programs are easier to understand and debug
A robot arm must respond instantly, so its control program must run very quickly and use very little memory. Which language is most suitable?
A low-level language such as assembly
Why was writing programs in machine code slow and difficult for early programmers?
Each instruction is written in binary and does one very small task
An assembly language program must be translated into machine code before it can be executed. Why is this?
A processor can only carry out instructions written in machine code
A programmer has to finish writing a program before a tight deadline. Why does choosing a high-level language help?
Each statement does the work of several machine code instructions
What is the name for a program that converts a whole high-level program into machine instructions before it is run, saving the translated output to a storage drive?
Compiler
Which term describes the translated output of a high-level program that can be saved to a storage drive and run whenever it is required?
Object code
What is meant by 'interpreter'?
A translator that converts and runs one line of a program at a time
What is meant by 'machine code'?
The binary instructions that are executed directly by the processor
What is meant by 'bytecode'?
An intermediate form of a program that can be interpreted on many different types of processor
A compiler and an interpreter both carry out which job?
Translating high-level code into machine code
What name is given to the high-level code that a programmer writes?
Source code
What does a compiler produce when it translates a program written in a high-level language?
Object code, which can be saved and run later
A program run with an interpreter produces two lines of output before stopping with an error on line 3. What does this show?
The interpreter translates and executes each line in turn
Why does a compiled program usually execute faster than an interpreted one?
It is already machine code and needs no translating
A customer buys commercial software that was supplied as object code. Why can they not adapt the program?
They only have machine code, which cannot easily be changed
A program will be supplied as interpreted source code. What must each customer have in order to run it?
An interpreter installed on their computer
A games company wants to sell its software without customers being able to see or change the code. Which approach should it use, and why?
Compile it, so that only object code is supplied
Why can an interpreted program usually be run on many different types of computer?
Any computer with the correct interpreter can run the source code
A program is run with an interpreter. The interpreter reaches a line containing a syntax error. What happens?
It stops and displays an error message
A customer is given a program that has already been compiled. What must be installed on their computer for the program to run?
Nothing, it is already machine code
A web page contains some JavaScript. How is this code run when the page is opened in a browser?
The source code in the page is interpreted by the browser
A company supplies a program as interpreted source code. What can customers do with it that they could not do with a compiled program?
Read and adapt the source code
A programmer is writing a new program and wants to test each line as soon as it is written. Which translator is more suitable?
An interpreter, because it runs each line as it is translated
A programmer runs a program with an interpreter, then looks for a file of the translated program that can be run later. What will they find?
No file, because an interpreter produces no object code