0% found this document useful (0 votes)
52 views

Software (CH#4)

The document discusses different types of software including system software like operating systems, utility software, and device drivers as well as application software. It also discusses utility programs that provide useful functions like virus checking, file compression, backups, and more.

Uploaded by

Ahyaan Bhai 2
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)
52 views

Software (CH#4)

The document discusses different types of software including system software like operating systems, utility software, and device drivers as well as application software. It also discusses utility programs that provide useful functions like virus checking, file compression, backups, and more.

Uploaded by

Ahyaan Bhai 2
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/ 35

TYPES OF SOFTWARE & ITS INTERRUPTS

Software
It refers to a set of Computer Programs, Procedures and associated documents describing the programs,
and how they are to be used. Software acts as the bridge between the user and the hardware. So,
without software hardware is useless. There are two types of Software i.e. System Software &
Application Software

Hierarchy Of Software’s

Computer Science By Usman Panwala


System Software
It is a type of Computer Program that is designed to run a computer’s hardware and application
programs. There are three types of System Software.

 Operating System
 Utility Software
 Device Driver

General features of system software


 set of programs to control and manage the operation of computer hardware
 provides a platform on which other software can run
 required to allow hardware and software to run without problems
 provides a human computer interface (HCI)
 controls the allocation and usage of hardware resources.

Typical System Software

Computer Science By Usman Panwala


Application Software
Application Software is a software that is designed for a specific purpose.

General features of application software


 used to perform various applications (apps) on a computer
 allows a user to perform specific tasks using the computer’s resources
 may be a single program (for example, NotePad) or a suite of programs (for example, Microsoft
Office)
 user can execute the software as and when they require

Typical Application Software

Computer Science By Usman Panwala


Utility Programs
Utility software (utilities) provides a number of useful programs tp protect the computer and the user
and also give the user software tools to carry out some of the day-to-day maintenance.

Virus Checker
Defragmenter
Disk repair
A small program that replicates
Defragmentation software tides up
itself and can delete or modify Disk repair software verifies if an
the hard disk drive as it begins to
important files. Antivirus software error has been found in the desk
reach its maximum capacity. A disk
looks for malware ‘clues’ or directory; it will then attempt to
defragmenter works by rearranging
recognises it from a database of correct the error if possible. The
blocks of data (by removing space
known viruses. Virus checkers run in repair process will remove or
left from the earlier deletion of data)
the background and need to be bypass damaged/corrupted data/
So that they can now become
regularly updated. They make use disk sectors and then link blocks
Contiguous (rather than randomly
of heuristic checking (this looks for of data together to allow files to
stored across various sectors). This
software behaviour that could be read (some data may be lost in
frees up disk space and also makes
indicate a possible virus). Once an the process).
location of data a faster process.
infected files is discovered it is
quarantined and then deleted

File compression Back-up software

File compression can either be lossy Back-up files are essential in case
or lossless. With lossy file Utility Programs files/data become corrupted or
compression, the original file lost and are needed to recover the
cannot be reconstructed following Software tools that allow data. They are either done
the compression process. With the user and computer to automatically or initiated by the
lossless file compression, the specific tasks to maintain user. Many OS offer the ability to
original file can once again be the computer restore a computer status to a
reconstructed. Lossy file sizes are point in the past using backed up
much smaller than lossless files. data

Device drivers

Device driver is the name given to Screensavers


software that enables one or more
Screensavers are moving or still
hardware device to communicate with a
Security images on a computer screen that
computer’s operating system. All hardware
devices connected to computers have an are initiated after a period of
The security system manages access
associated device driver. As soon as the inactivity. They are part of the
control to a computer. It links into
device is plugged into one of the USB security system since
other software such as virus
ports, the OS looks up the appropriate Screensavers automatically log
checkers and firewalls, and uses a driver or the user will be instructed to out a user if they have left the
firewall to protect the computer download an appropriate driver from the computer unlocked and there has
when automatic software updates internet (or from an accompanying DVD). been no activity for, for example,
are requested. It makes use of All USB device drivers contain information
5 minutes; the user then needs to
encryption to safeguard data. known as descriptors (these include
log back in. They are often used to
vendor ID, product ID and unique serial
Computer Science
number). If aBy Usman
device Panwala
has no serial number activate background tasks, such as
(one of the required descriptors), The OS virus scans, when initiated.
treat it as a new device every time it is
plugged int the computer.
Operating System
Acts as a medium of communication between user and computer known as Operating System. An
operating system also disguises the complexity of computer software and hardware. Common examples
of operating systems include: Microsoft Windows, Apple Mac 05, Google Android and Apple IOS (the
latter two being used primarily on tablets and smartphones).

Most computers store the operating system on a hard disk drive (HDD) or solid state drive (SSD) since
they tend to be very large programs. Mobile phones and tablets store the operating system on a solid
state device since they are too small to accommodate an HDD.

Computer Science By Usman Panwala


Management (OS)
Memory Management
Memory management is essentially management of the primary storage (RAM) and the data being
moved between RAM and HDD/SSD. It keeps track of all the memory location.
This part of the OS carries out memory protection to prevent two competing applications from using the
same memory locations at the same time. This would otherwise lead to a potential computer crash,
security issues or loss or corruption of data.

Security Management
Security management ensures the integrity, confidentiality and availability of data.

This can be achieved by:

 Overseeing software updates when they become available


 Ensuring the latest version of software is always being run (which often contains revised security
fixes)
 Running antivirus software and using a firewall to check all traffic to and from the computer
 Maintaining access rights for all users
 Carrying out data recovery and system restore.

Hardware Peripheral Management


Hardware management uses device drivers to allow input and output to take place. It manages the
queues and buffers to ensure data is being handled correctly and that the CPU performs to its maximum.

File Management
File management maintains file directories and file naming conventions. It can perform file maintenance
tasks such as open, close, delete, rename, copy and so on. File management also ensures access rights
are maintained as part of security and correct memory allocation of the data when it is read from the
HDD/SSD and saved temporarily in RAM.

Multitasking
Multitasking allows a computer to carry out more than one task simultaneously. To allow this to happen,
the OS needs to constantly monitor the status of each process by ensuring:

 All resources are allocated specific processor time


 All processes can be interrupted as and when necessary
 Priorities are used so that a given resource is used in the most efficient manner and that the
required resources are made available as and when necessary

Computer Science By Usman Panwala


Management Of User Accounts
User account management allows more than one user to log into the computer by ensuring each user’s
data is stored in a separate part of memory. Each user logging onto a computer is given a user account
area, which is protected by a username and a password. Each user can customise their screen layout and
manage their own files and folders. An administrator oversees the management of user accounts.

Human Computer Interface (HCI)


The human computer interface (HCI) is in the form of a Command Line Interface (CLI) or a Graphical User
Interface (GUI).

A CLI requires a user to type in instructions in order to choose options from menus, open software, etc.
There are often a number of commands that need to be typed in, for example, to save or load a file. The
user has to therefore learn a number of commands just to carry out basic operations. It is also slow
having to key in these commands every time an operation has to be carried out. However, the advantage
of CLI is that the user is in direct communication with the computer and is not restricted to a number of
pre-determined options.

A GUI allows the user to interact with a computer (or MP3 players, gaming devices, mobile phone, etc)
using pictures or symbols (icons) rather than having to type in a number of commands.

More recently, devices such as mobile phones and tablets increasingly use touch screens and use post-
WIMP interactions. With this system, fingers are in contact with the screen allowing actions such as
pinching and rotating, which would be difficult to do using a single pointer and a device such as a mouse.

Differences Between GUI AND CLI

Computer Science By Usman Panwala


Interrupt
An INTERRUPT is a signal sent from a device or from software to the processor

OR

A signal sent to a processor which may cause a break in execution of the current routine according to
priorities

OR

- A signal sent from a device / software

- Request processor time // Processor stops to service interrupt

- Interrupts have different priorities

Three types of Interrupt


1. Hardware Interrupt
2. Software Interrupt
3. User Interrupt

Interrupt
An interrupt is a signal sent from a device or software (or it can be an internal signal) to the
microprocessor. This will cause cause the microprocessor to temporarily stop what is doing so it can
service the interrupt. Causes of interrupts include those shown below.

Cause Of Interrupt

Timing Signal Input/Output Hardware Fault User Interaction Software error


Process

All operations are


An interrupt can For Example, if an
coordinated by An interrupt can
be generated For example, if a user exe file cannot be
internal clock; if occur if, for
when a hard disk presses the <BREAK> found or two
any operation is example, a printer
drive or a printer. key this will send an processes are trying
out of synch has a printer jam, or
For example, are interrupt signal to the to access same
(doesn’t match run out of paper or
requesting more microprocessor memory location or
timing signal) then ink
data to be sent there is a division by
an interrupt is sent
zero error

Computer Science By Usman Panwala


This will cause the processor to temporarily stop what it is doing and service the interrupt

 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

Interrupts allow computers to carry out many tasks or to have several windows open at the same time

An example would be downloading a file from the internet at the same time as listening to some music
from the computer library. Whenever an interrupt is serviced, the status of the current task being run is
saved. This is done using an INTERRUPT HANDLER and once the interrupt has been fully serviced, the
status of the interrupted task is reinstated and it continues from the point prior to the interrupt being
sent

Following are the devices that make use of Interrupt

Keyboard, Mouse and Printers

Buffers
BUFFERS are used in computers as a temporary memory area.

These are essential in modern computers since hardware devices operate at much slower speeds than
the processor.

If it wasn’t for buffers, processor would spend the majority of their time idle, waiting for the hardware
device to complete its operation. Buffers are essentially filled from the processor or memory unit and
whilst these are emptied to the hardware device, the processor carries on with other tasks. Buffer are
used, for example, when streaming a video from the internet. This ensures that the video playback
doesn’t keep on stopping to wait for data from the internet.

Computer Science By Usman Panwala


TYPES OF PROGRAMMING LANGUAGE,
TRANSLATORS AND INTEGRATED
DEVELOPMENT ENVOIRNMENT (IDE)
Programming Language
Formal language designed to communicate instructions to a computer

Program
A computer program is a set of instructions to perform a certain task.

OR

Programs are our way of telling a computer what to do. How to do it and when to do it. This enables a
single computer to perform many different types of task

 A Program can be written in High Level Language (Java, Python, C-Language, C# and Basic etc)
 A program can also be written in Low Level Language (Assembly Language and Machine codes)

Block Diagram of programming language with language translator

Computer Science By Usman Panwala


Types Of Programming Languages
There are three types of Programming Language covered in this area.

1. High Level Language


2. Assembly Language (Low Level Language)
3. Machine Codes (Low Level Language)

High Level Language


High Level Language is closer to human language (closer to English).

It is an Independent of a particular type of computer/device/platform.

It is a portable language

For Example: Such as python, Java, Pascal, etc

 It is a user Understandable Language


 Easy to understand by the human
 Programming language that uses natural
 Language statements is called High Level Language
 With High Level Language, the programmers only needs to know the language its self
 No Knowledge of the Hardware and Instruction set of the computer using the program is
required
 Many Programming Language are portable
 Once a programmer has learnt the techniques of programming in any high-level language, these
can be transferred to working in other high-level languages.

Benefits of Programming in High Level Language


 Easier to read and understand as the language is closer.
 Less time taken to write High Level Language program.
 Easier to debug/finds errors (especially if an IDE is used).
 Portability: Write once, run anywhere
 Read and understand as the language used is closer to human language.
 Write in a shorter time.
 Debug at the development stage.
 Maintain once in use.

Examples of High Level Language


Java, Python, C Language, C#, C++, Pascal and BASIC are the example of High Level Languages.

Computer Science By Usman Panwala


Low Level Language
 Low Level Languages have to do with the specific architecture and hardware of a particular type
of computer
 Low Level Language are referred to as “LOW” because they are very closed to different hardware
of a computer
 Low Level Language are machine oriented and require extensive knowledge of computer
hardware and its configuration
Low Level Language
Machine Code/ Language Assembly Language

Benefits of Programming in Low Level Language


 Can be used to make use of special hardware
 Can be used to make use of special machine-dependent instructions
 Doesn’t take up as much space in primary memory
 Code run more quickly
 Can address memory address directly
 No need for compilers/interpreters

Assembly Language (Low Level Language)


Assembly Language is used when there is a very strong (but often not one-to-one) correspondence
between the language and the architecture’s machine code instructions.

OR

Assembly language is the first step to improve the programming structure and make machine language
more readable by humans.

 Assembly is difficult to understand


 It is Low Level Language
 Assembly language uses mnemonic codes
 Assembly language is often used to create drivers for hardware.
 Assembly language is specific to the computer hardware
 Assembly Language consist set of ‘Symbols’ and ‘Letters’
 A translator is required to translate Assembly Language into Machine Language is called
ASSEMBLER
 Many of the earliest computer programs were written in assembly languages.
 Most programmer today don’t used assembly language very often, But there is still used for
applications like Operating System (OS) Device Drivers, Electronic Devices and Technical
applications which used very precise timings or optimization of computer resources

Computer Science By Usman Panwala


Benefits of programming in Assembly Language
 To make use of special hardware
 To make use of special machine-dependent instructions
 To write code that doesn’t take up much space in primary memory
 To write code that performs a task very quickly

Mnemonics
“Mnemonics is a instruction code used in assembly language”

Assembly language assigns mnemonics code to sets of machine code to make them more
understandable.

Some example of Mnemonics are:


LDA means load the value of the variable into the accumulator

ADD means add the value of another variable to the value stored in the accumulator

SUB To use subtraction in a calculation

INP Require a user to give an input

OUT Output data

In Low Level Language each line of code will perform only one task.

The following code is an example of a simple addition program in assembly language with a command
and its explanation on the right (after #)

INP #asks the user to give an input e.g. a number

STA ONE #store the number input in an address named ONE

INP # asks the user to give a 2nd input e.g. a number

ADD ONE #adds the second input to the number stored in ONE

OUT #outputs the result

HLT #stops the program

Computer Science By Usman Panwala


Machine Language (Code)
 Language that is directly understood by the computer and it does not need to be translated
 Language which is understand by the computer or machine
 All the instructions are in Binary notations and are written in the form of 1s and 0s.
 For example 110011100110000011111
 Machine language is the only language which computer hardware understands.
 However Binary notation is very difficult for human to understand
 This is why Assembly language is come in

Low Level Language High Level Language


Example include machine code and Assembly Example include C, Java and Python
language
Difficult for human to understand but can be Much easier for humans to understand and much
easily executed by a computer, A computer’s closer to natural language
native language
Needs an assembler to be processed Needs to be translated by a compiler or an
interpreter
One line of code does one thing One line of code do several things

Integrated Development Environment (IDE)

Computer Science By Usman Panwala


An integrated development environment (IDE) is a suite of software development tools used by
programmers to aid the writing and development of programs. Example include PyCharm (for Python),
Visual Studio (for Visual Basic) or BlueJ (for Java) as your IDE. IDEs speed up the development of
computer software by providing development tools in one application. They usually have several
features.

Code editor Allows a program to be written and edited without the need to use a separate
text editor, speeding up the program development process

Can be a compiler and/or an interpreter


Translator
Enables the program to be executed under the control of the IDE

Runs a program under development

Allows a programme to step through the the program a line at a time (single stepping)
Runtime and
debugger Allows a programmer to set a breakpoints

A report window shows the contents of variables and expressions, which allows the
programmer to check for logic errors in the program

Features
Error Finds possible errors as the program code is being typed
diagnostics

Auto- Context-sensitive prompts with text completion for variable names and
completion reserved

Auto- Alerts the programmer to errors and provides suggested corrections


correction

Auto Auto-documenter explains the function and purpose of key words.


documenter
and Prettyprinting colour codes the words in the program and lays the program
prettyprinting out clearly.

Computer Science By Usman Panwala


Concept of Language Translator

Computer Science By Usman Panwala


Compiler
A compiler translates a program from High Level Language into machine code all at once

OR

A compiler translates Source Code into Object Code as a whole program

Features Of Compiler
 Translate a whole High Level Language Program into machine code in one go
 Once translated the compiler does not need to be present for the program to run
 Produces an executable file of machine code
 Once High Level Language statement can be translated into several machine code instructions
 Once a program is compiled, there is no need for recompilation
 An executable program is usually distributed for general use
 Generates an error report at the end of translation of the whole program
 Provides error diagnostics
 An executable file is produced
 The program will not run at all if an error is detected
 Optimize the source code (to run efficiently)

Benefits Of Compiler
1. Produces executable file
This creates a smaller file size
More saleable
2. Program will be machine independent / portable
It can be used on any hardware
3. No need for compiler to run executable file
It will be quicker to run
Customers can just execute the program
4. Source code cannot be accessed
Therefore, code cannot be stolen / plagiarised

Computer Science By Usman Panwala


Interpreter
A program which translates High Level Language int machine code but line by line statement is called
Interpreter

OR

An interpreter executes a program written in a High Level Language in one line at a time.

Features Of Interpreter
 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

Integrated Development Environment (IDE)


An IDE is an interactive / Integrated Development Environment, It is usually includes a Source code
editor, Build automation tools and a Debugger

Assembler
A program which converts assembly language into machine code is called assembler

OR

A program which translates Low Level Language into machine code is called assembler

Features Of Assembler
 Translates of Low Level Language into machine code
 Produces an executable file of machine code
 One Low Level Language statement is usually translated into one machine code instruction
 Once a program is assembled, there is no need for reassembly
 An assembled program is usually distributed for general use

Computer Science By Usman Panwala


Summary Of Translators
Compiler Interpreter Assembler
Translates a high-level language Executes a high-level language Translates a low-level language
program into machine code program a statement at a time program into machine code
An executable file of machine No executable file of machine An executable file of machine
code is produced code is produced code is produced
One high-level language One high-level language One low-level language
statement can be translated into program statement may require statement is usually translated
several machine code several machine code into one machine code
instructions instructions to be executed instruction
Compiled programs are used Interpreted programs cannot be Assembled programs can be
without the compiler used without the interpreter used without the assembler
A compiled program is usually An interpreted is often used An assembled program is usually
distributed for general use when a program is being distributed for general use
developed

Syntax
The structure of language statements in a computer program is called Syntax

Syntax Error
“A word Syntax means rules and regulations of writing a program in a language”

“A syntax Error is an error in the source code of a program”

“A syntax error occurs when a user (or programmer) has put words in an order that a program does
not understand”

Since computer programs must follow strict syntax to compile correctly, any aspects of the code that do
not confirm to the syntax of the programming language will produce a Syntax error

Logical Error
“A logic error (or logical error) is a mistake in a program’s source code that results is incorrect or
unexpected behaviour”

OR

“In computer programming, a logic error is a bug in a program that causes it to operate incorrectly, but
not to terminate abnormally (or crash)”

It is a type of runtime error that may simply produce the wrong output or may cause a program to crash
while running

Computer Science By Usman Panwala


Executable File
A file format that a computer can directly process

Filename.exe

Bug
In computer technology, a bug is a “Coding Error” in a computer program

Debugging
The process of finding bugs (errors) before program users do is called Debugging

Source Code (Coding)


“A program written in any language except the machine code is called source Code”

OR

“Source code is written in High Level Language or assembly language”

 Coding means to write down the program in High Level or assembly


 Source code is the fundamental component of a computer program that is created by a
programmer
 It can be read and easily understood by a human being
 Source code is a human readable instruction in a programming language, to be transformed into
machine instructions by a compiler, assembler or other translator, or to be carried out directly by
an interpreter
 Source code is easy to understand
 Source code is easy to modify
 Source code contains fewer statements than object code

Computer Science By Usman Panwala


Object Code
“Object code is produced when compiler / interpreter / assembler translates source code into
recognizable and executable machine code”

OR

“A translated source program is called Object Code”

OR

“An output screen after translation process is called Object code”

 Object code is a set of instructions codes that is understood by a computer at the lowest
hardware level

PAST PAPER QUESTION


May/June 2015. P11

Q10. Five statements about interpreters and compilers are shown in the table below.

Study each statement.

Computer Science By Usman Panwala


May/June 2015. P12

Q9. (a) Five statements about interpreters and compilers are shown in the table below.

Study each statement

(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]

Computer Science By Usman Panwala


(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]

May/June 2016. P12

Q1. 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]

Oct/Nov 2016 P12

Q1. (a) Give two reasons why a programmer would choose to write code in a low-level language.

1 .....................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
2 .....................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [2]

Computer Science By Usman Panwala


(b) High-level languages require either an interpreter or a compiler to translate the program.

The table below lists a number of statements about language translators.

Q2. State four functions of an operating system.

1 …………….......................................................................................................................................................
2 .....................................................................................................................................................................
3 .....................................................................................................................................................................
4 ................................................................................................................................................................ [4]

Oct/Nov 2016. P13

Q6. 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.

High-level language advantage 1 ...................................................................................................................

........................................................................................................................................................................

High-level language advantage 2 ...................................................................................................................

........................................................................................................................................................................

Low-level language advantage 1 ....................................................................................................................

........................................................................................................................................................................

Low-level language advantage 2 ....................................................................................................................

................................................................................................................................................................... [4]

Computer Science By Usman Panwala


Q8. 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.

May/June 2017. P11

Q2. Programmers can use a high-level language to write a computer program.

(a) Explain what is meant by the term ‘high-level language’.


........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [2]

Computer Science By Usman Panwala


(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]

(c) Describe how your answer to part (b) translates this program.
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [3]

Oct/Nov 2017. P13

Q10. Six statements about assembly language are shown.

Computer Science By Usman Panwala


May/June 2018. P11

Q7. 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.

Compiler..........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Interpreter .....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [6]

May/June 2018. P12

Q8. 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.

Type of translator ...........................................................................................................................................


Explanation ....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [4]

Oct/Nov 2018. P12

Q6. (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.

Translator 1 ……………………..............................................................................................................................
Translator 2 ............................................................................................................................................... [2]

Computer Science By Usman Panwala


(b) Explain two reasons why a computer programmer may choose to write a program in a highlevel
language, rather than a low-level language.

Reason 1 .........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Reason 2 .........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [4]

(c) Three examples of computer code are given in the table.

Q8. Describe the purpose of an interrupt in a computer system.


........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
....................................................................................................................................................................[4]

Computer Science By Usman Panwala


Oct/Nov 2018. P13

Q7. 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.

Feature 1 ........................................................................................................................................................
........................................................................................................................................................................
Feature 2 ........................................................................................................................................................
........................................................................................................................................................................
Feature 3 ........................................................................................................................................................
....................................................................................................................................................................[3]

(b) David compiles the program when he has completed it.

Explain two benefits of compiling the program.

Benefit 1 .........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Benefit 2 .........................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [4]

(c) David needs to send a large section of the programming code as an email attachment.

He uses lossless compression to reduce the file size.

Explain how the file size is reduced.


........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
....................................................................................................................................................................[3]

Computer Science By Usman Panwala


May/June 2019. P11

Q7. Annie writes a paragraph of text as an answer to an examination question about programming
languages.

Using the list given, complete Annie’s answer by 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 natural language
statements is called a ....................................................................... . 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 a ....................................................................... . An example of this type of language is
....................................................................... language. [6]

Oct/Nov 2019. P13

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

(a) Four statements are given about high-level programming languages.

Computer Science By Usman Panwala


Q7. The Von Neumann model for a computer system has several components that are used in the fetch-
execute cycle.

(b) Computer systems often use interrupts.

Five statements are given about interrupts.

Computer Science By Usman Panwala


May/June 2020. P11

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

(a) Identify three features of a low-level language.

Feature 1 ........................................................................................................................................................
Feature 2 ........................................................................................................................................................
Feature 3 ................................................................................................................................................... [3]

(b) Give two examples of a low-level language.

Example 1 .......................................................................................................................................................
Example 2 ................................................................................................................................................. [2]

(c) Give one drawback of writing programs in a low-level language, instead of a high-level language.
........................................................................................................................................................................
................................................................................................................................................................... [1]

May/June 2020. P12

Q2. 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.

Reason 1 .........................................................................................................................................................
........................................................................................................................................................................

Reason 2 .........................................................................................................................................................

........................................................................................................................................................................

Reason 3 .........................................................................................................................................................

....................................................................................................................................................................[3]

Computer Science By Usman Panwala


Q8. Leonard has a new laser printer to print letters for his business.

Leonard connects his printer to his computer using the USB port.

(c) An interrupt signal is sent from the printer to the computer.

(i) Give two examples of when a printer would generate an interrupt signal.

Example 1 .......................................................................................................................................................
Example 2 ................................................................................................................................................. [2]

(ii) Many devices send interrupt signals.

Identify the software in the computer that will receive and manage all interrupt signals.
................................................................................................................................................................... [1]

Oct/Nov 2021. P12

Q6. 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.

Difference 1 ....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
Difference 2 ....................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [4]

(c) Identify one other type of translator.


................................................................................................................................................................... [1]

Q9. 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.

1 ……………………..............................................................................................................................................
2 ....................................................................................................................................................................
3 ................................................................................................................................................................ [3]

Computer Science By Usman Panwala


(b) State what would happen if interrupt signals were not used in a computer.
........................................................................................................................................................................
................................................................................................................................................................... [1]

May/June 2022. P11

Q6. 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]

May/June 2022. P12

Q4. Jason is a programmer who writes computer programs in a high-level language.

(a) Describe what is meant by a high-level language.


........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [3]

Computer Science By Usman Panwala


Oct/Nov 2022. P13

Q4. A company wants to manufacture a mobile phone.

(c) The mobile phone has a USB port to allow a USB connection to a computer.

(i) Describe how data is transmitted using a USB connection.


........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
................................................................................................................................................................... [2]

(ii) One benefit of a USB connection is that the cable can only be inserted into the port one way, so an
incorrect connection cannot be made.

Give three other benefits of using a USB connection to connect a mobile phone to a computer.

Benefit 1 .........................................................................................................................................................
........................................................................................................................................................................

Benefit 2 ........................................................................................................................................................
........................................................................................................................................................................

Benefit 3 .........................................................................................................................................................

....................................................................................................................................................................[3]

(d) 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]

Computer Science By Usman Panwala

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy