0% found this document useful (0 votes)
19 views80 pages

1_merged

The document provides an overview of various data measurement units, binary coded decimal (BCD), image types (bitmap and vector graphics), character sets, sound terminology, compression techniques, bit streaming, networking cables, client-server models, cloud computing, and IP addressing. It explains the definitions, benefits, and drawbacks of each concept, along with examples and applications in computer science. The document serves as a comprehensive guide to understanding fundamental concepts in digital data representation and transmission.

Uploaded by

adx08
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)
19 views80 pages

1_merged

The document provides an overview of various data measurement units, binary coded decimal (BCD), image types (bitmap and vector graphics), character sets, sound terminology, compression techniques, bit streaming, networking cables, client-server models, cloud computing, and IP addressing. It explains the definitions, benefits, and drawbacks of each concept, along with examples and applications in computer science. The document serves as a comprehensive guide to understanding fundamental concepts in digital data representation and transmission.

Uploaded by

adx08
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/ 80

Bit Binary Digit 0 or 1

Nibble 4Bits

1000B 103B 1kilobyte (1KB)

Byte 8Bits

1000KB 106B 1megabyte (1MB)

1kibibyte (1KiB) 1024B = 210B

1000MB 109B 1gigabyte (1GB)


Measurement of the size of computer
1mebibyte (1MiB) 1024KiB = 220B
memories
1000GB 1012B 1terabyte (1TB)

1gibibyte (1GiB) 1024MiB = 230 B

1000TB 1015B 1petabyte (1PB)

1tebibyte (1TiB) 1024GiB = 240B

1000PB 1018B 1exabyte (1EB)

1pebibyte (1PiB) 1024TiB = 250B

1exbibyte (1EiB) 1024PiB = 250B


A system of writing numerals that assigns a four-
digit binary code to each digit 0 through 9 in a
decimal (base-10) numeral

Example 1 Write the number 359 in BCD form. Answer 001101011001

Example 2 Convert the following Binary Coded Decimal (BCD) number into denary Answer 83

Binary Coded Decimal (BCD)

When denary numbers need to be electronically coded


Uses of BCD
For example to operate displays on a calculator where each digit is represented

Straightforward to convert to or from BCD and denary

Benefits of using Binary Coded Decimal (BCD) to Less complex to encode and decode for programmers
represent values Easier for digital equipment use BCD to display output information

Can represent monetary values exactly


Notations for colour in HTML/CSS e.g. Red #FF0000

Assembly Code eg. STO FFA4

Display Memory Dump e.g. 5F 3A 09 F1

Uses of Hexadecimal Display MAC addresses e.g. 01-23-45-67-89-AB-CD


Number System in Computer Science

e.g %20 space is displayed in URL - because URL cannot contain


Display ASCII/Unicode values in web address
spaces

Display error codes e.g. error #404 page not found

Display IP Address V6 2001:0db8:85a3:0000:0000:8a2e:0370:7334


Data about the bitmap image

Dimensions of the image in pixels (Image Resolution)


File Header
Examples of data stored in a file header Colour Depth (Number of bits in each pixel)

Type of compression used, if any

A single square of one colour


Pixel
The smallest addressable element in an image

The number of pixels which can be viewed horizontally


and vertically on the screen
Screen Resolution
Bitmapped Image Terms Example - A typical screen resolution is 1680 pixels ×
1080 pixels.

The number of pixels per unit measurement

The number of pixels in an image


Image Resolution
The number of pixels wide by the number of pixels high

Number of pixels per row by the number of rows

A picture is drawn and is saved as a 16-colour bitmap


Example image. State how many bits are used to encode the data Answer 4Bits for each pixel
for one pixel.
Made up of pixels

Are usually bigger than vector graphics files

When enlarged, image is pixelated

Bitmap Graphics Can be compressed with significant reduction in file size

Suitable for photographs or scanned images

Use less processing power than vector graphics

Individual elements cannot be grouped


Types of Images

Store a set of instructions about how to draw the shape

Can be enlarged without the image becoming pixelated

Images do not compress well


Vector Graphics
Suitable for more geometric shapes

Individual elements can be grouped

Need to be ‘rasterised’ in order to display or print


Made up of pixels

Each pixel has one colour

Colour of each pixel stored as a binary number

A bitmap file is likely to take up more storage space because the


Bitmap Image colour of each pixel needs to be stored

Disadvantages A bitmap image cannot be enlarged without the image pixelating

A bitmap would be more difficult to edit because each pixel would


need to be edited separately

Uses Photographs that store a lot of color

It is a series of geometric shapes , lines and objects

Stored coordinates
Bitmap Image and Vector Graphic
Contains a drawing list

Commands , formulae for creating each individual object


and and the attributes (property) for that object

For example the colour, thickness, style of line

Can resize it without pixilation


Vector Graphic
Benefits Compared to a Bitmap Image Smaller file size

Storing points, equations, and commands not individual pixels

A list that stores the command required to draw each object

Drawing List Each shape has its own drawing list

Examples: triangle, square and circle

Animations
Uses
Logos
The symbols that the computer uses
Definition: A list of characters recognised by the computer
hardware and software

ASCII (American Standard Code for Information Contains 128 Characters


Interchange) 7 Bits for each character

Character Set
Contains 256 Characters
Extended ASCII
8 Bits for each charcater

Greater range of characters than ASCII

Unicode Represents most written languages in the world

Uses up to 4 bytes per character


Sampling Measurement of value of analogue signal at regular time intervals

The number of samples taken per unit time


Sampling Rate
Effect on Sound Quality Increasing the sampling rate will increase the accuracy of the digitised sound

Number of distinct values available to encode each sample

Number of bits used to store each sample

Sometimes referred to as bit depth


Sampling Resolution
The higher the sampling resolution, the smaller the quantization error

A higher sampling resolution results in less distortion of the sound

Usually 8 bit, 16 bit, 24 bit or 32 bit

Edit start time, stop time and duration of any sound


Sound Terminology
Extract, delete or save part of a clip

Fade in or out of a clip

Merge multiple sound sources


Features of Sound Editing Software
Combine different sources at various volume levels

Playback to speakers, processors or recording medium

Use of filters

Conversion between different audio file formats

The height of the sound wave is determined

At set time intervals

How sampling is used to record the sound clips? To get an approximation of the sound wave

And encoded as a sequence of binary numbers

Increasing the sampling rate will improve the accuracy of the recording
Designed to lose none of the original detail

Allows the original file to be re-created exactly

One lossless technique is ‘run-length encoding


Lossless
Founded on some form of replacement

Example: e.g. 000–1111–222222–333 = 3–0, 4–1, 6–2, 3–3

Maximum compression about 50%

May result in a loss of detail

Make a decision about what parts of the file are


important and then discard certain information

Does not allow original file to be re-created exactly


Lossy Only keeps sounds human ear can process, discards
Compression Techniques
sounds most people cannot hear, then applies lossless
technique, for further reduction

Can reduce to about 10%

Example of jpeg, mp3, mp4

Lossless method of compression

Reduces the physical size of a string of adjacent,


identical characters, pixels or bytes

The repeating string is encoded into two values


Run-Length Encoding
One value represents the number of identical characters
in the run

The other value is the code of the characteror colour


code of pixel etc. in the run (the run value).
Use of a compression algorithm

Text File Repeated words can be indexed

Repeated word sections (e.g. “OU”) can be replaced by a numerical value

Uses a compression algorithm

Sound File Does not permanently remove any data

Repeated patterns of notes are identified and are grouped, with an index

Compression algorithm used

For example using run length encoding


Video File
How different Files are compressed using Repeating frames or pixels are identified and are indexed

lossless compression? No data is permanently removed

Compression algorithm used

For example using run length encoding

Image File Replace sequences of the same colour pixel

with colour code and number of identical pixels

No data is permanently removed

The file can be restored to the exact same state it was before compression
Why lossless compression is used to compress
It is a computer program so no data can be lost but lossy would remove data
programs rather than lossy?
Will not run correctly with lossy compression
A compression algorithm is used

Discards any unnecessary sounds using perceptual


musical shaping by removing sounds humans can’t hear
Sound File
Reduces sample rate Number of samples taken per second

Reduces sample resolution Number of bits used to store each sample

The data is permanently removed

A compression algorithm is used

This would remove all the unnecessary data from the file
How different Files are compressed using
Removes sound that the human ear may hear and
lossy compression? Video File
removes pixel that human eye may not see

Reduce colour palette so each pixel requires fewer bits

Reduce resolution

A compression algorithm is used

Data will be lost permanently

Image File Reduce the range of colour depth Number of bits per pixel

Reduce the number image resolution Number of pixels in the image

Removes data that will not be noticed by the user


Sequence of digital bits

Over a communication path (Internet)

Transfer of data at high speed


Definition
Requires fast broadband connection

Requires some form of buffering

Bits arrive in the same order as sent

No need to wait for a whole file to be downloaded

No need to store large files on user’s computer


Benefits of using bit streaming to watch a movie Allows on demand playback

No specialist software is required for playback in


browser

Video stops if very slow Internet

Drawbacks of using bit streaming to watch a Video stops if inadequate buffering capacity

movie Loss of Internet means can’t access films


Bit Streaming Viruses can be downloaded from the websites

Digital files are converted to bit streaming format for


broadcasting on the net; this is known as encoding, these encoded
streaming video files are then uploaded to a dedicated server

A link for the encoded video is placed on a web site


On-demand
A user clicks on the link to download the encoded streaming video;
the streamed video is then broadcast to the user as and when they
require it

Can be paused, can go back and re-watch or fast-forward

An event is captured live with a video camera

Types of bit Streaming The video camera is connected to a computer

The video signal is converted to streaming media files (encoded)


on the computer

The encoded feed is then uploaded from the computer to a


Real-time dedicated streaming server via cable, DSL, or a high-speed
internet connection

The server then sends the live images it to all users requesting it
as real-time video streaming

Cannot be paused

Plays continually
Less expensive to install

Easier to install because it is more flexible

It is easier to make terminations using copper cabling


Copper Cable Benefits
The expertise in use of copper cabling is more extensive

Has been around for years … so very little is “unknown”


about installations using this type of cabling

Have greater bandwidth

Need less signal boosting, so it can transmit over longer distances

Have greater security more difficult to “tap” into


Fibre Optic Cable Benefits
Immune to electromagnetic and other effects
Cables and Satellites Less expensive to install

Consume less power

Not fixed to a single location


Advantages of Using Satellites
Allows access in rural areas

High latency, lag, slow to connect

More expensive than wired methods, as need extra equipment

Disadvantages of Using Satellites Signal is affected by bad weather

The transmission speed is slower than fixed line broadband

Direct line of sight needed


At least one computer used to serve

Other computers are referred to as clients


Definition
Server provides services or applications

Which may be requested by clients

Files and resources are centralised

Creation of security or manage security

User needs user name and password to access network

Centralised back-up
Benefits of using the Client-Server Model
Intranet capability

Internet monitoring
Client-Server Model Clients can be less powerful machines, therefore less expensive to buy

Saving resources on server reduces the burden on the client

If all the clients simultaneously request data from the


server, it may get overloaded

Drawbacks of using the Client-Server Model If the server fails for any reason, then none of the
requests of the clients can be fulfilled

Cost involved in setting up and maintaining the server

Web services

Uses Game hosting

Private networks used in organisations


Accessing a service, files or software on a remote
Definition
server

Cloud storage can be free for small quantities

No need for separate high capacity storage devices

Can access data from any computer with internet access


Benefits
Most cloud data services will have in-built backup

Data can be easily shared

Can easily increase capacity

Can only access the cloud with internet access

Security may not be strong and no control over security

There may not be any backups


Cloud Computing
It can take a long time to upload or download the data

Drawbacks It can be more expensive in the long term

There could be a limit to the amount of storage unless paid


for

There could be access issues

There could be issues with the company offering cloud


services

Computing services offered by 3rd party provider over the public Internet
Public Cloud Public is available to anyone with the appropriate equipment,
software and credentials

Types of Cloud Computing services offered either over the Internet or a private
internal network
Private Cloud
Only available to select users not the general public

Private is a dedicated system only accessible from the organisation


Composed of four denary or Hexadecimal integers

Each in the range 0–255 or 00–FF

IPV4 Each group stored in 1 byte or 8 bits

Stored in 32bits

Separated into network ID and host ID

The number of IP addresses needed will exceed the number


Why IPV6 is needed? available using IPv4.

Consists of 8 groups

Each group is 4 hex digits

IPV6 Each group is seperated by colon ( :)

128 bits in length

21E5:69AA:FFFF:1:E100:B691:1285:F56E

Valid examples of IPV6 ::255.255.255.255

59FB::1005:CC57:6571

Can be reached across the Internet

Provided by ISP
Public IP
Are unique to the Internet

IP Address Less secure than a private address

Can only be reached internally through the LAN

Cannot be reached across the Internet

NAT (Network Address Translation) is necessary for a


private IP address to access the Internet directly

Private IP More secure than a public address

Assigned by the router of the network concerned

Private addresses are unique within their network, but


can be duplicated within other discrete networks

IP addresses from the private address space are never assigned as public.

Each time the computer rejoins a network, the address changes


Dynamic IP
Address is assigned by the network OS

It does not change each time a device


connects to the internet

The DNS does not need, which might be delayed causing


Static IP address
‘address not found’ errors updating

Address is assigned by the server or Internet Service


Provider (ISP)
Improves security

Reduces congestion

Benefits of subnetworks Allows extension of the networky

Aids day-to-day management

Improves performance
Subnetworks and IP Classes

Class A IP start 0-127 8bits for network ID and 24 for host

IP Classes Class B IP starts 128-191 16bits for network ID and 16 for host

Class C IP starts 192-223 24bits for network ID and 8 for host


Uniform resource locator

URL Definition Reference address to a resource or website on the


Internet

Includes protocol used and includes domain name

Domain name system or Domain name service or Domain


name server
DNS Definition
Stores a database of list of URLs with matching IP
address

URL and DNS


Browser software sends URL to DNS

The true domain name (e.g. cie_exams.co.uk) is turned


into an IP address by DNS

DNS server may need to pass a request onto another


How URL is converted to IP address? DNS server, if URL not in its database

DNS server may return an error message if requested


domain name is invalid or does not exist

The DNS service has a hierarchy

DNS server returns IP address to browser


Devices connected over a small geographical area

Using cables and switches


Characteristics
Uses dedicated infrastructure and company-owned
infrastructur

Allows the sharing of files

Benefits of connecting computers to a LAN Allows the sharing of resources e.g. sharing a printer

Allows central management for exmaple example, backup, security

Packet has address of recipient

Sender transmits packets directly to the serve

How packets are transmitted in Start Topology?? Server reads address and identifies where recipient is

Server transmits packets directly to the recipient

LAN (Local Area Network) Server transmits packets only to the recipient

NIC (Network Interface Card) A component used to identify the end-system

WNIC (Wireless Network Interface Card) if LAN use


Provides the NIC function in a WiFi LAN
wireless

WAP (Wireless Access Point) The connecting device in a WiFi LAN

Hub Broadcast the packet to all computers connected to it

Switch A connecting device that can send a unicast message


Hardware components used to set up the LAN
Router A device that acts as a node on the Internet

Bridge A device that connects two segments of a LAN

A device that connects two cables and provides a full-


Repeater
strength signal to the second cable

Convert analogue data from phone line to digital


Modem
Convert digital data from computer to analogue data
Devices connected over a small geographical area

Using cables and switches


LAN Does not use internet to transmit within the building

Uses dedicated infrastructure and company-owned


infrastructure

Characteristics of a LAN and a WAN


Covers large geographical area

Example of a WAN is the internet


WAN Consists of connected LANs

Use public infrastructure to transmit data such as phone


lines, cable lines, leased lines, and satellite
All computers are of equal status

Each computer provides access to resources and data


Features
Computers can communicate and share resources

Each computer is responsible for its own security

Reduced security because no central management of security. Only


as secure as the weakest computer on the network. Each computer
is at risk from viruses from other computers

No central management of backup, so if the data from one


computer is not backed up it is lost to all of them

No central management of files or softwar so consistency may be


Drawbacks
difficult to maintain and each computer may have different
software from the others
Peer-To-Peer Network
Individual computers may respond slower because they are being
accessed by other computers

In order to share files all the computers involved need to be


switched on, so the files may not be always available

Does not need an expensive server because individual workstations are


used to access the files
Benefits
Even if there are extra clients added, the performance of the network will remain the same.

Home networks

Uses Small businesses

Used in applications where security isn't a major concern


Devices can be more mobile as they do not have to be
connected to cable

Easier to set up as no cables need to be installed


Benefits Compared to a Wired Network
Add additional devices is easier

Many different types of device can be connected at the


same time

Easier to hack

Drawbacks Compared to a Wired Network Interference

Signal degrades quickly


Wireless Network

Provide interface to wireless network as an antenna

Receives analogue radio waves and convert them to


digital

Checks incoming transmissions for correct MAC or IP


address and ignore transmissions not intended for it
Functions of a Wireless Network Interface Card
Encrypts the data

Decrypts the data

Takes digital input and converts to analogue waves then


sends the radio waves via the antenna
Allows internal connections between LANs

Allows external connection from the main LAN

Contains a routing table

Router Holds the private IP / MAC addresses of the devices on the LAN

How it is used in LAN? Provides the public IP address for the network

Forwards packets to the correct IP / MAC address

May contain a firewall

Provides device with a MAC address to uniquely identify it on the network


Network Interface Card (NIC)
Allows each individual device to connect to the network

Devices are used to support LAN


Allowing devices to connect to the LAN via radio
communication instead of using a cable

Easy to move a device to as different location

Encrypts the data

encodes the data into radio signal


SEND
Wireless Access Point Listens for other radio signals

Transmits when quiet using an antenna


How the wireless connection sends and receives data??
Constantly checking

Receives radio signal using an antenna


RECEIVE
Checks if the signal is for that device

If so, decodes the signal and decrypts the data


The PSTN consists of many different types of communication lines

Data is transmitted in both directions at the same


PSTN (Public Switched Telephone Network) How data is transmitted using PSTN?
time full duplex data transmission

The communication passes through different switching centres

Faster connection

Benefits More consistent transmission speed

Dedicated Lines Improved security


Devices are Used to Support Internet
Expensive to set-up and maintain
Drawbacks
Disruption to the dedicated line would leave no alternative

Modems

Cell Phone Network


Collection of interlinked, hypertext documents accessed via the Internet

World Wide Web Content from web servers organised as web pages

Uses http protocols to transmit data


World Wide Web (WWW) and the Internet

Global connection of interconnected computer networks


Internet
Uses TCP/IP protocol
Easier to set-up
Benefits
Less cable required

If the main cable breaks, network performance badly degraded

Difficult to detect and troubleshoot fault at an individual station


Bus
Efficiency reduces as the number of devices connected to it increases
Drawbacks
Collisions so not suitable for networks with heavy traffic

Security is lower because several computers receive the sent


signal from the source

Network Topology Signals only go to destination so secure

Easy to connect or remove nodes or devices or trouble shoot.

Centralised management helps in monitoring the network

Benefits Failure of one node or link doesn’t affect the rest of network

Star Performance does not degenerate under load

Connections may use different protocols

Fewer collisions

If central device fails then whole network goes down


Drawbacks
Performance is dependent on capacity of central device
Definition Every device connects directly to every other device

This network can manage a high level of traffic


Benefits
Failure in a single device won’t break the network
Mesh
The cost to implement mesh topology is higher than other
selections
Drawbacks
It takes a lot of time and effort to build and maintain this
topology.
Network Topology

Network topology that uses two or more differing


Definition
network topologies

They can handle large volumes of traffic


Hybrid Benefits It is easy to identify where a network fault has occurred.

They are very well suited to the creation of larger networks

Drawbacks They can be very complex to install, configure and maintain


Software that relies on a remote server such as a
Thin Client
cloud platform for its features.
Definition
Software that runs at least some features
Thick Client
directly on your device.

Thin Client Functions mostly don't work


Offline
Thick Client Functions mostly work

THIN-CLIENT
Thin Client Few local resources such as disk, computing power and memory.
Local Resources
Thick Client Generally consumes more local resources

Thin Client Functionality may depend on a fast network connection

Network Latency Functionality may work without a connection


Thick Client
or with a slow connection.

Thin Client vs Thick Client Thin Client Data is typically stored on servers
Data
Thick Client Data may be stored locally.

Web browser which has very limited functions unless it


is connected to a server
Thin Client
Mobile phone apps which need constant access to a
Software Example server to work

Computer game which can run independently on a user’s


Thick Client computer, but can also connect to an online server to
allow gamers to play and communicate with each other

POS terminal at a supermarket that needs constant


Thin Client
access to a server to find prices

PC/laptop/tablet since it would have its own storage


Hardware Example
(HDD or SSD)
Thick Client
RAM and operating system which means it is capable of
operating effectively online or offline
Only one transmission is allowed on the bus at any one
time Only one packet can be transmitted on the bus at
any one time

The two packets from A and B cannot both use the bus
Definition at the same time

The attempts to transmit will be unsuccessful, because


the stations will realise that the bus is busy

Collision causes a change in voltage of the bus

Calculate a random wait time

Wait for the random time

Steps to ensure the successful transmission of packet Check for idle bus

Attempt to re-transmit

If unable to transmit, repeat process


Collision on Bus Topology

Star Topology

Where each computer or device has its own dedicated connection


to the server
LAN topology to overcome Collision
How the star topology has overcome the problem?
As each computer is now not sharing a single bus

Collisions cannot occur

Carrier Sense Multiple Access with Collision Detection

Before transmitting a device checks if the channel is busy

If it is busy the device waits or if channel free data is sent


CSMA/CD When transmission begins the device listens for other
devices also beginning transmission

If there is a collision, transmission is aborted

Both devices wait a (different) random time, then try again


A protocol

For data transmission over standard wired network connections

Ethernet
Uses Carrier Sense Multiple Access / Collision Detection (CSMA/CD)

Each frame has a source and destination (IP/MAC) address


Data is transmitted in frames
and error checking data so damaged frames can be resent
Produces solid, 3D objects

Used in CAD or CAM

Powdered resin

Powdered metal
Description
The solid object is built up layer by layer using materials such as: Paper

Plastic

Ceramic powder

Makes use of tomography (slices of an object)

1- The object is designed using Computer Aided Design (CAD) software

2- The software splits the object into slices

3- The data about the slices is sent to the printer

4- The solid plastic is melted and transferred to the nozzle

Steps to create a solid object using a 3D printer 5- A stepper motor moves the nozzle into position

6- The nozzle extrudes the molten plastic

7- The steps 5 to 6 repeat until the layer is complete

8- A fan cools the layer

9- The steps 4 to 8 are repeated for each subsequent layer


3D Printer

Physical 3D prototype from CAD

Physical model from a blueprint

Making parts for items no longer in production


Uses:
Prosthetic limbs made to exactly fit the recipien

Astronauts on the International Space Station have printed tools

Technology could be thermal bubble

Prototypes can be made quickly

Just about any shape can be printed

Advantages Designs can easily be shared by sharing he digital file

Costs to a designer can be reduced as they can easily


change a design, re-print it and test it without having to
have the object manufactured

3D printing is quite expensive

Printed items might not be as durable as a similar manufactured product


Disadvantages
Dangerous items may be printed

Copyright issues may exist if a copyrighted design is printed


Conductive layer

An electrostatic field is created

How it registers touch? Sensors around the screen monitor the electrostatic field

When touched electrostatic charge is transferred to finger

Location of touch is calculated


Capacitive
This is a medium cost technology.

Advantages Screen visibility is good even in strong sunlight

It permits multi-touch capability.

Screen glass will break on impact


Disadvantages
Cannot use when wearing standard gloves

Uses multiple layers of material

That transmit electric currents


How it registers touch?
When the top layer is pushed into the bottom layer

The electric current changes and location of touch is found

Touchscreens Cheap to manufacture


Resistive Advantages
Can use stylus

Poor visibility in sunlight

Vulnerable to scratching
Disadvantages
Wears out through time

Does not allow multi-touch facility

An “invisible” grid on the screen , pattern of infrared LED beams

Sensors detect where the screen has been touched through a


How it registers touch? break in an infrared beams

The position where the screen touched is calculated

Good durability
Infra-red
Advantages Allows multi-touch facility

Can use stylus

Expensive to manufacture
Disadvantages
Sensitive to dust
Definition Temporary memory area

Essential in modern computers since hardware devices


operate at much slower speeds than the processor

Without buffers, processors would spend the majority


of their time idle, waiting for the hardware device to
Why Buffer is needed in computers?
complete its operation

Compensate for difference in speeds

Allow the processor to get on with other tasks

Buffers Buffers are used when streaming a video from the internet
Example of using Buffers This ensures that the video playback doesn’t keep on
stopping to wait for data from the internet

Processor sends data to the printer buffer

The data in the buffer is emptied to the printer

The interrupt signal tells the CPU that its attention is


How buffers and interrupts are used when a required
document is sent to a printer?
Meanwhile processor carries on with other tasks

