0% found this document useful (0 votes)
35 views18 pages

Software Topi

The document discusses various aspects of software, interrupts, and operating systems, including the definition and functions of interrupts, the role of operating systems in managing tasks, and the differences between high-level and low-level programming languages. It provides examples of interrupt signals generated by printers and other devices, as well as the importance of using translators like compilers and interpreters for executing high-level code. Additionally, it outlines the advantages of using different programming languages and the specific functions of operating systems in managing computer resources.
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)
35 views18 pages

Software Topi

The document discusses various aspects of software, interrupts, and operating systems, including the definition and functions of interrupts, the role of operating systems in managing tasks, and the differences between high-level and low-level programming languages. It provides examples of interrupt signals generated by printers and other devices, as well as the importance of using translators like compilers and interpreters for executing high-level code. Additionally, it outlines the advantages of using different programming languages and the specific functions of operating systems in managing computer resources.
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/ 18

Software topicals

Friday, August 11, 2023 12:41 PM

TYPES OF SOFTWARES AND INTERRUPTS


Q. Andrew sends a large document to a printer.
b) The printer runs out of paper during the printing job. A signal is
sent back to the computer to stop temporarily its current task.
Name this type of signal. [1] (Q9/01/SP/16)
Ans.
• Interrupt

Q. The printer runs out of paper while it is printing the


documents. A signal is sent to the processor to request that the
problem is dealt with. Name this type of signal. [1]
(Q4aiii/11/M/J/16)
Ans.
iii) Interrupt

Q. State four functions of an operating system. [4]


(Q2/12/O/N/16)
Ans.
Any four from:
– Provides a user interface
– Handles interrupts / errors
– Memory management
– File management
– Manages peripherals (inputs/outputs)
– Provides security methods
– Allows multitasking
– Manages multiprogramming
– Enables batch processing
– Manages software installation / removal
– Allows creation of multiple accounts
– Levels of access

Q. State three functions provided by an operating system. [3]


(Q11/11/M/J/17)
Ans.
Three from e.g. :
• (Provides an) interface
• Loads / opens / installs / closes software
• Manages the hardware // manages peripherals // spooling
• Manages the transfer of programs into and out of memory
• Divides processing time // processor management
• Manages file handling
• Manages error handling // manages interrupts
• Manages security software
• Manages utility software
• Manages user accounts
• Multitasking
• Multiprogramming // time slicing
• Batch processing

Q. Selma writes the following four answers in her Computer


Science examination.State which computer terms she is
describing.

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

Q. Describe the purpose of an interrupt in a computer system. [4]


(Q8/12/O/N/18)
Ans.
Four from:
• Used to attend to certain tasks/issues
• Used to make sure that vital tasks are dealt with immediately
• The interrupt/signal tells the CPU/processor (that its attention
is required)
• A signal that can be sent from a device (attached to the
computer)
• A signal that can be sent from software (installed on the
computer)
• The interrupt will cause the OS/current process to pause
• The OS/CPU/ISR will service/handle the interrupt
• They have different levels of priority
• After the interrupt is serviced, the (previous) process is
continued
• It enables multi-tasking to be carried out on a computer
• A valid example of an interrupt e.g. ‘out of paper’ message for
a printer

A. An interrupt signal is sent from the printer to the computer.


i) Give two examples of when a printer would generate an
interrupt signal. [2]
ii) Many devices send interrupt signals. Identify the software in
the computer that will receive and manage all interrupt
signals. [1][ (Q8c/12/M/J/20)
Ans.
i) Any two from:
− Paper jam
− Out of paper
− Out of toner/ink
− Buffer full
− Awaiting input
− Print complete
− Printer ready
Award any other valid example
ii) Any one from:
− Operating system
− Interrupt handler
− Interrupt service routine

A. A business is creating a new mobile device that has an SSD as


secondary storage.
ii) Identify two examples of software that can be stored on the
SSD. [2]
(Q3cii/11/M/J/22)

2210 Page 2
(Q3cii/11/M/J/22)
Ans.
• Operating system
• Application software // by example
• Utility software // by example

Q. The computer in the ticket machine has an operating system.


