0% found this document useful (0 votes)
88 views7 pages

1.3.7 High - and Low Level Languages and Their Translators ANS

The document discusses high-level and low-level programming languages and their translators. It explains that high-level languages are easier for humans to write and modify code in, while low-level languages can execute faster and use less memory. It also describes how compilers translate entire programs at once into machine code, while interpreters translate and execute line-by-line without producing standalone executable files.

Uploaded by

F
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views7 pages

1.3.7 High - and Low Level Languages and Their Translators ANS

The document discusses high-level and low-level programming languages and their translators. It explains that high-level languages are easier for humans to write and modify code in, while low-level languages can execute faster and use less memory. It also describes how compilers translate entire programs at once into machine code, while interpreters translate and execute line-by-line without producing standalone executable files.

Uploaded by

F
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

OL COMPUTER SCIENCE – 2210/01


TOPICAL MARKING SCHEMES

1.3.7 HIGH- AND LOW-LEVEL


LANGUAGES AND THEIR
TRANSLATORS

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885
CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

Q1 2016-Nov, P13

6 Any two from:


High level language

– easier/faster to write code as uses English-like statements


– easier to modify as uses English-like statements
– easier to debug as uses English-like statements
– portable language code

Any two from:

Low level language

– can work directly on memory locations


– can be executed faster
– translated program requires less memory [4]

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885
CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

Q2 2016-Nov, P12
1

(a) Any two from:

– direct access to computer processor / special hardware // machine dependent


instructions
– uses up less memory
– can increase the speed of processing a program // executes instructions faster
(b)
[2]

Statements Interpreter ( ) Compiler ( )

Translates the source code into


machine code all at once

Produces an executable file in machine


code

Executes a high-level language


program one instruction at a time

Once translated, the translator does not


need to be present for the program to run

An executable file is produced

[5]

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885
CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

Q3 2015-June, P12

(b) Any one from:


– code is required to be converted into machine code/binary
– code needs to be produced that can be understood by the computer

[1]

(c) Any one from:


– close to English/native/human language
– easier/faster to correct errors/read/write
– works on many different machines/operating systems (portable)
[1]

(d) Any one from:


– work directly on registers/CPU
– more control over what happens in computer
– can use machine specific functions [1]

(e) 1 mark per correct letter, maximum 2 marks


Assembly code: B
High-level language code: C
Machine code: A

[2]

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885
CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

Q4 2015-June, P11

Q5 2012-June, P12

13 (a) code B [1]

(b) Any one from:


– no need to understand workings of a computer
– easier to understand for programmer/closer to English
– much easier to debug
– much easier to test
– one to many when writing commands
– not machine specific/portable [1]

(c) Any one from:


– can address memory addresses directly
– no need for compilers/interpreters
– shorter code/code requires less storage/RAM
– can (be written to) run faster [1]

(d) – compiler produces object code / interpreter doesn’t produce object code
– compiler translates whole program in one go / interpreter translates and executes line at
a time
– compiler produces list of all errors / interpreter produces error message each time an
error encountered
– compiler produces “stand alone code” / interpreter doesn’t produce “stand alone code”
– compilation process is slow but resultant code runs very quickly / interpreted code runs
slowly
[2]

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885
CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

Q6 2011-June,P12

7 (b) Any two from:

– close to English
– one statement is equal to many low-level language statements
– portable
– easy to edit/debug/update
– problem oriented
– needs converting to machine code before execution [2]

(c) Any one from:


– interpreter – runs line by line and locates errors as it runs
– compiler – converts whole program into object code/gives complete list of errors [1]

Q7 2010-June, P11

10 (a) Any two differences from:

compiler interpreter

– needs to be re-compiled every – translates instructions one


time a change is made at a time ….
– code can be executed on its own – then executes the
instructions immediately
– translates whole code in one go – only finds errors as each
instruction executed
– translates source code into – easier to edit/debug
object code/machine code
– produces error list at end of compilation [2]

(b) Any one high level advantage and any one low level advantage:

high-level language

– fewer instructions
– no need to understand registers/computer architecture
– instructions nearer to human language/English
– not machine specific/portable
– easier to debug programs
– easier to write programs

low-level language

– gain knowledge of how a computer works


– more control over how registers (etc.) are accessed
– can access registers (etc.) directly [2]

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885
CAMBRIDGE COMPUTER SCIENCE AHMED THAKUR

(c) Any one from:


– program/algorithm broken down into simpler modules/smaller tasks [1]
– each module is further sub-divided until basic elements produced
– allows several programmers to work at same time on the software
– can test each module independently

https://www.facebook.com/groups/OAComputers/
AHMED THAKUR [email protected], 0300-8268885

You might also like