You are on page 1of 108

Software

Definition of a Software

A set of instructions written in a programming


language that performs one or more tasks to tell
the computer what to do.
"Inner look" on software - basic shop

Code that will be run when the player decides to buy an item
- JUST ONE ACTION
Classification of Software

System Software Application Software


System Software

Definition

A variety of programs that a


computer needs to function.
System Software

Definition Example
• Basic Input Output System (BIOS) - installed in
A variety of programs that a
ROM. Enables all of the attached components to
computer needs to function. initialise. Known as firmware.
System Software

Definition Example
• Basic Input Output System (BIOS) - installed in
A variety of programs that a
ROM. Enables all of the attached components to
computer needs to function. initialise. Known as firmware.
• Operating System - MAC, Windows, Android, iOS.
System Software

Definition Example
• Basic Input Output System (BIOS) - installed in
A variety of programs that a
ROM. Enables all of the attached components to
computer needs to function. initialise. Known as firmware.
• Operating System - MAC, Windows, Android, iOS.
• Device Driver (Part of the OS or Installed manually) -
A software that enables hardwares to communicate
with the operating system (Plug and play).
System Software

Definition Example
• Basic Input Output System (BIOS) - installed in
A variety of programs that a
ROM. Enables all of the attached components to
computer needs to function. initialise. Known as firmware.
• Operating System - MAC, Windows, Android, iOS.
• Device Driver (Part of the OS or Installed manually) -
A software that enables hardwares to communicate
with the operating system (Plug and play).
• Compilers - Translate high-level programming
language into machine code.
System Software

Definition Example
• Basic Input Output System (BIOS) - installed in
A variety of programs that a
ROM. Enables all of the attached components to
computer needs to function. initialise. Known as firmware.
• Operating System - MAC, Windows, Android, iOS.
• Device Driver (Part of the OS or Installed manually) -
A software that enables hardwares to communicate
with the operating system (Plug and play).
• Compilers - Translate high-level programming
language into machine code.
• Utilities Software - Built into the operating system to
carry out a specific task.
System Software

Definition Example
• Basic Input Output System (BIOS) - installed in
A variety of programs that a
ROM. Enables all of the attached components to
computer needs to function. initialise. Known as firmware.
• Operating System - MAC, Windows, Android, iOS.
• Device Driver (Part of the OS or Installed manually) -
Function A software that enables hardwares to communicate
with the operating system (Plug and play).
• Allows software and hardware to
• Compilers - Translate high-level programming
run without problems. language into machine code.
• Provides a human computer • Utilities Software - Built into the operating system to
interface. carry out a specific task.
• Control the allocation and usage
of hardware resources.
Examples of utilities software (1)

• Offered by the operating system


• Must be constantly updated
Virus Checker - Anti Virus Software • How they work
⚬ The software is constantly running
in the background
⚬ Check software of files before
they are run or loaded
⚬ Compare a possible virus against
a database of known viruses
⚬ Any possible files or programs
which are infected are put into
quarantine
Examples of utilities software (2)

Defragmentation Software - When HDD becomes full, blocks used for files will be
scattered all over the disk surface. Data accessing will be faster if files could be stored in
contiguous sectors to reduce HDD head movements.

data data data


data

data data
Examples of utilities software (3)

• Software that communicate with


Device Driver the OS and translate data into a
format understood by a
hardware device (middle man)
• Without device drivers, a
hardware device would be
unable to work with a computer
• As soon as a device is plugged
into a USB port, the OS looks for
appropriate device driver
Examples of utilities software (4)

• It is a good practice to use the operating system


back-up utility
Backup Software • Allow a schedule for backing up files to be made
• Total security
⚬ Working version stored in SSD/HDD
⚬ Locally backup stored in removable SSD/
HDD
⚬ Cloud Storage
• OS
⚬ Windows - File History
⚬ MacOS - TimeMachine
Application Software

Definition

Software that a user needs to


make use of the computer
system
Application Software

Definition Examples

Software that a user needs to • Word Processor


make use of the computer • Spreadsheet
system • Database
• Video Editing Software
• Apps
• Music and video streaming
• GPS
• Camera facility
Application Software

Definition Examples

Software that a user needs to • Word Processor


make use of the computer • Spreadsheet
system • Database
• Video Editing Software
Features • Apps
• Music and video streaming
• Used to perform various
applications (apps) on a computer • GPS
• Allows a user to perform specific • Camera facility
tasks using the computer’s
resources
Classification of Software

System Software - The


Manager

Responsible for managing the


hardware and other software in a
computer

Eg. BIOS, OS, Device Driver, Utilities


Classification of Software

System Software - The Application Software -


Manager The Independent

Responsible for managing the Allows the user to perform different


hardware and other software in a tasks using the computer
computer

Eg. BIOS, OS, Device Driver, Utilities Eg. Word Document, Spreadsheet,
Video Editing Software, Games
Chapter 4.2

Operating
System
History
• Computer used to run only one
program at a time
• Program (written in punch card)
needs to be inserted one by one into
the computer manually
• This approach slows down
computation
• It is also difficult to integrate a
hardware (input and output devices)
with the computer
• We need a way in which program
can operate automatically
• This leads to the creation of
operating system
History

62,500 punch cards


= 5MB
Imagine inserting these
program one by one into
the computer...
About the Operating System
• It is a system software
• OS has the privilege of managing other
programs
• It is the first program to be launched (by the
BIOS) when a computer is turned on
• OS is an intermediaries between software
programs and hardware peripherals (Driver)
• Stored within the SSD/HDD, loaded into
RAM when a particular action needs to be
carried out
Main function of the operating system

Enable computer system to function correctly

Allow users to communicate with computer systems


7 Main Functions Of
The Operating System
HCI

Human computer interface


The OS provides an interface which allow the user to communicate with the
computer.
HCI

Human computer interface


The OS provides an interface which allow the user to communicate with the
computer.

3 types of HCI

Command Line
Interface
• User needs to learn a
number of commands
• Direct communication with
the computer and is not
restricted to a number of
predetermined options
HCI

Human computer interface


The OS provides an interface which allow the user to communicate with the
computer.

3 types of HCI

Command Line Graphical User


Interface Interface
• User needs to learn a • Interaction using pictures
number of commands of symbol (instead of
• Direct communication with command)
the computer and is not • WIMP (Windows Icon
restricted to a number of Menu and Pointing Device)
predetermined options • Phones touch screen
(pinch and rotate)
HCI

Human computer interface


The OS provides an interface which allow the user to communicate with the
computer.

3 types of HCI

Command Line Graphical User Voice Command


Interface Interface Interface
• User needs to learn a • Interaction using pictures • Smart Speaker (Google
number of commands of symbol (instead of Home and Amazon Alexa)
• Direct communication with command) • Virtual Assistant (Siri)
the computer and is not • WIMP (Windows Icon
restricted to a number of Menu and Pointing Device)
predetermined options • Phones touch screen
(pinch and rotate)
HCI

Compare and Contrast CLI and GUI

Command Line
Interface

• The user is in direct communication with the


computer
• Uses a small amount of computer memory

• Need to learn a lot of commands


• Each command must be typed in correctly in terms
of format and spelling
HCI

Compare and Contrast CLI and GUI

Command Line Graphical User


Interface Interface

• The user is in direct communication with the • It is more user-friendly; icons are used to represent
computer applications
• Uses a small amount of computer memory • The user doesn’t need to learn any commands

• Need to learn a lot of commands • Use up more computer memory than CLI
• Each command must be typed in correctly in terms • The user is limited to icons provided on the screen
of format and spelling
HCI MM

Memory Management

VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS

ADDRESS BUS
Central Processing Unit (CPU)

CU
MAR When a program is
PC

MDR needed, its code will be


CIR

ALU ACC
loaded from the
Secondary Storage into
Input Output
Memory Unit (RAM)
the Primary RAM, but who
Load executable code
when needed does it????
Secondary Storage
(HDD, SSD, Removable Disk, CD)
HCI MM

Memory Management

VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS

ADDRESS BUS
OS does it! OS will...
Central Processing Unit (CPU)
• Track of all the memory locations
MAR
CU
PC

MDR

CIR

ALU ACC

Input Memory Unit (RAM) Output

Load executable code


when needed

Secondary Storage
(HDD, SSD, Removable Disk, CD)
HCI MM

Memory Management

VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS

ADDRESS BUS
OS does it! OS will...
Central Processing Unit (CPU)
• Track of all the memory locations
CU
MAR
• Carries out memory protection to
PC

MDR
ensure that two competing applications
CIR cannot use the same memory locations
ALU ACC
at the same time

Input Memory Unit (RAM) Output

Load executable code


when needed

Secondary Storage
(HDD, SSD, Removable Disk, CD)
HCI MM

Memory Management

VON NEUMANN ARCHITECTURE CONTROL BUS

DATA BUS

ADDRESS BUS
OS does it! OS will...
Central Processing Unit (CPU)
• Track of all the memory locations
CU
MAR
• Carries out memory protection to
PC