Once the printer buffer is empty

Requesting more data to be sent to the buffer


Hardware device that allows a user to enter data into a computer system
Input Devices
Such as Keyboard, Mouse, and Microphone

Peripheral devices that is used to output information


Output Devices
Such as Printer, Speaker, and Monitor

Main memory inside a computer


Description
Directly accessed by CPU

It is volatile memory the contents of the memory are lost when the power is turned off

It is used to store data, files, or part of the operating system that are currently in use

RAM (Random Access Memory) Has a larger capacity than ROM

Can be edited

Temporary
Primary Memory
Non-volatile the contents of the memory remain even when the
Types of Primary Memory power to the ROM is turned off

Used to store the start-up instructions when the computer is first


switched on for example, ROM might store the basic input/output
ROM (Read only memory)
system (BIOS)
Input, Output, Storage
Data or contents can only be read; they cannot be changed

Permanent

Cache Stores frequently used instructions

Non-volatile or persistant memory


Description
Not directly accessed by CPU
Secondary Storage
Hard Disk Drives (HDD)
Types of Secondary Storage
Solid State Drives (SSD)

Non-volatile storage

Not directly accessed by CPU

Storage that can be disconnected from the computer


Description
Offline Storage Must be physically connected to computer to obtain stored
data

Used to store files as a backup

Types of Offline CD,DVD,Blu Ray, Pen Drive, External HDD and SSD
1- The printer driver ensures that the data is in a
format that the laser printer can understand

2- Data is then sent to the laser printer and stored


temporarily in the printer Buffer

3- The printing drum is given a positive charge

4- As the printing drum rotates

5- Laser scans across the drum; this removes the


positive charge in certain areas

6- The printing drum is coated in positively-charged


Stages when a page is printed toner

7- Toner then sticks to the negatively-charged parts of


the printing drum

8- A negatively-charged sheet of paper is then rolled


over the printing drum

9- The toner on the printing drum is now transferred to


the paper to reproduce the required text and images

Laser Printer 10- The paper goes through a fuser

11- Fuser melts the toner so it fixes permanently to the


paper

Application that needs high-volume printing in colour or


monochrome
Application
For example, producing flyers or magazines

Cheaper printing cost per page

Advantages It prints at a faster speed

it prints colour fast

Expensive to purchase printer

Disadvantages Toner is expensive

Can be quite large in size


The microphone has a diaphragm

The incoming sound waves cause vibrations


How the microphone captures voice?
Causing a coil to move past a magnet

An electric current is generated


Microphone

Voice recognition system

Applications Multimedia presentations

Video conferencing or VoIP


Conductive layer

An electrostatic field is created

How it registers touch? Sensors around the screen monitor the electrostatic field

When touched electrostatic charge is transferred to finger

Location of touch is calculated


Capacitive
This is a medium cost technology.

Advantages Screen visibility is good even in strong sunlight

It permits multi-touch capability.

Screen glass will break on impact


Disadvantages
Cannot use when wearing standard gloves

Uses multiple layers of material

That transmit electric currents


How it registers touch?
When the top layer is pushed into the bottom layer

The electric current changes and location of touch is found

Touchscreens Cheap to manufacture


Resistive Advantages
Can use stylus

Poor visibility in sunlight

Vulnerable to scratching
Disadvantages
Wears out through time

Does not allow multi-touch facility

An “invisible” grid on the screen , pattern of infrared LED beams

Sensors detect where the screen has been touched through a


How it registers touch? break in an infrared beams

The position where the screen touched is calculated

Good durability
Infra-red
Advantages Allows multi-touch facility

Can use stylus

Expensive to manufacture
Disadvantages
Sensitive to dust
Does not request a refresh

Uses more than one transistor to form a memory


cell

Has more complex circuitry

Each bit is stored using a flip-flop

Static RAM (SRAM) Uses less power no need to refresh

More expensive to buy as it requires more


transistors

Has faster access times

Lower storage

Used in cache memory


Types of RAM

Has to be refreshed

Uses a single transistor and capacitor

Stores each bit as a charge

Uses higher power because it requires more


circuitry for refreshing
Dynamic RAM (DRAM) Less expensive to purchase because it requires
fewer transistors

Slower access time because it needs to be


refreshed

Higher storage

Used in main memory


The hard disk has one or more platter

Each surface of the platter is ferrous oxide which is capable of being magnetised

The platters are mounted on a central spindle

The entire mechanism is contained inside a sealed aluminium box.

The disks are rotated at high-speed

Each surface of the disk has a read and write head


mounted on an arm positioned just above the surface

How a magnetic hard disk drive stores Electronic circuits control the movement of the arm and hence the heads
data??

The surface of the platter is divided into concentric tracks (circles)

The surface of the platter is divided into sectors

One track in one sector is the basic unit of storage called a block

The data is encoded as a magnetic pattern for each block

When writing to disk, a variation in the current in the head


produces a variation in magnetic field on the disk

When reading from disk, a variation in magnetic field


produces a variation in current through the head
Data is stored or written using lasers

DVD-RAM uses phase changing recording, in which


varying laser intensities cause targeted areas in the
How DVD-RAM Operate? phase change recording layer to alternate between an
amorphous and a crystalline state

Uses a rotating disk with concentric tracks

Allows read and write operation to occur simultaneously

Most are NAND-based flash memory

There are no moving parts

Uses a grid of columns and rows that has two transistors


at each intersection

One transistor is called a floating gate

Storage Devices How Solid State Operate The second transistor is called the control gate

Memory cells store voltages which can represent either a 0 or a 1

Essentially the movement of electrons is controlled to read/


write

Not possible to over-write existing data; it is necessary


to first erase the old data then write the new data in the
same location

Uses a single spiral track

Only allows write OR read operation to occur as separate


operations
How DVD-RW Operates?
Requires special packet reading/writing software

Performance degrades/becomes unreliable after 1000 recor

Disc rotates at different speeds


A red laser is used to read and write the data

Smaller capacity than DVD and Blu-Ray


CD
Use single spiral track

Use single layer

A red laser is used to read and write the data

Larger capacity than CD

DVD-R/RW use single spiral track but DVD-RAM use concentric


DVD tracks

Use single layer or daul layers

DVD-RAM can read and write at the same time because it has a
read/write head

A blue laser is used to read and write the data

Larger capacity than CD and DVD


Blu-Ray
Use single layer or daul layers

Use single spiral track

Back-up systems

Transfer files between computers


Uses of CDs, DVDs and Blu-Ray
Supply software

Blu-Ray high definition movies

Red laser is used

Laser beams shines onto surface of the disk

It is rotated at a constant speed to be read


Offline Storage Optical Media
Surface is covered in a track that spirals from the centre
How the data is read from a Compact Disc (CD) ??
Data is represented on the surface using pits and lands

Pits and lands represent binary values

Pits reflect light back differently to the land

Optical device can determine the binary value from the light reflection

The disc is rotated

Laser beam is used

The laser beam makes indentations on the surface of the disc of pits
and lands
How data is written to CD-R and DVD-R?
The data is written in a spiral track

The pits and lands represent binary values

It is called burning data to the disc

Uses a single spiral track

Only allows write OR read operation to occur as separate operations

How DVD-RW Operates? Requires special packet reading/writing software

Performance degrades/becomes unreliable after 1000 recordings

Disc rotates at different speeds

Data is stored or written using lasers

DVD-RAM uses phase changing recording, in which varying laser


intensities cause targeted areas in the phase change recording layer to
How DVD-RAM Operate? alternate between an amorphous and a crystalline state

Uses a rotating disk with concentric tracks

Allows read and write operation to occur simultaneously


Main memory inside a computer
Description
Directly accessed by CPU

It is volatile memory the contents of the memory are lost when


the power is turned off

It is used to store data, files, or part of the operating system that


are currently in use
RAM (Random Access Memory)
Has a larger capacity than ROM

Can be edited
Primary Memory
Temporary

Types of Primary Memory Non-volatile the contents of the memory remain even when the
power to the ROM is turned off

Used to store the start-up instructions when the computer is first


switched on for example, ROM might store the basic input/output
ROM (Read only memory)
system (BIOS)

Data or contents can only be read; they cannot be changed

Permanent

Cache Stores frequently used instructions


A microcontroller or microprocessor based system which
is designed to perform a specific task

Digital cameras

MP3 players

Refrigerators
Definition:
Embedded system in washing machine only controls the programs
Examples of embedded systems include: for the washing cycle
Washing Machines
It is part of the washing machine but does not perform any other
function within it