One function of the operating system is to provide an interface
for the user. State three other functions of the operating
system. [3] (Q1e/12/O/N/22)

Ans. Any three from:


• Multiprogramming
• Multitasking
• Handling interrupts
• Providing security
• Managing user accounts
• Batch / real-time processing
• File management
• Processor management
• Memory management
• Running software
• Input and output software

Q. In a computer system the operating system is run directly on


the firmware.
a) Identify which type of software runs directly on the operating
system. [1]
b) One function of an operating system is to manage interrupts.
Give two examples of when an interrupt would be
generated.[2] (Q7/01B/SP/23)
Ans.
a) Application software
b) Any two from e.g.:
• Division by zero
• Two processes trying to access the same memory location
• Any valid example of an error message (two examples can be
awarded)
• Any valid example of a change of task (two examples can be
awarded)

Q. When a user is reading a text on the mobile phone, they may


also get a telephone call on the mobile phone. An interrupt
signal is generated that results in an output to inform the user
that a person is calling them.
Describe how the interrupt signal is processed to inform the
user that a person is calling them. [4] (Q4d/13/O/N/22)
Ans. Any four from:
• The interrupt signal is sent to the CPU/processor
• The CPU stops the task it is currently processing …
• … to service the interrupt
• An interrupt service routine is used (to service the interrupt)
• Once the interrupt is serviced, a message is displayed to notify
the user of the call
Q. omputer systems o en use interrupts. ive statements are
given a out interrupts. ic to sho i each statement is
rue or alse.

2210 Page 3
Ans. One mark for each correct row

Q. Benny is a photographer and prints his photos using an inkjet


printer.
a) Benny is printing some photos and the paper gets jammed in
the printer. A signal is sent to alert the computer about the
paper jam. State the name of this type of signal. [1]
(Q8a/11/M/J/20)
Ans.
Interrupt

Q. Padma opens an application on her computer.An interrupt is


generated to inform the Central Processing Unit (CPU) that the
application has been opened.
a) Give three other examples of when an interrupt signal could be
generated. [3]
b) State what would happen if interrupt signals were not used in
a computer. [1] (Q9/12/O/N/21)
Ans.
a) Any three from: e.g.
− A suitable description of any error that might occur − A
peripheral is connected/disconnected
− A key on a keyboard is pressed
− A mouse button click
− A phone/video call is received
− A buffer requires more data
− A printer has a paper jam
− A printer runs out of paper
− A printer runs out of ink
− When switching from one application to another
NOTE: If three suitable different errors are described, this can be
awarded three marks.
b) Any one from:
− The computer would only start a new task when it had
finished processing the current task // by example
− Computer will not be able to multitask
− Errors may not be dealt with
− Computer would become impossible to use

Q. Explain why an automatic door that uses a simple sensor and


microprocessor system is unlikely to have an operating system.
[4] (Q13/3175/12/M/J/21)
Ans.

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.

Q. The computer uses a bootstrap. Tick ( ) one box to show the


part of a computer of which the bootstrap is an example.
A. application software. ⬜
B. Firmware. ⬜
C. Hard disk drive. ⬜
D. MAC address ⬜ [1] (Q4d/01/SP/23)
Ans.
• B

TYPES OF PROGRAMMING LANGUAGES, TRANSLATORS AND IDE


Q. 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] (Q10/11/M/J/15)

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]

b) State why a compiler or an interpreter is needed when running


a high-level program on a computer. [1]
c) Give one benefit of writing a program in a high-level language.
[1]
d) Give one benefit of writing a program in a low-level language.
[1]
e) Study the following three sections of code.
A: 1 0 1 0 1 1 0 1
11001110
10110111
B: LDA X
INC X
STA Y

C: FOR x ← 1 TO 10
READ n
ENDFOR

Identify, using the letters A, B or C, which of the above codes is


an example of assembly code, high-level language code or
machine code:
Assembly code ..........................................................................
High level language code ...........................................................
Machine code ...........................................................................
[2] (Q9/12/M/J/15)
Ans.
a) 1 mark per correctly placed tick

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
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)
d) Any one from:
− work directly on registers/CPU

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

Q. Look at these two pieces of code:

a) Which of these pieces of code is written in a high-level