MDR
ensure that two competing applications
CIR cannot use the same memory locations
ALU ACC
at the same time
• Make sure enough hardware is
Input Memory Unit (RAM) Output allocated to perform the necessary
process
Load executable code
when needed

Secondary Storage
(HDD, SSD, Removable Disk, CD)
HCI MM MT

Multitasking - allows the computer to carry out


more than 1 task at a time

Sharing hardware resources

• Each of the processes will share the


hardware resources under the control of
the operating system software.
HCI MM MT

Multitasking - allows the computer to carry out


more than 1 task at a time

Pre-emptive multitasking

Sharing hardware resources • Resources are allocated to a process for a


specific time limit
• Each of the processes will share the • The process can be interrupted while it is running
hardware resources under the control of • The process is given a priority so it can have
the operating system software. resources according to its priority (the risk here is
that a low priority process could be starved of
resources)
HCI MM MT HPM

Hardware Peripheral Management

Meaning of peripheral devices Roles of the OS: Carry out Hardware Management

• Use device driver


⚬ Communicates with all input and output
devices
⚬ Take data from a file (defined by the operating
system) and translates it into a format that the
input/output device can understand
• Ensures each hardware resource has a priority so
that they can be used and released as required
HCI MM MT HPM UAM

User Account
Management

A computer can have more than one user to log into


the account. Eg.
It is therefore important
that users’ data is stored
in separate parts of the
memory for security
reasons.
HCI MM MT HPM UAM

User Account
Management

Role of an administrator

• Oversees the management of these user accounts


• The administrator can create accounts, delete user
accounts and restrict user account activity (create,
edit and delete file)
HCI MM MT HPM UAM FM

File management

Main tasks of file management include:


• file naming conventions which can be used i.e.
filename.docx (where the extension can
be .bat, .htm, .dbf, .txt, .xls, etc.)
• performing specific tasks (for example, create,
open, close, delete, rename, copy, and move)
HCI MM MT HPM UAM FM

File management

Main tasks of file management include:


• file naming conventions which can be used i.e.
filename.docx (where the extension can
be .bat, .htm, .dbf, .txt, .xls, etc.)
• performing specific tasks (for example, create,
open, close, delete, rename, copy, and move)
• maintaining the directory structures
• ensuring memory allocation for a file by reading it
from the HDD/SSD and loading it into memory.
HCI MM MT HPM UAM FM SEC

Security Management

Main tasks of security management include:


• Ensures that anti virus software (and other security software) is always up to date,
preserving the integrity, security and privacy of data
• Maintains access rights for all users
• Communicates with a firewall to check all traffic to and from the computer
• By offering the ability for the recovery of data when it has been lost or corrupted (eg.
Apple Time Machine)
Human Computer Interface

Memory Management
7 Main Functions
Multitasking
Of
Hardware Peripheral Management
The Operating
User Account Management System
File Management

Security Management
EXAM QUESTION
EXAM QUESTION
Chapter 4.3
Running of
Application
Introducing BIOS (Basic Input/Output System)
• Known as firmware (a tangible
electronic component with embedded
software instructions, such as a
BIOS)
• The BIOS settings are stored on a
CMOS chip (complementary metal-
oxide-semiconductor)
⚬ BIOS settings would be reset if
the battery was removed or
disconnected
• Responsible for booting up the
computer by loading part of the
operating system from secondary
storage into RAM
Application Software Running Sequence

Power On

Hardware
Application Software Running Sequence

Bios checks if every


Power On hardware is working
fine

Firmware
Hardware
(BIOS)

Loads the
BIOS
program
located in
the ROM
Application Software Running Sequence

Bios checks if every


Power On hardware is working
fine

Firmware Operating
Hardware
(BIOS) System

Loads the BIOS loads


BIOS the
program operating
located in system
the ROM
Application Software Running Sequence

Bios checks if every


Power On hardware is working Operating System
fine takes over

Firmware Operating Application


Hardware
(BIOS) System Software

Loads the BIOS loads


BIOS the
program operating
located in system
the ROM
Chapter 4.4: Software

INTERRUPT
IGCSE CS
DEFINITION OF
INTERRUPT
AN INTERRUPT IS WHERE A SIGNAL IS SENT
FROM A DEVICE OR A PROGRAM TO THE
OPERATING SYSTEM THAT CAUSES A
TEMPORARY STOP.
EXAMPLES OF AN
INTERRUPT : YOU TRY

Try to create two Try to perform 5/0


folders that have in your calculator
the same name
OTHER EXAMPLES OF AN
INTERRUPT
A hardware fault Software error
(Printer out of ink,
paper jam)

A timing signal
FUNCTION OF AN
INTERRUPT

