Software Topi
Software Topi
2210 Page 1
describing.
“It is a signal. When the signal is received it tells the operating
system that an event has occurred.”
Selma is describing ........................................................ [1]
(part of Q6/12/O/N/17)
Ans.
Interrupt
2210 Page 2
(Q3cii/11/M/J/22)
Ans.
• Operating system
• Application software // by example
• Utility software // by example
2210 Page 3
Ans. One mark for each correct row
2210 Page 4
Ans.
Any four from:
− No need for multitasking // Single purpose
− No need for file management
− No requirement to run other software, so no platform needed
for this
− No need for user interface
− No need for security management
− No need for user accounts
− No need for batch processing
− Limited memory management needed
− Limited input/output management needed
− Limited processor management needed
Q.
Ans.
One mark per correct tick
Q.
a) Five statements about interpreters and compilers are shown in
the table below.
Study each statement. Tick (✓) to show whether the statement
refers to an interpreter or to a compiler. [5]
2210 Page 5
refers to an interpreter or to a compiler. [5]
C: FOR x ← 1 TO 10
READ n
ENDFOR
2210 Page 6
− work directly on registers/CPU
− more control over what happens in computer
− can use machine specific functions
e) 1 mark per correct letter, maximum 2 marks
Assembly code: B
High-level language code: C
Machine code: A
2210 Page 7
Q.
a) Give two reasons why a programmer would choose to write
code in a low-level language. [2]
b) igh level languages re uire either an interpreter or a compiler
to translate the program. he ta le elo lists a num er o
statements a out language translators. ic to sho hich
statements re er to interpreters and hich re er to compilers.
[5] (Q1/12/O/N/16)
Ans.
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)
2210 Page 8
Q. Four descriptions about compilers and interpreters are shown
below.Draw lines to indicate which descriptions refer to a
compiler and which descriptions refer to an interpreter. [4]
(Q8/13/O/N/16)
Ans.
2210 Page 9
computer. Name one type of translator that can be used. [1]
c) Describe how your answer to part (b) translates this program.
[3] (Q2/11/M/J/17)
Ans.
a) Two from:
• Closer to human language // closer to English
• Independent of a particular type of computer/device/platform
// portable language
• A language such as Python, Java, Pascal, etc. (any suitable
example)
b) One from:
• Compiler
• Interpreter
c) Must relate to answer given in 2b. No follow through for
incorrect answer in
part 2b.
Compiler – Three from:
• Translates the whole program as a complete unit / at once
• Creates an executable file / object code
• A report / list of errors in the code is created
• Optimises the source code (to run efficiently)
Interpreter – Three from:
• Translates a program one line of code at a time
• Machine code is directly executed // The interpreter is used
each time
the program / code is executed
• Will identify an error as soon as it finds one in a line of code
Ans.
2210 Page 10
Q. Translators, such as a compiler and an interpreter, are used
when writing and running computer programs.Describe how a
compiler and an interpreter translates a computer program. [6]
(Q7/11/M/J/18)
Ans.
Compiler
Any three from:
− Translates high-level language into machine code/low level
language
− Translates (the source code) all in one go/all at once
− Produces an executable file
− Produces an error report
Interpreter
Any three from:
– Translates high-level language into machine code/low level
language
− Translates (the source code) line by line/statement by
statement
– Stops if it finds an error
– Will only continue when error is fixed
2210 Page 11
Ans.
a) • Compiler • Interpreter
b) Four from:
• Closer to human language/English
• « so it is easier/quicker to read/write/understand
• « so it is easier/quicker to debug the program
• « therefore, less likely to make errors
c)
2210 Page 12
• Continues translating when an error is fixed
b) Four from (Max three per benefit):
• Produces executable file
«
• « this creates a smaller file size
• « more saleable
• Program will be machine independent / portable
«
• « this means it can be used on any hardware
• No need for compiler to run executable file
«
• « this means it will be quicker to run
• « customers can just execute the program
• Source code cannot be accessed
«
• « therefore, code cannot be stolen / plagiarised
2210 Page 13
b) ic to sho hich o the ollo ing is an example o a
high level language program. 2
Ans.
a)
2210 Page 14
b)
2210 Page 15
b) Any three from:
− Easier to understand // Don’t know assembly code
− Easier to debug
− Easier to maintain
− Portable
− Knowledge of manipulating memory locations/registers not
required
− Can use an IDE
− Greater range of languages
2210 Page 16
time (before executing it)
2210 Page 17
[6]
b) A programmer often uses an integrated development
environment (IDE) when writing a computer program. Give
three common functions of an IDE. [3] (Q5/01B/SP/23)
Ans.
a) One mark for each correct term, in the correct place.
• syntax
• high-level
• translator
• machine code
• assembly
• low-level
b) Any three from:
• Code editor
• Run-time environment
• Translator
• Error diagnostics
• Auto-completion
• Auto-correction
• Prettyprinting
2210 Page 18