Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1machine independent | AA high-level program is portable, but each type of computer still needs a translator (compiler or interpreter) to turn it into its own machine code. | |
| 2machine dependent | BLow-level code is machine dependent. It uses the instruction set of one CPU type, so it will not run on a different type of CPU without being rewritten. | |
| 3A high-level program is portable: the same source code can be translated separately for a PC and a phone | CCode written in this kind of language can run on different types of computer, as long as each one has a translator. High-level languages are like this. | |
| 4Assembly code is machine dependent because each CPU type has its own instruction set | DCode written in this kind of language only works on one type of CPU because it uses that CPU's own instruction set. Low-level languages are like this. | |
| 5"Assembly code written for one CPU will run on any computer." | EMOV AX, 5 ; works on one CPU type only | |
| 6"A high-level program can run on any computer without being translated." | Fprint("Hello") # same code on PC and phone |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
machine independent — A language whose code can run on different types of computer. High-level languages are machine independent (portable); low-level languages are machine dependent.highLevelPortable ← TRUElowLevelPortable ← FALSEFOR i ← 1 TO numMachines
TRANSLATE(program, i)
NEXT idifferentSets ← intelSet ≠ armSetIF machineDependent = TRUE THEN
OUTPUT "New code needed per CPU"
ENDIF