CAUSE THE CURRENT PROGRAM TO


TEMPORARILY STOP WHAT IT IS DOING SO
THAT THE OS CAN SERVICE THE INTERRUPT
FLOW

Part of the Interrupt Service


Routine
Upon completing a fetch-decode-
The interrupt is The interrupt is execute cycle, the CPU checks
collected by an the priority of the next interrupt to
Device sends being assigned
XX see if it has a higher priority than
an interrupt a place in a the current task being processed.
signal interrupt queue
handler

Yes, the interrupt has


Before After higher priority
1 I1 1 XX
Eg.Divide by 0, keyboard key The CPU stops what it
pressed, printer error, mouse 2 I2 2 I1 is doing and fetches
movement the interrupt to the
3 3 I2 CPU to be processed

Priority is decided by the Operating System


FLOW

Part of the Interrupt Service


Routine
Upon completing a fetch-decode-
execute cycle, the CPU checks
The interrupt is The interrupt is
the priority of the next interrupt to
Device sends collected by an being assigned
XX see if it has a higher priority than
an interrupt a place in a the current task being processed.
signal interrupt queue
handler

No, it has lower priority


Before After
1 I1 1 XX
Eg.Divide by 0, keyboard key It leaves the interrupt in
pressed, printer error, mouse 2 I2 2 I1 the interrupt queue and
carries on processing
movement
3 3 I2

Priority is decided by the Operating System


FLOW

Part of the Interrupt Service


Routine
Upon completing a fetch-decode-
execute cycle, the CPU checks
The interrupt is The interrupt is
the priority of the next interrupt to
Device sends collected by an being assigned see if it has a higher priority than
XX
an interrupt interrupt handler a place in a the current task being processed. The process happens so quickly that it is
signal queue

impossible for the user to notice that the operating


Before After
Yes, the interrupt has
higher priority
No, it has lower priority
system has been interrupted temporarily.
1 I1 1 XX
Eg.Divide by 0, keyboard key The CPU stops what it It leaves the interrupt in
2 I2 2 I1 is doing and fetches the the interrupt queue and
pressed, printer error, mouse
interrupt to the CPU to carries on processing
movement
3 3 I2 be processed

Priority is decided by the Operating System

Interrupts allow computers to


carry out many tasks or to have
several windows open at the
same time
Software Hardware
Interrupt Interrupt
• Division by • Press of a
zero key on a
• Processes keyboard
attempt to • click of a
access the mouse
same button
memory
location
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
Chapter 4.4

TYPES OF
PROGRAMMING
LANGUAGES
IGCSE Computer Science

assembly language
Codes written in any language needs to be translated to machine code before it can be
understood by a computer.

Programming Languages Machine Code

01010101001010010010010
10101010010010100100110
10101000101101010101010
10101010010101010101001
Translators 01010100101001001001010
10101001001010010011010
10100010110101010101010
10101001010101010100101
01010010100100100101010
10100100101001001101010
10001011010101010101010
10100101010101010
Why does programmers have to code using
programming language instead of machine code

Programming Languages Machine Code

01010101001010010010010
10101010010010100100110
10101000101101010101010
10101010010101010101001
01010100101001001001010
10101001001010010011010
10100010110101010101010
10101001010101010100101
01010010100100100101010
10100100101001001101010
10001011010101010101010
10100101010101010
High-Level Programming Languages

• Contains English-like words and terms that we


use in communication and are easier for
programmers to understand
High-Level Programming Languages

• Contains English-like words and terms that we


use in communication and are easier for
programmers to understand
• Enable a programmer to focus on the problem
to be solved and require no knowledge of the
hardware and instruction set of the computer
that will use the program.
Lets try to create 2 mini software
(Very mini) in Python
• Ask a user for his/her name, then,
print out a message to greet the
user (eg. Hello, XXX)
• Ask a user for 2 numbers
(integers), then, print out the
result of the first number minus
the second number.
Low-Level Programming Languages (1)

Machine Code

010101010010100100100101
010101001001010010011010
101000101101010101010101
010100101010101010010101
010010100100100101010101
001001010010011010101000 It is impossible to code in
101101010101010101010100 machine code
101010101010010101010010
100100100101010101001001
010010011010101000101101
010101010101010100101010
101010
Low-Level Programming Languages (2)

Assembly Language (eg. MIPS -


Microprocessor without Interlocked
Pipeline Stages) Illustration of how it works

a0 2
a1 3
t0
Low-Level Programming Languages (2)

Assembly Language (eg. MIPS) Properties of assembly language