language? [1]
b) Give one benefit of writing code in a high-level language. [1]
c) Give one benefit of writing code in a low-level language. [1]
d) High-level languages can be compiled or interpreted. Give two
differences between a compiler and an interpreter. [2]
(Q12/01/SP/16)
Ans.
a) code B
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
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
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

Q. Complete the following by writing either compiler, interpreter


or assembler in the spaces provided.
................................ – translates source code into object code
............................... – translates low-level language into machine code
............................... – stops the execution of a program as soon
as it encounters an error. [3] (Q1/12/M/J/16)
Ans.
compiler
assembler
interpreter

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)

Q. High-level or low-level languages can be used when writing a


computer program.State two advantages of using a high-level
language and two advantages of using a low-level language. [4]
(Q6/13/O/N/16)
Ans.
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

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.

Q. Programmers can use a high-level language to write a


computer program.
a) Explain hat is meant y the term ‘high-level language’. 2
b) A program written in a high-level language is translated into
machine code. This is so that it can be processed by a
computer. Name one type of translator that can be used. [1]

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

Q. Selma writes the following four answers in her Computer


Science examination.State which computer terms she is
describing.
“It ta es source code ritten in a high level language and
translates it into machine code. It translates the whole of the
source code at once.”
Selma is describing ........................................................ [1]
(part of Q6/12/O/N/17)
Ans.
Compiler

Q. ix statements a out assem ly language are sho n. ic


hether the statement is true or alse.

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

Q. Dimitri is writing a computer program in a high-level


language.He needs to send just the machine code for the
program to his friend, electronically.It is important that the
program is executed as quickly as possible.Identify which
translator will be most suitable for Dimitri to use. Explain your
choice. [4] (Q8/12/M/J/18)
Ans.
1 mark for correct translator, 3 marks for explanation:
– Compiler
Any three from:
– Does not require recompilation // compiled program can be
executed without a compiler...
– ... therefore, allows faster execution
– Provides an executable file...
– ...therefore, allows him to just send machine code
– Dimitri’s friend does not need translation/compilation
software to execute the program

Q. a) Many programmers write computer programs in high-level


languages. The programs need to be translated into machine
code to be read by the computer. State two types of translator
that can be used. [2]
b) Explain two reasons why a computer programmer may choose
to write a program in a high-level language, rather than a low-
level language. [4]
c) Three examples of computer code are given in the table. Tick
(✓) to show whether each example of computer code is High-
level language, Assembly language or Machine code. [3]

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

• The program can be used on many different platforms


• « because it is written in source code
• « because it is compiled into object code

• They have built-in functions/libraries


• « this saves time when writing the program

• Do not need to manipulate memory addresses directly


• « therefore, specialist knowledge of this is not required

• Only need to learn a single language


• « as this can be used on many different computers

c)

Q. David is writing a program using a high-level language. The


program will be published and sold for profit.
a) David uses an interpreter when creating the computer
program. State three features of an interpreter. [3]
b) David compiles the program when he has completed it. Explain
two benefits of compiling the program. [4] (Q7ab/13/O/N/18)
Ans.
a) Three from:
• It is a translator
• Translates (high level language) to low level language
• Executes one line at a time
• Translates source code line by line
• Runs error diagnostic
• Produces error messages to tell user location of error
• Stops execution when encounters errors
• Continues translating when an error is fixed

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

Q. Annie writes a paragraph of text as an answer to an


examination question about programming languages. Using
the list given, complete Annie’s ans er y inserting the correct
six missing terms. Not all terms will be used.
• Assembly
• Converter
• Denary
• Hexadecimal
• High-level language
• Low-level language
• Machine Code
• Source Code
• Syntax
• Translator
The structure of language statements in a computer program is
called the....................................................................... . A
programming language that uses naturallanguage statements
is called a ....................................................................... .
When programsare written in this type of language they need
a ....................................................................... toconvert
them into ....................................................................... .A
Programming language that is written using mnemonic codes is
called a....................................................................... . An
example of this type of language
is....................................................................... language. [6]
(Q7/11/M/J/19)
Ans.
1 mark for each correct term, in the correct place:
• Syntax
• High-level language
• Translator
• Machine code
• Assembly
• Low-level language