Microwave ovens

Calculators

The embedded system is built into or integrated into


another system for example car alarm system

Characteristics of an embedded system Combination of hardware and software designed for a specific function
Embedded Systems Must have a processor, memory and input or output

The system is not easily changed or updated by the owner of the system

They are easy and cheap to manufaure for mass production

It is highly reliable

It has improved product quality


Advantages of embedded system
The embedded systems use low power operation

The embedded system operates very fast, and it is


portable and small in size.

They are hard to maintain

Disadvantages of embedded system Difficult to take a back-up of embedded files

Troubleshooting is difficult for embedded systems


To ensure that the system operates within the given criteria

By enabling system output to affect subsequent system inputs


Why is it important? Thus enabling the system to automatically adjust Actuator is a hardware device that receives a signal from a
conditions by using actuators computer and adjusts the setting of a controlling device

Green House, Street light

Sensors continually measure the temperature of the


water in the swimming pool

The (stream of) readings are sent to a processor and


Feedback in a Control System An indoor swimming pool is to be kept at a compared with 28 degrees
constant temperature of 28 degrees.
Describe the use of feedback in this control If the reading is out of range (by a system set amount)
then actuators turn the heater/cooler on or off as
system
necessary

Feedback ensures that the water temperature remains


close to 28 degrees

No feedback as there is no output that could change the system


environment
Monitoring system Security camera why this is a monitoring system??
It just captures data
The system is activated by keying in a password on a keypad

Infrared , acoustic and pressure sensor send signals

The sensor data is passed through an ADC if it is in an


analogue form to produce digital data

Sensor signals is sent to the microprocessor

Monitoring Application Microprocessor compares value with those stored in memory


Process of a burglar alarm system If any of the incoming data values are outside the
acceptable range, then the Microprocessor sends a signal
to a siren to sound the alarm, or a light to start flashing

A DAC is used if the devices need analogue values to


operate them

The alarm continues to sound/lights continue to flash


Monitoring and Control System
until the system is reset with a password

When the pressure sensor detects the tin is in the correct place

A message is sent to the microprocessor which sends a signal to an


actuator to stop the conveyor belt and and sends a signal to
another actuator to release the cake mixture

A pressure sensor continuously records the weight of the cake


Control Application mixture in the tin and sends the readings to the microprocessor
Ensure the correct amount of mixture is placed in the cake tins
The microprocessor compares the readings with a pre-set value

The microprocessor compares the readings with a pre-set value


When the weight of the cake mixture in the tin matches the
desired weight the microprocessor sends a signal to the actuator
to stop releasing the mixture and sends a signal to another
actuator to move the conveyer belt
It is an input device

It measures physical readings of the surrounding environment

Transmits a value to a controlling computer

Such as Temperature sensor, sound sensor, and proximity sensor


Definition
Sensors send analogue data

Computers don't understand analogue data

Therefore it is converted to digital using analogue to digital


converter (ADC)

Can work continuously

Avoids human error


Benefits of using sensors
It could be a dangerous environment and will avoid human risk

Detect errors instantly

Continuous data

Sensors Analogue data Non-discrete data

Difference between analogue and digital data Measurements are converted to digital file

Discrete data that has only two values


Digital data
e.g. binary data / 1’s and 0’s

Chemical process

Central heating or air con system


Temperature
Greenhouse environment

Oven

Burglar alarm systems


Infra-red
Use of Sensors Automatic doors

Burglar alarm systems


Sound
Leak detection system

Burglar alarm systems

Pressure Traffic Light Control

Chemical process
Programmable ROM (PROM). Program or data once installed cannot be changed

Installed data or program can be erased and new data or


a new program can be installed.

Erasable PROM (EPROM) Usually requires the chip to be removed from the circuit

Can be overwritten multiple times.

Must be entirely erased before rewriting

Electrical signal can be used to remove existing data

Can be overwritten multiple


Types of ROM
Electrically Erasable PROM (EEPROM). Does not have to be entirely erased before rewriting

Advantage that the chip can remain in the circuit while


the contents are changed. However, the chip is still used
as read-only

No additional equipment is needed to change, so enables


firmware updates by non-technical users

Can be erased and reprogrammed several times, so


Bbenefit of using EEPROMs in an embedded system firmware can be updated and can erase a particular byte
or the whole EEPROM

Possible to reprogram or update without removing it


from the device
A headset can have one or two (LCD) displays
that output the image to the user.

The headset has speakers that output


surround sound to give a realistic experience

The user's head movements are detected using a sensor

Virtual reality headset


This sensor is a gyroscope (accelerometer).

The data is transmitted to a microprocessor


that analyses the data to identify the
direction of movement.

Some headsets use digital cameras that


record the user's eye movements for analysis.
Input 0 Output 1
Input 1 Output 0
NOT Gate

Any Input 0 Output 0


AND Gate

Any Input 0 Output 1


NAND Gate

Logic Gates

Any Input 1 Output 1


OR Gate

Any Input 1 Output 0


NOR Gate

Input Same Signals Output 0


Input Different Signals Output 1
XOR Gate
Lines used to transport address of memory or input/output location
Address Bus
Data travels one way (Unidirectional bus)

Used to transport data between the processor and


Data bus memory and input and output devices

Data can travel in both directions (Bidirectional bus)

Transports signals

For example read,write,fetch and interrupt


Control bus
Control the actions of the CPU

Can be either Unidirectional or Bidirectional

The width of the data bus determines the number of


Three buses used in the von Neumann bits that can be simultaneously transferred
model
Increasing the width of the data bus increases the
number of bits or amount of data that can be moved at
one time

Benefit of increasing the data bus width Hence improving processing speed as fewer transfers are needed

Example: double the width of the data bus moves 2x data


per clock pulse

If the data bus is 8 bits wide, and each instruction is 16


bits long, then the processor must access the main
memory twice during each instruction cycle

Significant increase in the number of directly addressed memory locations

For example increases the number of directly


addressable memory locations from 28 to 216
Benefit of increasing the address bus width
28 will give a range of addresses from 00 to FF

216 will give a range of addresses from 0000 to FFFF


1- PC (Program counter) holds address of the
instruction to be fetched

2- The address held in PC is sent to MAR (Memory


Address is sent using address bus
Address Register)
How an instruction is fetched in a computer
3- PC is incremented
based on the Von Neumann model?
4-The instruction is sent from address in memory to
Instruction is transferred using the data bus
MDR (Memory Data Register)

5- Instruction sent to CIR (Current Instruction


Fetch Cycle Register)

The contents of the Program Counter are copied to the Memory


MAR ← [PC]
Address Registe

PC ← [PC] + 1 The program counter is incremented

Fetch Stage using register transfer notation The data stored at the address held in MAR is copied into the
MDR ← [[MAR]]
MDR

The contents of the Memory Data Register is copied into the


CIR ← [MDR]
Current Instruction Register
A signal sent from a device or software

Definition Requests processor time

Interrupts have different priorities

Keyboard

Devices that make use of interrupts Printer

Mouse

Application is opened or closed on a system

A disk drive is ready to receive more

The user has pressed a key to interrupt the current process Ctrl+Alt+Delete

.exe file couldn’t be found


A software error has occurred
Divide by zero error

Paper jam
Examples of Interrupt
Buffer full

Printer ready

Interrupts a printer would generate an interrupt signal when Out of paper

Awaiting input

Out of toner/ink

Print complete

At the start or end of each fetch-execute cycle the


processor checks for interrupt(s)

Check if bit set in interrupt register

Processor identifies source of interrupt

Processor checks priority of interrupt

If interrupt priority is high enough


How the processor handles an interrupt Processor saves current contents of registers on stack

Processor calls interrupt handler (Interrupt Service


Routine (ISR))

Address of ISR is loaded into Program Counter (PC)

When servicing of interrupt complete, processor


restores registers from stack

Processor continues with next F–E cycle


Contains the address of the next instruction to be carried
Program Counter (PC)
out

Memory Address Register (MAR) Holds the address of the instruction or data that is next to be used

Holds dataor instructions when being passed between memory and


Memory Data Register (MDR) CPU

Acts as a buffer between memory and CPU

Current Instruction Register (CIR) Holds the instruction while it is being executed

Stores results of calculations


Accumulator (AC) All input to and output from processor pass through the
accumulator
Processor Registers

Store flags which are set based on the results of


arithmetic and logic operations

Contains individual bits that are either set or cleared

Used when an instruction requires arithmetic or logic