• A type of programming that sits
just above machine code and is
low-level language that use
mnemonics for its instructions
and commands.
• Mnemonic
⚬ LW - Load Word
⚬ INP - Input
⚬ RET - Return

MEMORISE A FEW !
Low-Level Programming Languages (2)

Assembly Language (eg. MIPS) Why we use assembly language

• To make use of special


hardware
• Write code that doesn’t take up
much space in primary memory
• Write code that performs a task
very quickly
0101010100101001001001010
1010100100101001001101010
1000101101010101010101010
1001010101010100101010100
1010010010010101010100100
1010010011010101000101101
Easier to debug Debug Harder to debug 0101010101010101001010101
0101001010101001010010010
0101010101001001010010011
0101010001011010101010101
01010100101010101010

Able to directly manipulate


Inefficient in hardware usage Hardware
computer hardware

Easier to read and write by More challenging to read and write


Ease codes
programmers

Takes up a little space in the


Takes up a lot of memory due to Memory primary memory
layers of abstraction

Execution time is Execution time is


Speed faster
slower

Differences between high-level and low-level programming languages


EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
Chapter 4.5

TRANSLATOR
IGCSE CS
Programming Languages Machine Code

01010101001010010010010
10101010010010100100110
10101000101101010101010
10101010010101010101001
Translators 01010100101001001001010
10101001001010010011010
10100010110101010101010
10101001010101010100101
01010010100100100101010
10100100101001001101010
10001011010101010101010
10100101010101010
Different programming languages
need a different translator to be
converted into machine code

Machine Code

01010101001010010010010
101010100100101001001101
010100010110101010101010
10101001010101010100101
01010010100100100101010
101001001010010011010101
Translators 000101101010101010101010
10010101010101001010101
00101001001001010101010
010010100100110101010001
011010101010101010101001
01010101010
Translators 3 types of translator

• Interpreter (Python)
• Compiler (C)
• Assembler (Assembly Language)
Translators 3 types of translator

• Interpreter (Python)
• Compiler (C)
• Assembler (Assembly Language)

Main functions

• Translate codes written in various programming languages to


binary.
• Report errors in the code to the programmer.
Interpreter
• Interpret the code line by line in a program
• Interpreter stop the execution of the code when it detects an error
(Compiler waits until the end of the execution process before
reporting errors)
• Will not produce an executable file at the end of the process

Python Javascript
Interpreter

Python

Code is interpreted line by line


Compiler
• Translates an entire program written in a high- level language (HLL) into machine code
all in one go so that it can be directly used by a computer to perform a required task. An
executable file will be produced
• A report of errors is produced at the end of the translation
• Once a program is compiled the machine code can be used again and again to perform
the same task without re-compilation

C Programming Language
Assembler
• Translate a program written in an assembly language into machine code
• Once a program is assembled the machine code can be used again and again to
perform the same task without re-assembly.

Machine Code

01010101001010010010010
101010100100101001001101
010100010110101010101010
10101001010101010100101
01010010100100100101010
Assembler 101001001010010011010101
000101101010101010101010
10010101010101001010101
00101001001001010101010
010010100100110101010001
011010101010101010101001
01010101010
Compare and contrast the 3 translators

Compiler Interpreter Assembler

Produce executable file Does not produce executable file Produce executable file

Translate high-level Execute a high level Translate low-level programming


programming language into programming language one line language into machine code
machine code at a time

Compiled program is run without Interpreted program cannot run Assembled program is run
the compiler without the interpreter without the assembler
Compare and contrast the 3 translators

Compiler Interpreter Assembler

Produce executable file Does not produce executable file Produce executable file

Translate high-level Execute a high level Translate low-level programming


programming language into programming language one line language into machine code
machine code at a time

Compiled program is run without Interpreted program cannot run Assembled program is run
the compiler without the interpreter without the assembler
Interpreter Compiler
Easier for beginners as errors are easily A compiled program is executed in a
identified shorter time

Easier and quicker to debug and test


programs during development
It takes a longer time to write, test
and debug programs during
development

Programs can take longer to execute


Integrated Development
Environment (IDE)

• An IDE is an application that


programmers use to test and
develop new software
• An IDE allows a programmer to
write code in various
programming language and
smulate the running of the code
• Eg. PythonIDE, Sublime Text,
Visual Studio Code, Pycharm
7 features of an IDE
7 features of an IDE

Auto completion
Code Editor Run-time
- common Translator
- contains function
Environment
- compiler,
shell /syntax - with debugger
interpreter

Auto Correction Pretty print Error


- bracket - colour Diagnostic
matching scheme, - pinpoints
indentation error
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION
EXAM QUESTION

You might also like