Q. A programmer uses a high-level language to write a computer


program.
a) our statements are given a out high level programming
languages. ic to sho i each statement is rue or alse.

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)

Q. Programs can be written in a low-level language.


a) Identify three features of a low-level language. [3]
b) Give two examples of a low-level language. [2]
c) Give one drawback of writing programs in a low-level
language, instead of a high-level language. [1] (Q9/11/M/J/20)
Ans.
a) Any three from:
− Closer to/is machine code
− May use mnemonics
− May need an assembler to be translated
− One line of code represents a single instruction
− Machine dependent
− Have direct access to memory locations/registers
b) − Assembly code − Machine code
c) Any one from:
− It is more difficult to understand
− Error prone
− Have to manipulate memory locations
− Machine dependent

Q. Both an interpreter and a compiler can be used when writing a


program in a high-level language.
a) Explain why a programmer would make use of both an
interpreter and a compiler. [4]
b) Give three reasons why a programmer would choose to write a
program in a high-level language, instead of a low-level
language. [3] (Q2/12/M/J/20)
Ans.
a) Any four from:
− To translate the high-level language into low-level language
− Interpreter used whilst writing the program
− Interpreter used to debug code line by line
− Compiler used when program completed
− Compiler used to create separate executable file (so compiler
no longer needed)
− If it runs first time in a compiler there are no syntax errors
b) Any three from:

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

Q. A programmer can use translators, such as an interpreter and a


compiler, when developing a computer program.
a) Give one similarity between a compiler and an interpreter. [1]
b) Describe two differences between a compiler and an
interpreter. [4]
c) Identify one other type of translator. [1] (Q6/12/O/N/21)
Ans.

Q. Jason is a programmer who writes computer programs in a


high-level language.
a) Describe what is meant by a high-level language. [3]
(4a/12/M/J/22)
Ans. Any three from:
• It uses English-like statements
• It needs to be converted to machine code (to be processed by a
computer)
• … using a translator
• It is portable
• One line of code can perform multiple commands

Q. A compiler and an interpreter are two different types of


translator.
a) One similarity between a compiler and an interpreter is that
they both translate high-level language into machine code.
i) Give one other similarity between a compiler and an
interpreter. [1]
ii) Explain two differences between a compiler and an
interpreter. [4]
(Q6/11/M/J/22)
Ans.
i) They both report/check for errors
ii) Four from (MAX 2 per translator)
• An interpreter translates the code line by line (and executes
each line immediately)
• … whereas a compiler translates the whole code at the same
time (before executing it)

2210 Page 16
time (before executing it)

• A compiler produces an executable file


• … but an interpreter does not

• An interpreter is required to run the code each time if used


• … whereas a compiler is not

• An interpreter stops and reports an error as it is encountered


• … whereas a compiler creates a report of all errors at the end of
translation

• An interpreter will run code up to the point it finds an error


• … whereas a compiler will not run the code at all if an error is
found

Q. A programmer uses a high-level language to create a computer


program.
a)
i) Identify two advantages to the programmer of using a high-
level language instead of a low-level language. [2]
ii) Suggest one disadvantage to the programmer of using a high-
level language instead of a low-level language. [1]
b) The programmer uses an integrated development environment
(IDE) when creating the computer program. State what is
meant by an IDE. [1] (Q5/01/SP/23)
Ans. a)
i) Any two from:
• it is easier / quicker to read/write/understand
• it is easier / quicker to debug
• code is portable.
ii) Any one from:
• not able to directly manipulate the hardware
• may need to wait for translation before running
• program may be less efficient
b) Software that provides useful functions for a programmer
writing a computer program.

Q. Complete the statements about different types of


programming language. Use the terms from the list. Some of
the terms in the list will not be used. You should only use a
term once.

The structure of language statements in a computer program is


called the ............................................. .
A programming language that uses natural language
statements is called a ............................................. language.
When programs are written in this type of language they need
a ............................................. to convert them
into ............................................. .
A programming language that is written using mnemonic codes
is called an ............................................. language.
This is an example of a ............................................. language.
[6]

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

You might also like