processing
Status Register (SR) Each individual bit in the SR operates as a flag

The bit is set to 1 if a condition is detected

The carry flag, identified as C, is set to 1 if there is a carry

3 Flags The negative flag, identified as N, is set to 1 if a result is negative

The overflow flag, identified as V, is set to 1 if overflow is detected

Stores a value; only used for indexed addressing


Index Register (IX/IR)
To store a value that is added to an address to give another address
The program is stored on a secondary storage
device (can be HDD or SSD)

Data and instructions are moved to random access memory (RAM)


Stored Program Concept or Von Neumann
Architecture Concept

Data and instructions are moved from RAM to registers to be executed

Instructions are fetched one at a time


Integrated circuit on a single microchip

Has the responsibility for the execution or processing of all the


instructions and data in a computer application

Synchronise the actions of other components in the CPU

Send or receive control signals along the control bus


Control Unit
Manage the execution of instructions in sequence

Controls the communication between the components of the CPU

An internal part of the CPU

Carries out calculations on data


The central processing unit (CPU)
The arithmetic part uses the usual operators such as multiply, divide,
add and subtract
CPU Consist of: Arithmetic Logic Unit (ALU)
The logic part carries out comparisons such as‘ equal to’,‘ greater
than’and‘ less than

Values need to be placed in the accumulator for calculations to be


carried out

Small piece of fast memory (eg: 16bits, 32bits, 64bits)

Part of the processor


Registers
Temporary storage of data

Data is about to be or has been processed

Components of von Neumann Architecture Fast to access

System Primary memory (also known as main memory) Directly accessible by the processor

Storage RAM and ROM form main memory, along with cache memory

Slow to access
Secondary storage (also known as backing storage)
It is not directly accessible by the processor

Used to communicate with other devices / allow


interaction with the computer
Input and output devices
For example, a keyboard (input) or printer (output)

Known as the CPU memory

Holds data and instructions when they are loaded from


Immediate access store (IAS) main memory and are waiting to be processed.

As it would be much too slow bringing them directly from


the main memory to be processed

Buses essentially move data around the computer

Buses Pathway for transmitting data and instructions

Used to connect together the internal components of the CPU


Clock speed Higher clock speed means more FE cycles per second

Number of cores Means more instructions can be carried out simultaneously

Factor that can affect the


performance of the computer system
Allows the transfer of more data each time and allows more memory locations to
Bus width be directly accessed

The higher capacity the more frequently used


Cache instructions it can store for fast access
Port is a connection point or interface between a
Definition
computer and an external or internal device.

Data transmission method

USB Port Uses serial transmission, bits of data are sent one at a time

Ports Universal standard

provides high-resolution screen display


Types of Ports
Video Graphics Array (VGA) IF the screen is needed to display a video,
the VGA port is not suitable because it does not transmit the audio
component.

Provide a connection to a screen and allow the transmission of


High Definition Multimedia Interface (HDMI)
high-quality video including the audio component
Immediate The operand is the value to be used

Direct The operand is the address of the value to be used

The operand is the address of the address of the value


Indirect
Modes of Addressing to be used

The operand plus contents of index register is the


indexed
address of the value to be used

The operand is the offset from the current address


Relative
where the value to be used is stored
Creates an executable

Program can be independently distributed

Reports all errors at the end of compilation


Compiler Checks the whole program for errors

Program does not require compiler or source code to be present

Cross-compilation is possible which means compile on one


hardware platform to run on another

Does not create an executable

Stops when it reaches an error


Interpreter Executes each statement immediately after de

Software and source code must be present in main


memory every time the program is executed

Compiler and Interpreter


Larger amounts of source code take time to compile

Slower to produce the object code than an interpreter

Code cannot be changed without recompilation

Drawbacks of using a compiler compared to an The program will not run if there are any errors
interpreter during program development
Errors cannot be corrected in real-time

One error may result in other false errors being


reported

Cannot easily test specific sections of the source code

Benefit Programs may be interpreted on different platforms

Some high-level languages are partially compiled Intermediate code still needs to be interpreted on the
and partially interpreted such as JAVA Drawbacks user’s computer, which may run slowly

Extra CPU resources may be required


Single software program

Used for program writing and editing


Definition
Used for translation

Used for testing program code

Syntax checking on entry

Structure blocks e.g. IF structure and loops begin and end highlighted

General prettyprint features Colour coding of command words

Automatic indentation Easier to see the code structure

Highlights any undeclared variables

Features in an IDE to help for debugging or Highlights any unassigned variables


white box testing Visual collapsing of blocks of code Allows programmer to focus on a section of code

To allow program statements to be executed one at a time

Single stepping Used to trace the path of execution (sequence)

Track variable values using a watch window

Breakpoints To stop the program at a specific line

Variable report window to monitor the value of variables as the program is run

Errors in keywords are highlighted before the


compilation process

Provides line-by-line syntax checking as code is typed in

Provides line number of the error

Display of known identifier names


Features in an IDE to help with the identification
of syntax errors Auto-complete

Integrated Development Environment (IDE) Colour-coding

Auto-indent

Type checking

Subroutine parameter checking

Context-sensitive help

Syntax checking (on entry)

Automatic indentation

Features of an IDE that are helpful when coding Type checking and Parameter checking

a program PrettyPrinting

Highlight structure blocks e.g. selection, iteration

Highlight any undeclared variables

Highlight any unassigned variables

Indentation

Presentation features provided by prettyprint Colour-coding of keywords and comments

Expansion and collapsing of complex data structures

Use an editor to write the source code


Write An editor provides features such as context-sensitive prompts ,
dynamic syntax checking, PrettyPrint and auto-indentation

Compiler will convert the source code into machine code


Features to write, test and trnslate a program Translate Interpreter is used to translate the source code line by line into
machine code

A debugger is used to find and help to correct errors.


Created by: Mr. Mahmoud Moussa Test
www.mahmoudmoussa.net e.g. single-step, break-points, watch-window
Dynamic Link Library

A shared library fil

Code is saved separately from the main .EXE files


Definition
Code is only loaded into main memory when required at
run-time

Can be made available to several applications at the same


time

The executable file is smaller as the executable file does


not contain all the library routines

DLL files are only loaded into memory when required

Improvements to the DLL file code are done


independently of the main program
Benefits of Using DLL Files So there is no need to recompile the main program
DLL File
All programs using it will benefit

A single DLL file can be made available to several


application programs

So saving space in memory

The executable code is not self-contained, the DLL


file(s) needed to be included at run time

Appropriate linking software must be available at run-


time to link DLL file

The DLL file must be present, otherwise unable to find


Drawback of Using DLL Files X.dll errors

Corrupted DLL file could mean the program stops


working as expected

Malicious changes to the DLL file could install a virus on


the user’s computer
Any directives are acted upon

Any symbolic address is added to the symbolic address table

First Pass Data items are converted into their binary equivalent

Reads the source code one line at a time

Two Pass Assemblers Removes white space

Any symbolic address is replaced by an absolute addr

Second Pass Forward references are resolved

Generates object code


Purpose To help users to set-up, configure, analyse, optimise, maintain the computer

To configure the disc for use, initialise tracks and sector

To initialise a file system (e.g. FAT, NTFS)


Disk Formatter
To install a boot sector

To check all sectors and mark bad sectors

To rearrange blocks that are used for each file to make


blocks contiguous so that file reading is faster
Defragmenter
To reduce head movements

To identify bad sectors so that they can be marked as unusable


Disc Checker
Verifies file system integrity and fixes logical file system

Utility Programs
To compress or decompress the contents of the disc,
Disc Compression thus increasing capacity

To store disk contents somewhere else in case of disk


Backup Software failure

Finds redundant or unnecessary files, gives the user the


Disc Cleaner option of deleting them if disc getting full

Disc Space Analysis Visually demonstrates the disc usage by showing sizes of files and folders

Firewall Prevents unauthorised access to computer system from external sources

Virus Checker Checks for viruses and then quarantines removes any virus found
Scheduling of processes , multi-tasking or multi-programming

Resolution of conflicts when two or more processes


require the same resource
Process Management
Enables processes to share data

Handles the process queue

Memory protection to ensure that two programs do not try to use the same space

Use of virtual memory

Main memory management Deciding which processes need to be in main memory at any one time

Location of processes within the memory

Example - when process terminates, memory is made available

Installation of appropriate driver software

Controls access to data being sent to or from peripherals


Peripheral management
Controls access to peripherals

Manages communication between devices and software


Operating System Functions

Maintains directory structures

File or secondary storage management Provides file naming conventions

Controls access

Makes provision for recovery when data is lost

Provides usernames and passwords and encryption


Security management
Prevents unauthorised access

Ensures privacy of data

Provision of a software platform On which other programs can be run

Identifies priorities of interrupts

Interrupt handling Save current memory or process values

Loads appropriate Interrupt Service Routine (ISR)


Deals with validity of data

Freedom from errors or data is reasonable


Data Integrity Deals with making sure data is not corrupted after, for
example, being transmitted

Example of ensuring integrity, e.g. parity checks, double entry


Security, privacy and data integrity

Data Security Prevents against loss

Data Privacy Prevents unauthorised access


Parity can be even or odd according to number of 1 – bits

Even Parity have an even number of 1-bits

Odd Parity have an odd number of 1-bits

First bit of a byte is parity bit; next 7 are packet of


data

Parity bit is allocated before transmission takes place


Parity Checking
Example of Even Parity: 10110100 needed a 1-bit to give even parity

Example of Odd Parity: 01100100 only needed a 0 since already odd parity

If packet arrives at destination and parity doesn’t match


up then an error in transmission has occurred

If more than one bit has been changed or bits transposed, parity
Disadvantage
check may not pick up transmission error

Error Checking Methods

The checksum for the bytes is calculated

This value is then transmitted with the block of data

At the receiving end, the checksum is re-calculated from


the block of data received

The calculated value is then compared to the checksum


transmitted
Checksum
If they are the same value, then the data was
transmitted without any error

If the values are different, then an error has been


found

If the values are different, then a request is sent for


the data to be retransmitted
Checking that the data entered is reasonable and sensible

Presence check Checks if data is actually present and has not been missed out

Range check Checks whether data is within given values

Type check Checks that the input data does not contain invalid characters.

Length check Checks if the input data contains the required number of characters.

Validation Format check Checks that data is in a specific format


Methods of Validation
Check carried out on numeric data

A calculation is performed on the individual digits to produce a check digit.


Check digit
After data input, the check digit is recalculated to make sure it produces
the original result.

Consistency check Checks if fields correspond with each other.

Limit check Only one of the limits is checked

Checking that data that has been entered into a computer has
been copied correctly from the data source.

Verification will not pick up the fact that the original data might be invalid.

Verification would pick up a transposition error but most


validation checks except a check digit would not.

Verification would pick up transcription errors but validation


might not.

Involves the entry of data twice; both versions are compared by


Double Data Entry the computer and the person entering the data is alerted by the
computer to any differences.

Validation and Verification Visually checking the entered data against the source document
Visual Check
Carried out by a human

Parity can be even or odd according to number of 1 – bits

Even Parity have an even number of 1-bits

Odd Parity have an odd number of 1-bits

First bit of a byte is parity bit; next 7 are packet of data

Parity bit is allocated before transmission takes place


Verification Parity Check
Example of Even Parity: 10110100 needed a 1-bit to give even parity

Example of Odd Parity: 01100100 only needed a 0 since already odd parity

If packet arrives at destination and parity doesn’t match up then


Methods of Verification
an error in transmission has occurred

If more than one bit has been changed or bits transposed, parity
Disadvantage
check may not pick up transmission error

The checksum for the bytes is calculated

This value is then transmitted with the block of data

At the receiving end, the checksum is re-calculated from the block


of data received

The calculated value is then compared to the checksum


Checksum transmitted

If they are the same value, then the data was transmitted without
any error

If the values are different, then an error has been found

If the values are different, then a request is sent for the data to
be retransmitted
Note:
Hacking, virus can delete and corrupt files.
Phishing, Pharming, and Spyware steal personal
information

The act of gaining illegal access to a computer system without


Description
the owner’s consent.

Identity theft or gaining personal information

Lead To Data can be deleted, changed or corrupted

Copying and distributing data


Hacking Run firewall

Use of strong passwords and user ids

Prevention Use of anti-hacking software

Will not stop hacking


Use of Encryption
Makes the data useless to the hacker

Program that replicates (copies) itself and is designed to


Description
delete, alter or corrupt files

Causing the computer to slow down or even crash (stop


responding).

Deleting important files or programs


What problems can viruses cause?
Corruption of the data stored on files

Can completely fill the hard disk

Attach itself to other files

Downloading infected files from the internet

Email attachments that contain infected files


How do viruses infect computers?
Plugging a flash memory stick that containing infected files
into your computer

Scans files for viruses

Can constantly run in background

Viruses Can run a scheduled scan

Can automatically updating virus definitions

Can quarantine a virus


Use up-to-date running anti-virus software Anti-Virus Tasks
Can delete a virus

Heuristic checking is checking of software for types of behaviour that could indicate a
Completes heuristic checking possible virus, useful if software is infected by a virus not yet on the database

Notifies user of a possible virus


Prevention
Checks data before it is downloaded and stops download if virus
found/warns user may contain virus

Security Risks Use a firewall

Only open email attachments from people you trust

Scan flash memory with anti-virus software before you attach


it to your computer

Only download software from trusted websites

Don't use disks/CDs/DVDs/memory sticks from unknown


sources

Legitimate-looking emails sent to a user

As soon as recipient clicks on link in the email


Description The user is directed to a fake website without their
knowledge
Phishing
To obtain financial information

Do not open emails from unknown sources


Prevention
Run firewalls

Malicious code installed on user’s hard drive or web server

This code redirects user to a fake website without their


Description
knowledge
Pharming To obtain financial data

Use anti-spyware software


Prevention
Make sure that you are on a secure (https) website

Software that gathers data from computers without the user


realising

It monitors and records all key presses


Description
It sends this information back to the hacker who sent it out

To obtain financial information


Spyware Use of anti-spyware software

Drop-down boxes Means key logger cannot collect data

Prevention Only requires part of the password

Two-step verification

Use a biometric device


Encrypt the data

Biometrics

Firewall
A company stores personal details of its Anti-spyware
customers on a computer system what the
Virus checking software
company should do to keep this data safe.
Spyware checking software

Physical method e.g. locked doors

Access rights

Strong password

Biometric device

TLS

Security methods that could be used to make Anti-spyware software

online banking safer Firewall

Two-step verification

Use of drop-down boxes

Proxy server

Backups
Security Measures
Anti-virus

Methods that could be used to avoid loss of Firewall

stored data. Biometrics

Restricted access

Physical methods

Drop-down boxes

Online bank to reduce the impact of spyware Only requires part of the password

when logging on Two-step verification

Use a biometric device

Firewall

Strong Passwords
Company - How to prevent unauthorised access?
Biometrics

Physical security methods

Using HTTPS (Hypertext Transfer Protocol Secure)

Keep data safe during transimission Using Secure Socket Layer (SSL) protocol

Using Transport Layer Security (TLS) protocol


Scrambling characters so that message makes no sense

Definition Requires an encryption key to encrypt data

Need decryption key to decipher encrypted message

Symmetric Encryption The same key is used for encrypting and decrypting

A PRIVATE KEY and a public key are both needed to encrypt and decrypt messages.

Public key is made available to everybody

Private key is only known by the computer user

More secure method than symmetric encryption

Sender encrypts email


Types of Encryption
Asymmetric Encryption (PUBLIC KEY encryption) Using public key of receiver
How it is used to encrypt emails?
Receiver decrypts email

Encryption Using receiver's private key

Increased message security as one key is private

Benefits Allows message authentication

Detects tampering

How the strength of the encryption can be Increase the length of the key
improved? Uses a more complex encryption algorithm

The text or normal representation of data before it


PLAIN TEXT
goes through an encryption algorithm.

CYPHER TEXT Output from an encryption algorithm


Detect unauthorised changes to message
Benefits
Authenticate sender's identity

Message is hashed

Hash encrypted with A's private key

Encrypted hash is known as the digital signature

The message and the hash are sent over the internet

Receiving software decrypts digital signature using


How it is used??
Digital Signature sender's public key to reveal hash

Receiving software reproduces hash from received


message

If received hash matches reproduced hash then message


has not been tampered with or identity of sender is
authenticated

Financial transaction

Uses Legal document

Software distribution
Software engineers shall act consistently with the public
PUBLIC inte

Software engineers shall act in a manner that is in the


CLIENT AND EMPLOYER best interests of their client and employer (consistent
with the public interest.

Software engineers shall ensure that their products and


PRODUCT related modifications meet the highest professional
standards possible

Software engineers shall maintain integrity and


JUDGEMENT independence in their professional judgment

Principles of the ACM/IEEE Software


Engineering Code of Ethics Software engineering managers and leaders shall
MANAGEMEN subscribe to and promote an ethical approach to the
management of software development and maintenan

Software engineers shall advance the integrity and


PROFESSION reputation of the profession (consistent with the public
interest).

Software engineers shall be fair to and supportive of


COLLEAGUES their colleagues.

Software engineers shall participate in lifelong learning


regarding the practice of their profession and shall
SELF promote an ethical approach to the practice of the
profession
Software is sold for a fee

With a licence which restricts the number of users

The program code for the software cannot be edite

Support or training is readily available so help can be accessed if


needed

More robust software as it has been tested more thoroughly/by


Commercial
more u

Forums will exist for popular software


Benefits in choosing the commercial software?
Software upgrade path likely to be available at minimal cost

Manufacturer develops patches that can be automatically


downloaded

Types of Software Licences Compatibility is inbuilt for other commercial software

Free for a trial period

Shareware Limited features

When trial ends then users must pay for it to use it

Source code comes with the software

The software can be modified by the user


Open Source
Once edited, the software is re-distributed with the
chan
Refers to the simulation of human intelligence in a
Definition: machine that is programmed to think like humans

The rules, past moves and decision making algorithms of the game
will be stored

The AI program is trained, by playing many times

AI will look ahead at possible moves and analyse the pattern of


past choices
Chess Game How AI is use?
Then choose the move most likely to be successful

Computer could learn how to improve or learn from previous


mistakes

By storing the positive or negative result of choices and changing


its future choices

Machines can learn from past mistakes and they can adapt to stop
the same problem occurring again
Applications
They can learn to predict what might happen and raise an alert

Artificial Intelligence Machines can learn how to work more efficiently


Improve the safety and efficiency in factory
When an action slows the system down, it can prevent this
happening again

when an action increases the speed of the system, it can repeat


this when necessary to improve the efficiency

Machine learning

Natural language processing

Robotics

Self-driving car

Increase in unemployment (workers will be replaced by


Negative Impact machinery)

Make Humans Lazy


The impact of AI on human society
Fast and accurate
Positive Impact
Less Risk
Set up search criteria

Query Processor To find the data that matches the criteria

Example - Find pupils who were absent on a particular day

Table names

Data types

Field names
Data Dictionary A file containing all the data about the detail of the database design
Primary keys

Foreign keys

Relationships

The overview of a database structure

Logical Schema Models the problem by using methods such as an ER diagram


DBMS features
Independent of any particular DBMS

Methods of protecting the data including the uses of


Data Security passwords and different access rights for different
users of the database

Data Integrity Data design features to ensure the validity of data in the database

Create a user-friendly forms including drop-down boxes

Create reports

Developer Interface Enables a developer to Create a table

Set up relationships between tables

Create a query (NOT run a query)


By storing data in separate linked tables data
redundancy is reduced

Data integrity issues are reduced as data only


needs to be updated once

Unwanted or accidental deletion of linked data is


prevented as the DBMS will flag an error

Program - data dependence is overcome

Changes made to the structure of the data have


little effect on existing programs.

Relational Database Benefits over Flat File Complex queries can be more easily made as the
DBMS will have a query language

Unproductive maintenance is eliminated as


changes only need to be made once rather than
changing multiple programs

Fields can be added or removed without any


effect on existing programs that do not use
these fields.

Security of the data is improved as each


application only has access to the fields it needs

There is better control of data integrity as the


DBMS uses its Data Dictionary to perform
validation checks on data entered
Entity Any object, person or thing about which it is possible to store data

Dataset organised in rows and columns; the columns form the


Table structure and the rows form the content

Any attribute or combination of attributes that can


Candidate key qualify as a unique key

Attribute(s) in a table that link to a primary key in another table


Foreign key to form a relationship

Database Terms
Attribute or combination of attributes that is used
Primary key to uniquely identify a record

Are not necessarily unique and can contain duplicate values. They
Secondary Key are used to speed up the retrieval of data based on columns other
than the primary key

Tuple A row of data in a table about one instance of an object.

One item of data or information about a person or thing in a


Field (Attribute) database table
Ensures related data in tables are consistent

If one table has a foreign key the ‘foreign’ table


Referential Integrity
Then it is not possible to add a record to that table
unless there is a corresponding record in the linked table
with a corresponding primary key in the ‘primary’ table

If a record is deleted in the ‘primary’ table


Cascading Delete All corresponding linked records in ‘foreign’ tables must
also be deleted

If a record in the ‘primary’ table is modified


Cascading Update
All linked records in foreign tables will also be modified

Referential Integrity makes sure data is consistent

Referential Integrity makes sure all data is up-to-date

Database Terms Referential integrity ensures that every foreign key has a
corresponding primary key

Why referential integrity is important in a database? Referential Integrity prevents records from being added, deleted
or modified incorrectly

Referential Integrity makes sure that if data is changed in one place


the change is reflected in all related records

Referential Integrity makes sure any queries return accurate and


complete results

In database software, creating a secondary key on an


attribute to provide fast access when searching on that
Indexing
attribute; the indexing data must be updated when the
table data changes

Tuple A row of data in a table about one instance of an object.

One item of data or information about a person


Field (Attribute)
or thing in a database table
BIRD_TYPE(BirdID, Name, Size) CREATE TABLE BIRD_TYPE(
BirdID, Name, Size of type character BirdID CHAR(4) NOT NULL,
Name VARCHAR(9),
Write a Structured Query Language (SQL) script to Size VARCHAR(6),
define the table Bird_Type. PRIMARY KEY (BirdID) );

CREATE TABLE STUDENT_TEST (


SQL Examples StudentId INTEGER,
STUDENT(StudentID, FirstName, LastName)
TEST(TestID, Description, TotalMarks) TestID VARCHAR,
STUDENT_TEST(StudentID, TestID, Mark) Mark INTEGER,
PRIMARY KEY(StudentID,TestID),
Write a Structured Query Language (SQL) script to create
FOREIGN KEY(TestID) REFERENCES TEST(TestID),
the table STUDENT_TEST FOREIGN KEY(StudentID) REFERENCES STUDENT(StudentID)
);
BIRD_TYPE(BirdID, Name, Size) SELECT BIRD_TYPE.Size, COUNT(BIRD_TYPE.BirdID)
BIRD_SEEN(SeenID, BirdID, Date, Location, PersonID)
PERSON(PersonID, FirstName, LastName, EmailAddress)
AS NumberOfBirds
FROM BIRD_TYPE, BIRD_SEEN
Write a Structured Query Language (SQL) script to return WHERE BIRD_SEEN.PersonID = "J_123"
the number of birds of each size seen by the person with AND BIRD_TYPE.BirdID = BIRD_SEEN.BirdID
the ID of J_123. GROUP BY BIRD_TYPE.Size;

The database Lessons has the following tables:


HORSE(HorseID, Name, Height, Age, HorseLevel)
STUDENT(StudentID, FirstName, LastName, RiderLevel, PreferredHorseID)
LESSON(LessonID, Date, Time, StudentID, HorseID, LessonContent) SELECT Name
Dates in this database are stored in the format #DD/MM/YYYY#. FROM HORSE
The fields RiderLevel and HorseLevel can only have the values: Beginner, WHERE HorseLevel = "Intermediate" OR
HorseLevel = "Beginner";
Intermediate or Advanced.
Write a Structured Query Language (SQL) script to return the names of
all the horses that have the horse level intermediate or beginner

SQL Examples
PHOTO_DATA(PhotoID, PartyID, TimeTaken, CameraID)
Write a Structured Query Language (SQL) script to display the SELECT COUNT (PhotoID)
FROM PHOTO_DATA
total number of photographs that have been taken using a camera WHERE CameraID LIKE "CAN*;
with a camera ID starting with CAN.

Write an SQL script to include two new fields in


CAMERA_DATA to store the number of photographs ALTER TABLE CAMERA_DATA
currently on the camera and the date the camera was ADD NumberStored INTEGER, LastUsed DATE;
last used

TREE(TreeID, ScientificName, MaxHeight, FastGrowing)


Write the Structured Query Language (SQL) script to add a new INSERT INTO
TREE(TreeID, ScientificName, MaxHeight, FastGrowing)
record in the table TREE to store the following data VALUES('LOW_1276', 'Salix_Alba', 30.00, TRUE);
'LOW_1276', 'Salix_Alba', 30.00, TRUE

You might also like