0% found this document useful (0 votes)
9 views105 pages

As Cs Notes All Chaps

The document covers various aspects of information representation, including number systems (denary, binary, hexadecimal), character sets (ASCII, Unicode), and image and sound processing. It also discusses networking technologies, detailing Local Area Networks (LAN) and Wide Area Networks (WAN), their benefits, disadvantages, and associated hardware. Additionally, it explains the fundamentals of internet connectivity and communication systems.

Uploaded by

white crewmate
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)
9 views105 pages

As Cs Notes All Chaps

The document covers various aspects of information representation, including number systems (denary, binary, hexadecimal), character sets (ASCII, Unicode), and image and sound processing. It also discusses networking technologies, detailing Local Area Networks (LAN) and Wide Area Networks (WAN), their benefits, disadvantages, and associated hardware. Additionally, it explains the fundamentals of internet connectivity and communication systems.

Uploaded by

white crewmate
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

CH1 - INFORMATION REPRESENTATION

DENARY
-​ base 10 with digits 0-9

BINARY
-​ base 2 system, represented with 1 and 0
-​ All inputs need to be converted to binary for computers
*Nibble = 4 bits
*Byte = 8 bits

Converting Negative Decimal Numbers into Binary Numbers


1.​One’s Complement
-​ Process: Turn all ‘0’s to ‘1’s and the ‘1’s to ‘0’s
-​ Example: 01000011 → 10111100
2.​ Two’s Complement
-​ Process: Turn all ‘0’s to ‘1’s and the ‘1’s to ‘0’s, and add 1
-​ Ex: 0111 → 1000 → 1001
​ ​ : 1111 → 0000 → 0001
​ ​ : -65 → 65 → 01000001 → 10111110 → 10111111
-​ Added together to get another ‘1’ at the beginning of the binary (to be ignored, tally bit, overflow)
-​ If it is a positive number already, just convert it like normal.

BINARY ARITHMETIC
-​ Overflow
-​ The largest number of bits a register can hold at a time is exceeded
-​ CPU discards the overflow digit (It will think it is 255 + 1)
-​ Ex: 11111111 + 1 → 1 00000000 → 00000000

BINARY CODED DECIMALS (BCD)


= binary encodings of decimal numbers where each digit is represented by a fixed number of bits
1.​Unpacked
-​ A numeral encoded into one byte (8 bits, first 4 0s insignificant)
-​ Ex: 8 5 0 3 → 00001000 00000101 00000000 00000011
2.​ Packed
-​ A numeral encoded into a nibble (4 bits, most significant), typically used for transmission, can
be made into 2 bytes
-​ Ex: 8 5 0 3 → 1000 0101 0000 0011 → 10000101 00000011
Applications of BCD:
-​ Digital Calculator
-​ Digital Clock
-​ Digital Thermometer
-​ Currency Values
HEXADECIMAL (base 16)
Why
-​ Easier to debug as it is close to human language
-​ Reduces errors as less digits to write
When
-​ MAC addresses
-​ RGB colors in HTML

CHARACTER SETS
-​ All the character/symbols a computer can represent
-​ Each character has a unique binary value used to represent them

ASCII CODE (AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE)


+​ Has a unique binary code for each character known as, Character Code
+​ Each c haracter is replaced by its code
+​ When storing a word , the code is stored in the same order as in the word
+​ 7 bit code, uses 1 byte of memory per character and extended ascii uses 8 bits
+​ Typically used for storing, displaying or printing text
+​ EXTENDED ASCII : Uses 8 bits per character
Limitations:
-​ Only supports 128 characters ( 256 with extended)
-​ Does not support many symbols from international languages (not enough space to store)
Special features:
-​ Uppercase letters only differ from lowercase letters in bit 6
-​ Ex: a (01100001) → A (01000001)
-​ It is in alphabetical order

UNICODE
+​ Covers majority of different languages across the world
+​ Uses 16 bits/32 bits (4 digits only, represents 2 bytes)
Limitations:
-​ Requires more space compared to ASCII (16 bits instead of 8 bits)
-​ More bits are required for non-ASCII characters

Special features:
-​ Big enough to handle all existing characters and symbols
-​ Characters from the same language are grouped together and are in its natural order (if can be made
possible)

IMAGES
VECTORS BITMAP

Adobe Illustrator, Adobe Photoshop (SVG, CGM) JPEG, PNG

+​ To edit the design, need to change each of +​ Consists of a matrix of individual dots (or
the geometric shapes pixels) that all have their own color (made up
+​ File size is small since made up of of binary)
geometric shapes +​ Made up of pixels
+​ Created by a drawing package or a +​ Image built from pixel by pixel, final image
computer-aided design (CAD) are usually very realistic
+​ Constructed using mathematical formulas, +​ Can edit each pixel to change the design of
which makes it scalable the image
+​ Has a drawing list +​ Most images are typically stored as a bitmap
+​ Bitmap image usually have a file header

-​ limited number of geometric shapes causes -​ very large file size because of pixel
graphics to not appear to be very realistic (accurate designs)
-​ Only can be displayed on a graph plotter -​ Poor quality when zoomed in
(expensive hardware), not cost effective -​ Decimation: throwing away pixels when
zooming out which changes the image in an
unacceptable manner
-​ Slow reading and rendering process (due to
expansion of compressed data)

*Drawing list = set of commands used to define a property (thickness, style, colour, fill colour) of the object

*Vectors = scalable and do not pixelate like a bitmap image therefore are used by corporations to create logos
as they can resized without losing quality

*Pixel= small blocks of addressable areas & the color they have is represented by binary and stored as bits
*File header = a few bytes of binary and represents basic information about the graphic, such as image
resolution, size, and number of colors
*Image resolution = the amount of pixels an image contains per inch
*Screen Resolution = the number of pixels per row by the number of pixels per column
*Color depth = number of bits used to represent the color of a single pixel
-​ The higher the color depth/image resolution, the better the color quality and. file size
*Bit depth = the number of bits used to represent each pixel in an image

SOUND
= vibrations that travels through a medium
-​ continuous in nature

1.​ Analogue to Digital Converter (ADC):


-​ Converts analogue sound to digital signals which can be digitally stored
-​ Analogue wave is picked up by a microphone and send to an ADC in the form of analogue electrical
signals
-​ Once the sound wave is converted into a digital form it can be stored and manipulated

2.​ Digital to Analogue Converter (DAC)


-​ converts digital signals into analogue signal that can be output
-​ DACs take a binary number of the digital form of audio and turn it into an analog voltage or current that,
when done, can create a wave of audio that represents the digital signal
-​ It creates the analog version of the digital audio in "steps" of each digital reading

HOW SAMPLING WORKS


-​ amplitude of the sound wave is first determined at set time intervals (sampling rate)
-​ Gives an approximate representation of the sound wave
-​ Sound wave is then encoded as a series of binary digits

*Sampling rate = number of samples taken per second


-​ higher sampling rate means the waveform will be converted from analog to digital form more accuracy
*Sampling Resolution = number of bits assigned to each sample
-​ sampling resolution allows user to set the range of volumes storable for each sample
-​ Quality of sound produced using a sound sampler depends on the sampling rate/resolution
+​ High Sampling rate/resolution
+​ less sound distortion
+​ better sound quality
+​ Larger dynamic range
-​ Larger file size
-​ Longer to transmit/download files

NOTE : If either sampling rate or sampling resolution is increased or both , there will be smaller gaps between
sample (rate) which makes the digital sound more accurate and reduce quantisation error and increase
amount of detailed [Link] digital waveform will more closely resemble the analogue waveform
COMPRESSION
= technique to reduce the size of a file without reducing the quality in the use of the file
Why?
-​ files tend to have large file size
-​ Transfer speed is slow

LOSSLESS LOSSY

PNG jpeg, MP3

+​ compressed file which can be restored to its +​ Unnecessary data is permanently removed
original file size +​ The unnecessary sounds (such as
+​ Save the color code for every pixel background noises) can be removed from the
+​ Use run length encoding audio file to reduce the file size.
-​ Lossy not used on text file as it can corrupt +​ an image which has a large background
the file could be encoded so the background pixels
have a lower resolution
+​ Colors such as blue, to which the human eye
is less sensitive could be encoded at a lower
resolution

RUN LENGTH ENCODING


= compression in which sequences with the same data value in many consecutive values are stored as a
single data value and count
-​
-​ form of lossless file compression that reduce the size of a string
-​ Can be used on images, text
-​ Ex: 000012341111 => (0-4)1234(1-4)

METHODS ON FILE COMPRESSION


1.​ Movie Files
-​ reduce the sampling rate used
-​ Reduce the sampling resolution
-​ Reduce frame rate
2.​ Image Files
-​ crop the image
-​ Decrease color/bit depth
-​ Reduce image resolution

CH2 - COMMUNICATION AND NETWORKING TECHNOLOGIES

LOCAL AREA NETWORK (LAN)


network contained within a small building
-​ belong to an organisation/private
-​ Geographically small
-​ Use cable/low powered radio (wireless) for connections (twisted pair)
Benefits:
-​ Resource sharing, a number of devices can share the same resources such as printers
-​ More secure than wide area network as it is easier to implement security measures due to small area

-​ Cheaper,less expensive to install especially in small areas


-​ Expense of installing application software on each pc could be saved by installing the software
on the application server attached to a LAN
-​ Instead of using many cheap printers for each pc, can use one good quality printer attached to a
LAN
-​ Efficient
-​ File server that's attached to LAN allows user to store and share large files
-​ Paperless office - can be save on file server
Disadvantage:

-​ managing can be difficult and complex


-​ Malware and hacking can affect the entire network
-​ Central dependency many LAN can depend on a single point or server
-​ Limited range they are confined to a small area
-​ Performance issues as more devices are added to LAN network performance can degrade

HARDWARE:
1.​ hubs
-​ Connects devices to form LANS
-​ Send data packets to every computer in the network this leads to security risks and wastes
bandwidth
2.​ Switch
-​ Connects devices to form LAN send the data packets to appropriate node thus more secure
than hubs
-​ Devices within a network that forward packets within the network itself
-​ Allow multiple computers to connect to a network through a single node
3.​ Server
-​ Computer or system that provides resources, data, service to computers, known as clients
4.​ Network Interface Card (NIC)
-​ Computer hardware component that connects a wire-based computer to a computer network
usually the company’s network
-​ It allows computers to connect to networks such as the internet.
5.​ Wireless Network Interface Card (WNIC)
-​ Computer hardware component that connects a radio-based computer to a computer network
usually the company’s network
-​ Use antennas to communicate with the computer via microwaves
-​ And usually plugged to the USB port
6.​ Wireless Access Point (WAP)
-​ Access point which allows wired devices to connect to a wired network the wap itself is
connected to the wired network.
-​ Hardware device on a LAN that allows wireless capable devices and wired networks to connect
through a wireless standard (WiFi or Bluetooth).
7.​ Cables
-​ Wired transmission medium that allow communication in wired networks
-​ Coaxial, Twisted Pair, and Fibre optic cables
8.​ Bridge
-​ Connect two lans with the same protocols
-​ Connect multiple devices that has the same protocol & provide communication between them
9.​ Repeater
-​ Extend the range of a network by regenerating and amplifying signals allowing signals to reach
long distances
-​ Prevents dead spots
-​ Non logical devices as the boost all signals detected
-​ Unmanageable
-​ latency
-​ Expanding network coverage by combining 2 LAN signals
WIDE AREA NETWORK (WAN)
= network that extends over a large area
-​ created by joining several LAN together
-​ Used by company to connect different sites but not owned by the company
-​ Provided from a PSTN(Public switched telephone network)
-​ Use fibre optic Cable, satellite radio, and microwave radio
Benefits:
-​ Wider reach : can connect locations over large distances allowing businesses to operate in different
cities.
-​ Resource sharing organisation can share resources such as servers database and applications
-​ Scalability, they are easily expandable
-​ Job can be run on a remote computer that had the required application software
-​ Data archive that was stored on a remote computer can be access
-​ Message could be transmitted electronically to a user on a remote computer
Disadvantages:
-​ Expensive to setup due to the need of dedicated lines and routers
-​ More complex to manage than LAN need specialised knowledge and skills
-​ Security vulnerability the larger the network the increase in potential attacks
HARDWARE
1.​ Routers
-​ Connect 2 different networks using the same protocol.
-​ Regulate network traffic
-​ Assign private IP address
-​ Calculates the most efficient route for data packets to be sent
-​ Receive and forward packets from a network using the most efficient route
2.​ Gateways
-​ Connect 2 network using different protocol
-​ Regulate network traffic
-​ Assign private IP address
-​ Convert data packets from one protocol to another
-​ Receive and forward packets from a network
3.​ Server
-​ Computer or system that provides a specific function for computers using a network such as file
storage, delivery of web pages, etc
4.​ modems
-​ It allows the computer to connect to the internet by turning digital data into an analogue signal
so it can travel over phone lines and cable wires

INTERNET WORKING
= shortened to Internet
INTERNET is massive network of networks which are made up of various computers and electronic devices
-​ uses IP protocol/ transmission control protocols (TCP)
-​ Access provided by internet service providers
-​ Forms a collection of connected networks and is a packet-switched network
-​ All network traffic is made up of packets of data with a source address and destination address
-​ There will be a large number of available paths for the transmission of any data packet

FUNDAMENTAL REQUIREMENTS TO CONNECT TO THE INTERNET


-​ A device
-​ Telephone line connection or a mobile network connection
-​ A router
-​ Internet service provider
-​ A web browser

Hardware to support the Internet/COMMUNICATION SYSTEMS:


1.​ Public Switched Telephone Network (PSTN): traditional network used for telephone communications
​ = switching centre that connects all networks together
-​ allows any telephone to communicate with each other
-​ Dedicated channel used between 2 points for the duration of the call via circuit
switching
-​ Always open whether or not somebody is talking
-​ Connection maintain throughout the telephone call
-​ Line remain active even in a power outage,they have their own power source
-​ Bidirectional communication
2.​ Dedicated Line:private communication channels reserved exclusively for a specific user or
organisation. Used for
-telecommunication,uninterrupted voice calls
-internet access, high speed connections and uninterrupted access to the web
-data transfer,secure connections and consisted data transfer
​ = permanent connection that is used for business purposes
-​ Not commonly shared among multiple users bought/leased
-​ Allows consistent data transfer speed
-​ Hence allow users to maintain a continuous, uninterrupted calls
3.​ Cell Phone Networks: communication systems that allows mobile phones to connect to each
other / telephone networks and the [Link] a series of interconnected CELLS EACH
served by a BASE STATION
​ = Wireless network spread over large areas called ‘cells’
-​ each cell is served by at least 1 fixed location transceiver = base station
-​ Each cell uses a different set of frequencies to avoid interference
-​ When joined together, cells provide radio coverage over a wide geographical area
4.​ Internet Service Provider
​ = organisation that provides services for accessing and using the internet

CLIENT SERVER MODEL


= server based network where the the clients send requests data to the server and the server processes
and sends the data to the client
-​ clients sends a request to the server and server find requested data and send it back to client
Benefit:
-​ More secure
-​ Users need username and password
-​ Files and resources are centralised hence easier to manage
-​ Provide backup solutions due to centralised storage
Costs
-​ Expensive to set up and maintain servers
-​ If the servers goes down the network stops as well

Types of Servers:
1.​ File Server
-​ all software and user data files can be stored on the server
2.​ Email Server
-​ send, receive, and store emails
3.​ Print Server
-​ manages print jobs from network client computers
4.​ Database Server
-​ manages a database management system; MySQL
5.​ WebServer
-​ manages pages available from a website

PEER-TO-PEER
Decentralised network where each node connected to each other stores its own data and acts as a client
and server
= consist of a direct link between 2 computers, therefore not needing any server
-​ no central server
-​ Nodes can share files with each other and each nodes will have its own data
Benefits:
-​ faster and more reliable because its a direct connection/less network traffic each peer can
simultaneously receive data from different sources
-​ No need to authentic users
-​ Scalability is easier
-​ Cheaper since there is reduce need of servers in the network
-​ If one node goes down the network still works

Disadvantages:
-​ used in small areas
-​ Security risks as there is no authentication
-​ Data integrity issues ; data is accessed by many clients, hence may be inconsistent
-​ Max nodes = 10
-​ Performance issues.

THIN-CLIENT
= a client that only provides input and receive output from the application
-​ choose an app to run on the server
-​ Sends input data to the server when requested by app
-​ Received output from the app
Benefits:
-​ cheap to expand
-​ Hardwares are cheap
-​ All devices are linked to a server
-​ Update and new softwares installation done centrally
-​ Server can offer protection against malwares and hacking
Disadvantages:
-​ High reliance on server
-​ Goes down = devices won't work
-​ Startup cost is high
THICK CLIENT
= a client that carries out at least some of the processing itself
-​ Choose an app provided by the server
-​ Possibly carries out some processing before running the app on the server and also after receiving
the output from the app
-​ Possibly download the app from server and runs the app by itself
Benefits:
-​ More robust
-​ Can carry out processing even without connection to server
-​ Clients have more control
-​ Store their own programs and data/files
Disadvantages:
-​ Less secure
-​ Rely on client to keep own data secure
-​ Each client need to update data and software individually
-​ Data integrity issues
-​ Many clients access the same data which can lead to inconsistencies

THIN CLIENT THICK CLIENT

-​ relies on a connection to a remote server -​ can run some features even without
-​ Requires very few local resources; SSD, connection to the server
RAM -​ Relies heavily on local resources
-​ Relies on good, stable, and fast connection -​ More tolerant on slow network connections
-​ Data is stored on a remote server -​ Can store data on local resources; HDD,
SSD

ETHERNET
Protocol used by wired lans which allows devices in the lan to send data between themselves via cables
Made up of:
A node(any device on LAN)
medium(path used by LAN devices such as ethernet cables)
frame(data is transmitted in frames which are made up of source address and destination addresses)

CONFLICTS
Occurs when devices on the same network have the same IPaddress . it is impossible for devices without
unique IP addresses to connect to the internet .
Occurs when one device having a dynamic IP address has the same address as a device having a static ip
address.
To resolve this a router may need to be restarted.

COLLISION
Occurs when two nodes are transmitting data on the same channel at the same time
Carrier sense multiple access with collision detector(CSMA/CD)
-> Protocol used to detect and prevent collisions especially in bus topologies
-​ A node listens to the communication channel
-​ Data is only sent when channel is free
-​ SInce there is more than 1 computer connected to the same transmission medium,
-​ If 2 workstations transmit at the same time , it can cause a collision
-​ If a collision happens , the workstations send a jamming signal
-​ Each node waits a random amount of time before attempting to resend

CLOUD COMPUTING; allows computers to access or store data and application over the internet
instead of local computers and servers
= the provision of computing services usually via the internet
Benefits:
-​ Accessibilitycan be accessed from anywhere where the internet is available.
-​ Acts as a backup for any accidental data loss.
-​ Scalability, easy to adjust to cope with an organisation's requirement.

Disadvantages:
-​ Security risks, data stored can be vulnerable to hacking.
-​ Internet dependency requires a stable internet.
-​ Downtime cloud service providers may experience outages that may make data unable to access.
-​ Ongoing costs such as subscription fees.

1.​ Private Cloud


​ = owned by one organisation and only accessed by one organisation
-​ The organisation takes full responsibility for creating and managing the cloud installed on-site
and connected to a private network.
-​ The organisation outsources to a third party the creation and management of an on-site
installation to a private network
-​ The organisation outsources the creation and management of an internet accessible system
by a third-party
Benefits:
-​ Enhanced security, since resources are only for one organisation which means greater
control over security measures reducing risk of data breach.
-​ Flexibility, can scale resources up or down based on their needs.
-​ Customization organisations can tailor infrastructure and applications to meet specific
requirements.
Disadvantage:
- more expensive, due to the need of purchasing hardware and having top personnel.
- complex to maintain and manage need high level skills.

2.​ Public Cloud: computing services are provided over the internet by a third party provider
​ = owned by a cloud service provider for general access.
Advantages
-Cost effective, users only pay for the resources they consume while the costs of maintenance is
taken upon by service providers.
- can be accessed anywhere where the internet is available.

Disadvantages
-​ Security risks, shared resources can expose sensitive data to breaches.
-​ Limited control over infrastructures and may face limitations in customization .
-​ Downtime,cloud services providers can experience outages preventing accessibility.

TOPOLOGIES
1.​ Bus
-​ Single central cable connecting all devices with terminators at each end
-​ Terminators are needed at each end to prevent signal reflection
-​ Travels in only one direction(if data is sent between devices than the other device cannot
transmit.
-​ They are typically peer to peer
Benefits:
-​ Even if one node fails the network still functions.
-​ Easy to increase the size of the network by adding additional nodes.
Disadvantages:
-​ If the main cable breaks the entire network goes down.
-​ Performance deteriorates after heavy loading.
-​ Difficult to troubleshoot therefore not used in large networks.
-​ Not secure since each data packet passes through every node.

2.​ Star
-​ Uses a central switch/ hub where nodes are connected .
-​ Each node has a dedicated connection.
-​ Each end-system has a point-to-point connection to the central device
-​ Transmission is duplex
-​ The central device can be used to connect the network to other networks
Benefits:
-​ More secure data goes to the correct data packets.
-​ Easy to install and wire.
-​ No disruptions to the network if one node fails.
-​ Easy to detect faults and to remove parts.
Disadvantages:
-​ Requires more cable length than a linear bus topology.
-​ If switch/hub goes down than the entire network goes down goes down.
-​ More expensive than linear bus topology because of the cost of the connecting devices
(network switches).

3.​ Mesh
There are two types routing where nodes acts as routers and send the data to the correct node by
using the shortest route and flooding where router send to sends to all the nodes
-​ Every network device is connected to another network device
-​ Used for site-to-site WAN connectivity, to increase redundancy
Benefits:
-​ Easy to expand.
-​ Easy to recognize faults.
-​ Privacy as data packets are sent in dedicated routes.
-​ If one link is down, we have another path to reach the destination.
Disadvantages:
-​ Is costly because of the extra cables needed.
-​ It is very complex and difficult to manage.

4.​ hybrid
-​ Is a type of network topology, which is made of two or more different topologies.
made using a combination of bus topology, star topology, mesh topology (full-mesh topology
or partial-mesh topology), ring topology or wireless topology as per the requirement of the
organisation.
Advantages
-​ Can handle large traffic .
-​ Easy to recognize faults.
-​ Well suited for the creation of large networks.

Disadvantage
-​ Is difficult and complex to manage.
-​ Expensive to set up.

WIRED NETWORK VS WIRELESS NETWORK

WIRED NETWORK WIRELESS NETWORK

uses cables to connect devices Uses radio waves and infrared signals to transmit
data between devices without the need of a cable

+​ Faster data transfer rates +​ Accessibility, can offer internet access from
+​ More reliable (are less vulnerable to anywhere where wires are impractical
interference such a weather and physical +​ Scalability ; straightforward and easy no
obstacles providing a more stable need for additional infrastructures for
connection) expansion
+​ More secure (as they require physical +​ Mobility as not tied to cable
access to the network making unauthorised +​ Cheap as it eliminates wiring expenses
access difficult +​ Easier installation,Easy to set up as there
are no cables.

-​ Limited mobility ,can restrict mobility for -​ Extra cost to set up


devices which is inconvenient for flexible -​ Setting up is difficult for people that are not
workplaces experienced with computers.
-​ cost,The initial investment for cables -​ Security risks,Less secure due to
,switches , switches more expensive than bandwidth and information can be accessed
wireless -​ File sharing transfer speed is slower
-​ Damage vulnerability,cables can be -​ Interference, as connection can be blocked
vulnerable to physical damage from by physical obstacles such as walls
environmental factors, wears and tears, and -​ Slower speed compared to wired networks.
accidental disconnections

Copper Cables, Fibre Optic Cables Radio Waves, Microwave, Satelites

WIRED NETWORK

COPPER CABLES FIBRE OPTIC CABLES

= Carries data as electrical signals and can consist = Transmit data as light
of a twisted pair

+​ Best conductor +​ Thinner and lightweight


+​ Flexible,more flexible can be bent or twisted +​ Can transmit over longer distancesLess
without breaking. signal degradation
+​ Safe - high melting point +​ Immunity to interference,Lower interference
+​ Less expensive to purchase and install than in signal
fibre optic +​ Faster transmission as high bandwidth
+​ Easier installation +​ More secure as it is hard to hack

-​ Doesn’t perform well with small charges -​ Needs expensive optical transmitter and
-​ Affected by electromagnetism receivers
-​ Limited bandwidth which may limit data -​ Only transmit data in one direction
transfer speed -​ fragile
-​ More easily intercepted
Fibre optic
Single mode uses single light source thus less reflection thus can be used in longer distances
Multi mode uses multiple light sources more reflections thus used in shorter distances

WIRELESS NETWORK

RADIO WAVES MICROWAVES SATELLITES

= Carries data in the form of = electromagnetic radiation with = A communication device in


electromagnetic waves wavelength 1 millimetre and 30 earth’s orbit that receive and
centimetre/ uses a beam of radio transmit data
waves in the microwave Used for satellite phones and
frequency range to transmit satellite broadcasts
information

+​ Wireless +​ Wireless +​ Wireless


+​ Can travel over large +​ Larger bandwidth,can +​ Cheap with long distance
distances transfer more data. +​ GPS,provide accurate
+​ Not expensive +​ Efficient heating such as location
of food +​ Communication
+​ Used in radar system +​ Weather monitoring
+​ communication

-​ Low frequency so -​ Emitting towered are -​ Vulnerable to interference


transmit less data at one expensive to build hacking and damage from
time -​ Physical obstacles can space debris
-​ Affected by radio stations interfere -​ Expensive to set up
with similar frequency -​ Limited life span so they
require replacing
-​ Some regions in the polar
region may have limited
satellite coverage.

BIT STREAMING
= the transfer of a sequence of bits at a high speed one at a time, representing a stream of data over the
internet, hence it requires some form of buffering and high broadband connection.
Bit rate number of bits transmitted per second
Benefits of bit streaming
-​ No need to wait for the whole file to download before the user can watch.
-​ No need to store large files on the device.
-​ Allows video files to be played on demand.
-​ More difficult to copy streamed files than stored on hard drives.
-​ No need for specialist hardware.
Disadvantages of bit streaming
-​ Cannot stream video or music file if broadband connection is lost.
-​ Streaming uses a lot of bandwidth.
-​ Security risks associated with downloading files over the internet.
-​ Video files will pause if insufficient buffer capacity or slow broadband connection.

VIDEO
-​ data is compressed before transmission .
-​ Video is hosted on a media server.
-​ Video then transmitted continuously as a series of bits.
-​ The recipient receives a bit stream from a buffer.

REAL TIME ON DEMAND


= used when watching live streams of events that = watching an event that has taken place in the
are currently taking place. past.

-​ The event is captured live with a video -​ Existing media are encoded to bit streaming
camera that is connected to a computer, format and uploaded to a server, can be
and cannot be paused or rewound. paused and rewound.
-​ Video signal is encoded to streaming media -​ Encoded feed is uploaded to a dedicated
files streaming server
-​ Encoded feed is uploaded to a file server -​ The server sends live images to the user.
-​ Server duplicates the feed and sends it to all -​ When a client requests to watch a specific
clients requesting in real time video, a bit stream is set up which transmits
saved video.

WEBSITE STREAMING
+​ No need to download the full file
+​ No need special software for playback in browser
-​ Video stops if internet connection is bad
-​ Viruses can be downloaded from websites

*Importance of bit rates/broadband speed on bit streaming


-​ User has to download and display and display bits at the same time
-​ Realtime requires higher broadband speed as compared to on demand since there a greater number
of users simultaneously requesting the same data
-​ Broadband speed required depends on type of stream user requires
-​ Better quality needed, then user need higher speed as each framer larger in size

INTERNET PROTOCOL (IP) ADDRESS


-​ gives each device on a network an identifier which allows devices to send data to the correct specific
device

PRIVATE PUBLIC

-​ Only unique within a LAN hence can be -​ IP Address is unique and can be across the
accessed within LAN internet
-​ Issued by router in a LAN -​ Assigned by the ISP
-​ NAT(network address translation required -​ Address can be reached over the internet
by private IP addresses to access the
internet)
-​ More secure than public IP addresses since
they are hidden by net NAT
-​ Reduce the number of public IP addresses
needed
-​ Need Network Address Translation (NAT) to
access the internet directly
-​ Can be duplicated in different networks
STATIC DYNAMIC

-​ address is signed by the server/ISP -​ assigned by the network OS


-​ Address never changes -​ IP addresses will change at regular time
-​ Faster upload/ download speed -​ Periods
-​ Are useful when websites need to -​ Is more secure hence used when data
remember devices for a long time privacy is more secure
-​ When a comp disconnects and rejoin, the -​ Maintaining costs of dynamic addressing is
address remains’ lesser
-​ When comp disconnect and rejoin, the
address changes.

IPv4 IPv6

none why?
-​ the number of IP address needed will
exceed the number available by using only
IPv6

-​ 32 bits grouped into four blocks -​ 128 bits grouped into 16 blocks
-​ Range 0-255 -​ Range 0000 to FFFF
-​ Each block can have a value between 0 to -​ Each block can have 4 hexadecimal value
255
with range 0000 to FFFF
-​ Separated by a full stop
-​ The first two number is the network -​ Separated by colons
-​ Last two numbers are host -​ Only 1 double colon is allowed
-​ EX: -​ Ex:
-​ 192.0. 2.146 1234:1234:1234:0000:1234:1234:1234:123
4
ZERO COMPRESSION:
IPv6 can be shortened by replacing zeros with double columns but this is applied only once.
BENEFITS OF IPV6 OVER IPV4
-​ Has no need for NAT
-​ Removes the risk of private ip address collision
-​ Allows for more efficient routing
-​ Has built in authentication
IP ADDRESSES ARE DIVIDED INTO TWO PARTS:
-​ NetID
This identifies the specific network to which the devices belong to , it allows routers to route data to
the correct network
-​ HostID
It identifies a host/device on a network it ensures data sent over the network reaches the right device
EXAMPLE
[Link] the host id is 10 and the net id is 192.168.1
SUBNETTING
Is dividing LAN small into smaller manageable subnetworks.
The IP is broken down into three parts without changing the NetID The host ID is divided to two parts host
ID and subnet ID(which identifies the subnet in the network)
Subnet mask hides the net ID allowing data only to be routed in the subnet
Advantage
-​ Increases security by limiting access and control traffic flow between sub networks
-​ Reduces network traffic
-​ Hides the complexity of the network
-​ Allows better allocation of IP addresses reducing waste and ensuring efficient use of IP addresses

WORLD WIDE WEB (WWW)


Collections of webpages stored in websites.
= consist of content organised as web pages made available across the internet from web servers
-​ Www uses internet to access information from servers
-​ Web resources are accessed on a web browser
-​ Http protocols are written in HyperText Markup Language (HTML)
-​ Publishing format for all web content
-​ Uniform Resource locator (URL)
-​ Unique address for a resource on the WWW specify location of web pages

-​ HyperText Transfer Protocol (HTTP)


-​ Protocol to allow for the retrieval of linked resources

UNIFORM RESOURCE LOCATOR (URL)


Addresses used for accessing resources on the web
= a character string referring to the location of an internet resource
-​ URL allows us to specify the domain name and exact location for a resource on the internet
CONSISTS OF :
Domain host(WWW).
Domain name(name of website).
Domain type(.com,.org).
Country code( .uk,.de).
[Link] [Link]
http =. Enables browser to know what protocol is being used to access information in the domain
[Link] = domain name
[Link] = web page

“?” = separate url from all variables


“%20” = coding for space

DOMAIN NAME SERVICE (DNS)


= Naming system used for computers or resources having internet connection
Gives domain name for internet hosts and finds IP addresses for domain name
Domain name eliminate the need of users remembering IP addresses
How URL is Converted into Its Matching IP Address
-​ URL is passed to obtain the domain name
-​ Domain name is sent to nearest DNS
-​ DNS hold domain name and matching IP address
-​ DNS will search for the domain name and the IP address is returned
-​ If IP address is not found , DNS forwards request to another DNS
-​ This continues until DNS finds a match for URL ( and when IP address is found, it is passed down
the chain to original DNS)
-​ IP then sent to user's computer
-​ Then browser sends request to webserver -> server send pages to browser -> browser interpretes
HTML to display webpages(security certificates are exchanged)

CH3 - HARDWARE

Laser printer

• The revolving drum is initially given an electrical charge

• A laser beam (bounces off moving mirrors) scans back and forth across

The drum

• ...discharging certain points (i.e. ‘drawing’ the letters and images to be printed as a pattern of electrical
charges)

• The drum is coated with oppositely charged toner (which only sticks to Charged areas)

• The drum rolls over electro-statically charged paper // Electro-statically Charged paper is fed (towards the
drum)

• The ‘pattern’ on the drum is transferred to the paper

• The paper is passed through the fuser to seal the image

• The electrical charge is removed from the drum // the excess toner is Collected
3D printer

- uses a digital 3D model/ CAD file

- Builds up model one layer at a time

- Starting from the bottom

- Using x, y, z coordinates

- The material is fused/cured together layer by layer

Fused deposition modelling


- Material is heated and pushed through nozzle
SLA

- Photosensitive liquid resin is exposed to a UV-laser beam


DLP

- Uses liquid plastic resin melted with arc lamps

SLS
- Uses a laser to form objects from powdered material

Microphone

• The microphone has a diaphragm / ribbon

• The incoming sound waves cause vibrations of the diaphragm

• … causing a coil to move past a magnet // causing a magnet to move

Past a coil (dynamic microphone) // changing the capacitance (condenser

Microphone) // deforms the crystal (crystal microphone)

• An electrical signal is produced.


Speakers

• Takes an electrical signal and translates it into physical vibrations to create

sound waves

• An electric current in the coil creates an electro-magnetic field

• Changes in the audio signal causes the direction of the electric current to

Change

( -The direction of the current determines the polarity of the electro-magnet

-changing the direction of the current changes the direction of the polarity of the
electro-magnet

- The electro-magnet is repelled by or attracted to the permanent magnet )

• Causing the coil to vibrate

• The movement of the coil causes the cone / diaphragm to vibrate

• That vibration is transmitted to the air in front of the cone / diaphragm as sound

Waves that match the audio signa.

• The amount of movement will determine the frequency and amplitude of the

sound wave produced

magnetic hard disk

-The hard disk has (one or more) platter/plate/disk


- Each surface of the platter/disk is (ferrous oxide which is) capable of being magnetised
-The platters/disks 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/write head mounted on an arm (positioned just above the surface)
- Electronic circuits control the movement of the arm (and hence the heads)
- The surface of the platter/disk is divided into concentric tracks / circles
- The surface of the platter/disk 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

solid state (flash) memory

-​ Made up of transistors laid out in a grid


-​ Uses NAND/NOR technology
-​ It flashes data onto chips
-​ Control gates and floating gates are used to control the flow of electrons
-​ Data in transistors changes from 0 to 1 and from 1 to 0
-​ Data is accessed electronically with no mechanical parts( spinning disks or read-write heads)

optical disc reader/writer

The disc is spun at high speed • A laser is shone onto the disc to read / write • ... using optical head to move
it into position ... it follows the spiral track from the centre outwards When writing [Link] laser burns pits to
represent the data • When reading the laser reflects from pits and lands • The reflection from a pit and a
land is different ... the differences are interpreted as 1 or 0|

touchscreen

Resistive: The space between the conductive layers is removed/the layers touch and a circuit is completed ,
Capacitive: Screen is coated with transparent conductive material that stores electrical charge. The
electrical charge changes where the user pressed • The point of contact is identified ... from the change in
electrical field The software/microprocessor calculates the coordinates|
1.​
RESISTIVE CAPACITIVE

●​ has an upper layer of polyester and a ●​ made up of many layers of glass that acts
bottom layer of glass like a capacitor creating electric fields
●​ When top polyester layer is touched, the between the glass plates in layers
top layer and bottom layer complete a ●​ When top glass is touched, the electric
circuit current changes and the coordinate where
●​ Signals are then sent out, which are the screen is touched are determined by an
interpreted by a microprocessor and the on board microprocessor
calculations determine the coordinates of ●​ Coordinates sent to touch screen driver
where the screen was touched

+​ cheap +​ expensive
+​ Can use bare fingers, gloved or stylus for +​ Screen visibility is good under strong
input. sunlight
+​ Permits multi-touch capability
+​ Screen is very durable

-​ screen visibility is poor in strong sunlight. -​ only bare fingers and cannot use gloves to
-​ Does not permit multi-touch capacity. styluses for input
-​ Screen durability is weak.
-​ Vulnerable to scratches and wears
out though time

Virtual reality headset

video is taken to the headset

2 feeds are taken to the LCD display

The lens between the eyes and the screen causes a 3D effect because of the focus and reshaping

The accelerometer (a sensor) detects the head movement

uses binaural sound to create 3D sound effect

-​ video is sent from a Computer to the headset either using HDMI cable or smartphone is fitted into
the headset
-​ Two feeds are sent to an LCD/OLED displays
-​ Lenses placed between the eyes and the eye for focusing and reshaping of the image/video for each
eye, thus giving a 3D effect and adding to the realism
-​ As the user moves series for sensor and LED measure this movement, which allows the image/video
on the screen to react to the user’s head movement
-​ Headset also use binaural sound so speaker output appears to come from behind, side, from a
distance giving a realistic 3D
-​ Infrared sensors to monitor eye movement which allows the depth of field on the screen to be more
realistic

STORAGE DEVICES

PRIMARY STORAGE
Why?
-​ to store files needed to boot the system/ part of os running/ bios/ firmware
READ ONLY MEMORY (ROM) RANDOM ACCESS MEMORY (RAM)

PROM, EPROM, EEPROM SRAM, DRAM

-​ non volatile -​ volatile


-​ Read only -​ Read/write
-​ Stores the operating system -​ Stores currently running programs
-​ Stores the boot-up instructions -​ Stores data on the current progress and
-​ Can’t be changed about the device
-​ Can be change

HOW OS ALLOCATES RAM


-​ RAM is assigned into blocks
-​ There is dynamic allocation of RAM to
processes that reclaims unused blocks of
RAM
-​ Prevents 2 processes from accessing the
same area of RAM at the same time
-​ Manage virtual memory

PROGRAMMABLE ROM (PROM) ELECTRONIC ERASABLE ERASABLE PROM (EPROM)


PROM(EEPROM)

-​ made of matrix fuses -made up of nor chips. -​ use floating gate


-​ Requires the use of a PROM -allows data to be read or transistors and
writer which uses an electric erased a single byte at a capacitors
current to alter specific cells time useful for when -​ Ultraviolet light is used
by ‘burning’ fuses in the data is needed to be to program an EPROM
matrix erased in bytes or -​ Chip has to be removed
-​ Can only be written once chunks’ for reprogramming
-erased by electrical signals
-chip doesn't need to be
removed

Mobile phones applications under development

STATIC RAM (SRAM) DYNAMIC RAM (DRAM)


-​ use flip flops to hold each bit of memory -​ consist of a number of transistors and
-​ Does not need to be constantly refreshed capacitors.
-​ Faster data access time than DRAM -​ Needs to be constantly refreshed
-​ Used as Processor memory cache -​ Less expensive than SRAM
-​ Higher memory capacity

SECONDARY STORAGE
Why?
-​ to store files/software long term
1.​ INTERNAL SECONDARY STORAGE

MAGNETIC MEDIA SOLID STATE DRIVE OPTICAL DISC

HDD, Tape Drive SD Card, SSD Hard Drives, USB DVD, CD, Blu ray
Pen Drive
Solid state is made up of
transistor gate floating
gate:stores electrons and control
gate which stores flow of
electrons

-​ large capacity to store -​ Large capacity to store -​ Can hold a lot more data
large files large files than a standard DVD,
-​ Reasonably fast access -​ Lower power meaning it can store
speed consumption(laptop use) movies with better picture
-​ Uses will not have -​ Runs much cooler than and sound quality
to wait for videos HDD making it suitable for -​ Portable
to load laptops -​ More expensive than
-​ Storage costs less per -​ ** SSD less longevity DVDs.
unit storage hence cant be used in -​ Requires a Blu-ray player
-​ If a large number servers with huge -​ Can lose data when
is needed, cost amounts of write scratched.
would be quite low operations.
-​ Slower degradation of -​ Fast access speed
data -​ Users won’t have
-​ Last longer and to wait for videos
more reliable to load
under heavy use -​ Reliable
-​ Can be damaged
and would still
work
-​ No moving parts
-​ Not possible to overwrite
the existing data
-​ Need to erase the
old data to write
-​ To read/write uses
movement of
electrons

INTERNAL OPERATIONS OF MAGNETIC HARD DISK


-​ hard disk drive has one or mole platters made of aluminium or glass.
-​ Each surface of the plater is capable of being magnetised.
-​ The platters are mounted on a central spindle and rotated at a high speed.
-​ Each surface of the platter had a read/write head mounted on arm positioned just above the surface.
-​ Electrical circuits control the movement of the arm and heads.
-​ The surface of the platter is divided into concentric tracks and sectors.
-​ One track in one sector is the basic unit 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 the disk, a variation in magnetic field produces a variation in current through the head

INTERNAL OPERATIONS OF SOLID STATE MEMORY

-​ Made of transistors floating gates (holds electrons) and control gates (controls the flow of electrons)
-​ Uses semiconductor chips to store data
-​ Have individual memory cells which trap different level of electrons on a charge trap
-​ Memory cell is copied horizontally and vertically to make storage capacity
-​ Making a 3D spreadsheet
-​ There’s a stack in layers of many spreadsheet
-​ To isolate and determine which row and layer to read/write from, use control agent selectors (layers)
and bitline selectors (rows)

INTERNAL OPERATIONS OF OPTICAL DISC


-​ drive motors is used to spin the disc.
-​ Tracking mechanism moves the laser assembly.
-​ A lens focuses the laser onto the disc.
-​ Laser beam is shone onto disc to read/write.
-​ Surface of disc has a reflective metal layer.
-​ Tracks on the disc have sequence of pits and bums.
-​ Reflected light in the encoded as a bit pattern.

EMBEDDED SYSTEM
= installing microprocessors into devices to enable operations to be controlled in a more efficient way
-​ At the core is an integrated circuit designed to carry out computation for real-time operations
-​ Embedded systems are managed by microcontrollers or digital signal processors (DSP),
application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), GPU
technology, and gate arrays
-​ These processing systems are integrated with components dedicated to handling electric and/or
mechanical interfacing
-​ CHARACTERISTICS OF EMBEDDED SYSTEM
Installed into the device.
Have a specific task.
Not easily changed .
Are ,managed by microprocessors.

PROS CONS

+​ Small in size easy to fit into devices. -​ difficult to upgrade devices .


+​ Low cost. -​ Troubleshoot faults in the device need a
+​ Consume little power. specialist.
-​ Can be access over the internet (hackers,
viruses).​

BUFFERS
= hold data temporarily as it is transferred from one component to another e.g. keyboard buffers,printer
buffers,video buffers.
Advantages of buffers
Prevents data loss
Smooth operations/playback/communications(avoid interruptions)
Purpose of buffers
-Data transfer management
Data is transferred at different speeds , buffers hold data temporarily to avoid interruption of
processes at the receiving end and prevent data loss EG: If a laptop is sending data to the computer , the
data is sent to the buffer by laptop so that the printer can receive the data at its own speed and user can
continue to use the laptop instead of waiting for the slower printer.
-enhancing device communication
Multiple devices or processed communicate buffer facilitates interaction and allows synchronisation
-NOTE ; When the buffer is empty , an interrupt is sent to laptop to send more data

MONITORING SYSTEM

SENSORS
Are input devices which measure and read physical properties
= The sensor measures and converts the physical quantity to an electrical signal, which can then be read by
an embedded systems engineer or any electronic instrument. A sensor stores the measured quantity to the
memory
A-D Converter
= An analog-to-digital converter converts the analog signal sent by the sensor into a digital signal so
processor can understand
Processor & ASICs
=Processors assess the data to measure the output and store it to the memory
D-A Converter
= A digital-to-analog converter changes the digital data fed by the processor to analog data
Actuator
Take control signals into physical action such as adjusting
= An actuator compares the output given by the D-A Converter to the actual output stored and stores the
approved output
LOGIC GATES

Truth Tables

AND NOT OR

A B X A X A B X

0 0 0 1 0 0 0 0

1 0 0 0 1 1 0 1

0 1 0 0 1 1

1 1 1 1 1 1

NAND NOR XOR

A B X A B X A B X
0 0 1 0 0 1 0 0 0

1 0 1 1 0 0 1 0 1

0 1 1 0 1 0 0 1 1

1 1 0 1 1 0 1 1 0

CH4 - PROCESSOR FUNDAMENTALS

VON NEUMANN MODEL


In this mode both instructions and data are stored in the same memory and as such the CPU can
fetch instructions and decode and execute them this means the need for registers.

FEATURES
-​ Central Processing Unit (CPU/Processor)
-​ Memory where both data and instructions can be stored
-​ Input devices such as keyboards
-​ Output devices such as monitors
-​ Storage ,such as HDD and SSD
-​ Processor able to access the memory directly
-​
-​ Computer memories that could store programs as well as data
-​ Stored programs made up of instructions that could be executed in sequential order

COMPONENTS OF CPU;
1.​ Arithmetic & Logic Unit (ALU)
-​ Performs mathematical and logical operations required while running a program
-​ Has an “Accumulator”
-​ A temporary register used when carrying out ALU calculations.

2.​ Control Unit (CU)


-​ Ensures synchronisation of data flow and program instructions throughout the computer
-​ Coordinates the actions of other components of the CPU
-​ Send/receive signals using the control bus
-​ Manage execution of instructions in sequence
-​ Control communication between components of the CPU

3.​ System Clock


-​ produces timing signals which are sent on the control bus to ensure the synchronisation take place
-​ Without it, computer would crash

4.​ Immediate Access Store (IAS)


-​ holds all the data and programs that the CPU needs to access
-​ CPU takes data and programs held in backing store and puts them in IAS temporarily
-​ This is done because read/write operations using IAS is faster compared to the backing store
-​ Referred to as random access memory
5.​ Registers
-​ temporary storage in the CPU which can either be general or specific in its use to hold data and
instructions in the fetch and execute cycle

General Purpose Registers


-​ holds data that is frequently used by the CPU
-​ Ex: Accumulator

Register Abbreviation Function

Accumulator AC Holds processed data temporarily from ALU

Special Purpose Registers


-​ specific function within the CPU and holds the program state
-​ Ex: CIR, IX, MAR, MDR, PC, SR

Register Abbreviation Function

Current Instruction Register CIR Stores the current instruction being decoded
and executed

Index Register IX / IR used when carrying out index addressing


operations (assembly code)

Memory Address Register MAR stores the address of the memory location
currently being read from or written to
Memory Data Register / Memory Buffer MDR / MBR stores data which has just been read from
Register memory or data which is about to be written to
memory

Program Counter PC stores the address where the next instruction


to be read can be found

Status Register SR contains bits (flags) which can be set or


cleared depending on the operations

Status Register
= used when an instruction requires some form of arithmetic or logic processing
-​ Carry Flag (C)
-​ Set to 1 if there is CARRY in the following an addition operation
-​ Negative Flag (N)
-​ Set to 1 if the result of a calculation has a negative value
-​ Overflow Flag (V)
-​ Set to 1 if an arithmetic operation results in an overflow
-​ Zero Flag (Z)
-​ Set to 1 if the result of an arithmetic operation is ZERO
SYSTEM BUSES
-​ used in computer as a parallel transmission component
-​ Each wire in the bus transmit one bit of data

1.​ Address Bus


-​ caries data throughout the computer system (CPU and memory)
-​ Unidirectional (travel in one direction only)
-​ Prevents addresses being carried back to the CPU
2.​ Data Bus
-​ Bidirectional (allows data to be sent in both directions along the bus)
-​ Data can be carried from CPU to memory and to/from input/output devices
-​ Data can be an address, an instruction, or a numerical value
-​ Carries word lengths the greater the width of the bus the larger the word length which improves the
performance of the computer system
-​ *word is a group of bits regarded as a single unit e.g. 16-bit.*

3.​ Control Bus


-​ bidirectional
-​ Carries signals from CPU to all other components
-​ 8 bit wide and only carry control signals .i.e timing signals and interrupt signals

FACTORS THAT AFFECTS THE PERFORMANCE OF CONTROL SYSTEM


1.​ Width of a bus
-​ wider it is, the more memory locations which can be directly addressed at any given time
Larger word length.
-​ can improve computer’s overall performance.

2.​ Clock speed


-​ The number of pulses the clock gives out per unit time
-​ The increase in clock speed reduces execution time and the increase in number of fetch execute
cycle per unit time
-​ increasing speed by accessing the Basic Input/Output System (BIOS), processing speed also
increase
-​
-​ Can lead to unsynchronized operations (unable to complete on time)
-​ Overheating the CPU = unreliable performance

3.​ Number of cores


-​ Each core can independently carry out a process at the same time so more instructions are
executed improving performance of computer system
-​ dual core (CPU made up of 2 cores)
-​ Has one channel and needs the CPU to communicate with both the cores, not really affect
performance
-​ Quad core (CPU made up of 4 cores)
-​ Has 6 channels and need the CPU to communicate with all 4 cores, reducing a lot of
performance

4.​ Cache Memory


-​ using cache can improve performance
-​ Cache have faster access time
-​ Stores frequent instructions that is used by CPU
-​ Contents lost when power is turned off similar to R.A.M

COMPUTER PORTS
UNIVERSAL SERIAL BUS (USB)

= an asynchronous serial data transmission method


How does a USB port transfer data
*It transfers data one bit at a time
* in an asynchronous way

●​ 4-wire shielded cable


●​ 2 wires for power and the earth
●​ 2 wires for data transmission
●​ Computers automatically detects that devices is present (due to small change in voltage level on
the data signal wires in the cable)
●​ Appropriate device driver is loaded up so that comp and device can communicate effectively
●​ If new device is detected, the comp will look for the device driver which matches thee device
●​ If not available, user is promoted to download the appropriate software

+​ automatically detected and device driver are automatically loaded up


+​ Connectors can only fit one way, prevents incorrect connections
+​ USB is a standard adopted by many manufacturers = all comps will be equipped with USB ports
+​ Fast data transfer = useful when transferring large files such a s video files
+​ Allows power to be drawn to charge devices

-​ transmission rate is limited to less than 500 megabits per second


-​ Cable length is max 5 metres

HIGH-DEFINITION MULTIMEDIA INTERFACE (HDMI)

= allow output from a computer to an HDMI-enabled device


HDMI increases bandwidth making it possible to supply high quality sound and visual effects

+​ the current standard for modern tv and monitors


+​ Allows for a very fast data transfer rate
+​ Improved security (help prevents piracy) since it uses high bandwidth digital copy protection
(HDCP)
+​ Support modern digital systems
-​ not a very robust connection (easy to break connection by moving device)
-​ Limited cable length to retain good signal
-​ Only 5 cable standards

VIDEO GRAPHIC ARRAY (VGA)

= older version of HDMI

+​ simpler technology
+​ Only 1 standard available
+​ Easy to split the signal and connect a number of devices from one source
+​ Connection is very secure

-​ old out-dated analogue tech


-​ Easy to bend the pins when making connections
-​ Cables must be a very high grade to ensure good undistorted signals
FETCH EXECUTE CYCLE
*Double Brackets = data stored at the address shown in MAR is copied to MDR

INTERRUPTS

= a signal sent from a device or software that require attention of the processor.
-​ this will cause the processor to temporarily stop what it is doing and service the interrupt.
-​ Allow a computer to carry out many tasks
-​ allow it to open many windows at the same time

Caused By:
-​ timing signal
-​ Input/output processes e.g. disk drive ready to receive data
-​ User interaction e.g. user presses a key such as <ALT> or <BREAK>
-​ Hardware fault e.g. paper jams
-​ Software error e.g. dividing by zero and an [Link] not being found to run a program

-​ Interrupt is generated by an action(by eg)


-​ The priority is checked
-​ If it is of lower priority than the current process , the computer continues with its current F-E cycle
-​ If it has higher priority , the state of the current process ( registers) are stored on stack
-​ The location/type of interrupt is identiied
-​ An appropriate ISR is called to handle the interrupt
-​ When the ISR is done , computer checks for further interrupts of high priority
-​ It there are not , data from stack is loaded and the F-E cycle continues
ASSEMBLY LANGUAGE

ASSEMBLY LANGUAGE
= a low level machine specific programming language that uses mnemonics

MACHINE CODE
= the programming language that the CPU uses
-​ binary
-​ Sometimes displayed on a screen as hexadecimal so user can understand machine code instruction
more easily
-​ Very time consuming and error problem

Each instruction of assembly language and machine code have:


-​ Opcode = identifies the operation to be carried out by the CPU
-​ Operand = identifies the data to be used by opcode

LANGUAGE TRANSLATORS
Why?
-​ shorten development time for writing computer programs
-​ Instructions to be easier to learn and understand

Before a program written in assembly language (source code) can be executed, it needs to be translated to
machine code. This is performed by an Assembler
-​ Translates each assembly language instructions into machine code instruction
-​ Checks syntax of the assembly language program to ensure that only the appropriate machine code
instruction set are used
-​ This speeds up the development time as some errors are identified during translation before the
program is executed

TYPES OF ASSEMBLER
1.​ One Pass
-​ Removes white lines.
-​ read the assembly language program one line at a time
-​ Ignore anything not required: comments
-​ Allocate a memory address for the line of code
-​ Check the opcode is in the instruction set
-​ Add any new labels to the symbol table with the address, if known
-​ Place address of labeled instruction in the symbol table
2.​ Two Pass
-​ read the assembly language program one line at a time
-​ Generate object code, including opcode and operand, from the symbol table generated in one pass
-​ Save or execute the program

ASSEMBLY LANGUAGE INSTRUCTIONS

1.​ Data Movement Instructions


2.​ Input and Output of Data Instructions

3.​ Arithmetic Operation Instructions


4.​ Unconditional and Conditional Instructions

5.​ Compare Instructions


ADDRESSING MODES

ABSOLUTE ADDRESSING the contents of the memory location in the operand are used

DIRECT ADDRESSING the contents of the memory location in the operand are used

INDIRECT ADDRESSING the contents of the contents of the memory location in the operand
are used

INDEXED ADDRESSING the contents of the memory location found by adding the contents of
the IR to the address of the memory location in the operand are used

IMMEDIATE ADDRESSING the value of the operand only is used

RELATIVE ADDRESSING the memory address used is the current memory address added to
the operand

SYMBOLIC ADDRESSING used in assembly language programming, where a label is used


instead of a value

BIT MANIPULATION
BINARY SHIFT
= moving the bits stored in a register a given number of places with the registers

TYPE OF SHIFTS:
LOGICAL SHIFTS bits shifted out of the registers replaced with 10101111
0 Shifted left 3 places
01111000

ARITHMETIC SHIFTS the sign of the number is preserved 10101111


Shifted right 3 places
11110101

CYCLIC SHIFTS no bits are lost, bits shifted out of one end of 10101111
the register are introduced at the other end Shifted left 3 places
of the register 01111101

LEFT SHIFTS bits are shifted to the left 10101111


Shifted left 3 places
01111000

RIGHT SHIFTS bits are shifted to the right 10101111


Shifted right 3 places
11110101

In monitoring and control, each bit in a memory location can be used as a flag and would need to be tested,
set, or cleared separately
CH5 - SYSTEM SOFTWARE

OPERATING SYSTEM
= software that provides an environment in which applications can run and provides an interface between
hardware and human operators

TASKS

1.​ Memory Management


-​ Memory optimization = determine how comp memory is allocated and de allocated when a number
of applications are running simultaneously
-​ To maintain optimization, swap data to and from the HDD or SSD
-​ Memory organization = determines how much memory is allocated to an application, and how the
memory can be split up in the most appropriate and efficient way​
-​ Partitioned allocation =. Memory is split up into contiguous blocks and memory management
then allocates a block into an applications
-​ Memory protection = ensures that two competing applications cannot use the same memory
locations at the same time
-​ If not done, data could be lost, security issues, computer can crash

2.​ Security Management


-​ to ensure integrity, confidentiality, and availability of data
-​ Carry out OS updates when they’re available
-​ Ensure that anti-virus software is up to date
-​ Maintaining access rights for all users
-​ Offering recovery of data (in case of lost or corrupted)

3.​ Process Management


-​ allocating resources and permit the sharing and exchange of data, thus allowing all processes to be
synchronized
4.​ Hardware Management
-​ Controlled by queues and buffers
-​ Communicating with all input and output devices using device drivers
-​ Translating data from a file into a format that the input/output device can understand using
device drivers
-​ Ensuring each hardware resource has a priority so that it can be used and released as
required

5.​ File Management


-​ Defining the file naming convention which can be used (.exe, .xls, etc.)
-​ Performing specific tasks (copy, open, create)
-​ Maintaining the directory structures

UTILITY SOFTWARE
1.​ Hard Disk Formatter
-​ OS need to know how to store files and where the files will be stored on the hard disk
-​ Will organise storage space by assigning it to data blocks
-​ Disk surface may have a number of partitions
-​ Note that partitions are contagious blocks of data
-​ Once partition created, they must be formatted
-​ Done by writing files which hold directory data and tables of contents at the beginning of each
partition
-​ Allows OS to recognise a file and know where to find it on the disk surface
-​ Also have a checking tool for each sector
-​ If bad = sector will be flagged as ‘bad’ and the file tracking records will be reorganised
-​ Replacing bad sectors with new unused sectors

2.​ Virus Checker


-​ check software or files before they are run or loaded on a computer
-​ Compare possible viruses against a database of known viruses
-​ Carry out heuristic checking
-​ Checking software for types of behaviour that could indicate a possible virus
-​ Put files or programs which may be infected into quarantine
-​ Automatically delete the virus
-​ Allow user to decide whether to delete the file

3.​ Defragmentation Software


-​ When HDD become full, blocks used for files will become scattered all over the disk surface
-​ Happens when files are, extended, etc
-​ Cause slower data access time
-​ HDD read-write head requires several movements just to find and retrieve the data making
up the required file
-​ Better if files could be stored in contiguous sectors, hence reducing HDD head movement

4.​ Disk Content Analysis/Repair Software


-​ used to check disk drivers for empty space and disk usage by reviewing files and file folders
-​ Can led to optimal use of disk space by removal of unwanted files and downloads

5.​ Disk Compression and File Compression


-​ File Compression = to save storage space and make it quicker to download/upload files and quicker
to send files via email
-​ Disk Compression = compresses data before writing it to hard disk and decompressed again when
reading
-​ High priority and will override all other OS routines
-​ Do not uninstall — will make any previously saved data to be unreadable

6.​ Back-Up Software


-​ allow a schedule for backup files to be made
-​ Only carry out a back-up procedure if there have been any changes made to a file

PROGRAM LIBRARIES
-​ when software is under development and programmer can utilize pre-written subroutines in their own
programs (save development time)
-​ Help software developer who wishes to use Dynamic Link Library (DLL) subroutines in their own
program

When software routines are written, they are saved in a program library (Library Program) for future use by
other programmers
*Library Routines = described routines which could be used in another piece of software under development

Benefits of Developing Software this way:


+​ Removes the need to rewrite the many routines every single time (save time and money)
+​ Leads to modular programming = several programmers can be working on the same piece of
software at the same time
+​ Allows continuity with other games that may form part of a whole range
+​ Allows to maintain eye of a ‘corporate image’ in all the software being developed by a company
+​ Saves development time Ching to test each routine since the routines are all fully tested in other
software and should be error free
TYPES:
1.​ Static Library
-​ software being developed is linked to executable code in the library at the time of compilation
-​ Library routines would be embedded directly into the new program code
2.​ Dynamic Link Library Files (DLL)
= software being developed is not linked to the library routines until actual run time
+​ Executable code of the main program is smaller since DLL files are only loaded into memory at run
time
+​ Possible to make changes to DLL files independently and won’t be necessary to recompile the main
programve memory an
+​ Sad execution time
-​ executable code is not self-contained, therefore all DLL files need to be available at run time
otherwise error or crash
-​ Any DLL linking software in the main program needs to be available at run time to allow links with
DLL files to be made
-​ Risk of DLL having a malware which can be a risk to the main program when linking
What is DLL?
LANGUAGE TRANSLATORS
Instructions in a program can only be executed in machine code, hence need to be translated

ASSEMBLER COMPILER INTERPRETER

Source program assembly language - high level language to high level language to
translated to... machine code machine code machine code

Machine dependent yes yes no

Object Program is disk or in main memory disk or in main memory every line of program
stored on... are interpreted then
executed each time the
program runs and its
under the control of
interpreter

Each line of the source one machine code many machine code many machine code
program generates... instruction (one to one instructions, instruction instructions, instruction
translation) explosion explosion

COMPILER INTERPRETER

+​ user only need the executable code, hence +​ easier to develop and debug as error can be
the end user benefits as no need to corrected on each line and the program
purchase compiler restarted from that place
+​ Developer have the source code, so cannot +​ It translate line by line
be altered or extended by user +​ Untested programs should not be able to
+​ Source programs has no syntax or semantic cause the computer to crash
errors +​ When purchased, end user have all source
code and run-time libraries, enabling the
program to be modified as required without
further purchases

-​ Errors cannot be corrected in real time -​ end user will need to purchase a compiler or
-​ Code cannot be changed without an interpreter to translate source code
recompilation before use
-​ One error may result in other false errors -​ Developer have no control of source code,
being reported more difficult to change for upgrades
-​ Cannot test unfinished source code -​ Contain syntax or semantic errors if any part
of the program has not be fully tested,
hence need to debug

PARTIAL COMPILING AND INTERPRETING


To achieve shorter execution times, many high-level languages programs use a system that is partially
compilation and partially interpretation.

WHY?
– Partially compiled programs can be used on different platforms as they are interpreted when run.
-Code is optimised for CPU as machine code is generated at run time

INTEGRATED DEVELOPMENT ENVIRONMENT (IDE)


= used by programmers to aid the writing and development of programs.
Ex: Pycharm, Visual Studios, etc

IDE :
1.​ CONTEXT SENSITIVE PROMPTS: Provide hints/suggestions based on the context of the code.
2.​ DYNAMIC SYNTAX CHECKS: Finds possible syntax errors as code is being written into the editor
and alerts the user at the same time.
3.​ PRETTYPRINT: Colour-coding words, organising and indenting the code to make it more readable
and easier to understand.
4.​ EXPAND AND COLLAPSE CODE BLOCKS: Hide(collapse) details of a block, showing only a line
which can be re-opened(expand). This reduces on screen clutter which improves focus and reduces
excessive scrolling.
5.​ SINGLE STEPPING: Run program one line at a time to locate exact line where error occurs.
6.​ BREAKPOINT: Marker placed on a specific line of code where execution will stop automatically .
Saves time in long programs. A REPORT WINDOW shows the contents of variables and
expressions evaluated at that point in the program.
7.​ AUTO DOCUMENTER: Explain the function and purpose of programming code.

CH6 - SECURITY, PRIVACY, AND DATA INTEGRITY

DATA SECURITY

DATA PRIVACY
Data Privacy= the privacy of personal information, or other information stored on a computer, that should not
be accessed by unauthorised parties
Data Protection Law
To achieve this — Data Protection Laws (laws which govern how data should be kept private and secure)
Guide:
1.​ Data must be fairly and lawfully processed
2.​ Data can only be processed for the stated purpose
3.​ Data must be adequate, relevant, and not excessive
4.​ Data must be accurate
5.​ Data must not be kept longer than necessary
6.​ Data must be processed ina accordance with the data subject’s right
7.​ Data must be kept secure
8.​ Data must not be transferred to another country unless that country also has adequate protection

DATA SECURITY
= methods taken to prevent unauthorized access to data and to recover data if lost or corrupted

1.​ User Accounts


-​ It is to authenticate a user (prove the user is who they claim to be)
-​ Used on both standalone and networked computer
-​ Consist of: Username and password
-​ User account control access rights
-​ Involves level of access

2.​ Passwords
-​ restrict access to data or systems
-​ Hard to crack and changed frequently to retain security
-​ Run anti-spyware to make sure password is not being relayed to whoever spying
-​ Regularly change passwords and make it hard to crack
-​ At least one capital
-​ At least one numerical
-​ At least one symbol
3.​ Digital Signatures
-​ a way of identifying the sender of
4.​ Firewalls
-​ software/hardware that sits between a computer and external network that monitors and filters all
incoming and outgoing activities
-​ Examine traffic between user’s computer and public network
-​ Checking whether incoming/outgoing data meets a given set of criteria
-​ Prevent access to undesirable sites
-​ However cannot protect individuals using their own modems to by-pass the firewall
-​ Prevent stand-alone computers from disabling the firewall
5.​ Antivirus Software
-​ Constantly check for virus attack
-​ Check software /files before they are run or loaded on computer
-​ Compare possible viruses against a database of known viruses
6.​ AntiSpyware Software
-​ detects and removes spyware programs installed illegally on a user’s computer system
7.​ Encryption
-​ the use of encryption keys to make data meaningless without the correct decryption key
-​ Cannot stop backer from deleting files, but stop from using the data
8.​ Biometrics
-​ use of unique human characteristics to identify a user
-​ Fingerprint scans, retina scans

RISKS
1.​ Hacking
-​ Malicious Hacking
-​ Illegal access to a computer system without the user’s permission or knowledge
-​ Personal details
-​ Ethical Hacking
-​ Authorized by companies to check their security measures and how robust their computer
systems are to resist hacking attacks
2.​ Malware
-​ Viruses = program or code that can replicate and/or copy themselves with the intention of
deleting/corrupting files or causing the computer to malfunction
-​ Spyware = gather information by monitoring
-​ Key press = sent back to person who sent the software
3.​ Phishing
-​ legitimate looking emails designed to trick a recipient into giving their personal data to the sender of
the email
-​ To prevent:
-​ User need to be aware of new phishing scams
-​ Do not click on links unless its safe (fake mails)
-​ Look out for https green padlock
-​ Be wary of pop ups
4.​ Pharming
-​ redirecting a user to a fake website in order to illegally obtain personal data about the user
-​ redirecting can be done using DNS Cache Poisoning
-​ Everytime a user types in a URL, their web browser contacts the DNS server
-​ IP Address of website is sent back to web browser
-​ DNS cache poisoning changes the real IP address values to those of the web websites
consequently, the user’s computer connects to fake website
-​ Protection:
-​ Using antivirus software
-​ Check https and green padlock
-​ Check spelling of websites
DATA RECOVERY

DATA INTEGRITY
= The accuracy, completeness and consistency of data
Can be compromised:
-​ during the data entry and data transmission stages
-​ Malicious attack on data: malware and hacking
-​ Accidental data loss due to hardware issues

VALIDATION
= method used to ensure entered data is reasonable and meets certain input criteria
VERIFICATION
= method used to ensure data is correct by using double entry or visual checks

1.​ Verification during Data Entry


-​ need to undergo verification to ensure there are no errors
-​ Double Entry
-​ Data is entered twice, using 2 different people, and then compared either after data entry or
during the data entry process
-​ Visual Check
-​ Entered data is compared with the original document
-​ Check Digits
-​ An additional digit added to a number
-​ Often used in barcodes, ISBNs, and VINs
-​ Catch errors including:
-​ Incorrect digit being entered
-​ Phonetic errors
-​ Transposition error where 2 numbers had been swapped
-​ Modulo-11
-​ Method to calculate a check digit based on modulus division by 11

2.​ Verification During Data Transfer


-​ possibility of data corruption or data loss
-​ Checksum = method to check if data has been changed or corrupted following data transmission
-​ Before block of data is transmitted, checksum for the bytes is first calculated
-​ Value is transmitted with the block of data
-​ At the receiving end, the checksum is re-calculated from the block of data received
-​ Calculated value is compared to the checksum transmitted
-​ If same = data transmitted wi​
,.thout any errors
-​ If different = request is sent for the data to be re-transmitted
-​ Parity Check = check whether data has been changed or corrupted following transmission from one
device or medium to another
-​ A byte of data is allocated a parity bit
-​ This is allocated before transmission
-​ Systems that use even parity bit have an even number of 1-bits
-​ Systems that use odd parity bit have an odd number of 1-bits
-​ Before data is transferred, an agreement is made between sender and receiver regarding
which of the 2 types of parity are used
-​ If parity bit is different, there’s an error
-​ Impossible to know which bit is error
-​ To solve = parity blocks
-​ Block of data is sent and the number of 1-bits are totaled horizontally and vertically
3.​ Automatic Repeat Request (ARQ)
= uses acknowledgement (a message sent to the receiver indicating that data has been received
correctly) and timeout (the time interval allowed to elapse before an acknowledgement is received)
-​ when the receiving device detect an error in a data transmission, it ask for the data packet to
be re-sent
-​ If no error is detected, a positive acknowledgement is sent to the sender
-​ The sending device will resend the data package if:
-​ It receives a request to resend the data or timeout occurred
-​ Whole process is continuous until data packet received is correct or until the ARW timeout is
reached

PROBLEMS IF EVEN BOTH VERIFICATION AND VALIDATION IS USED


-​ Verification check if data matches with original/given data but not if original data is accurate
-​ Validation only check if data is reasonable/within certain criteria but not if the data is actually
accurate

CH7 - ETHICS AND OWNERSHIP


= moral principles governing an individual or organisation’s behaviour, such as a code of conduct
Computer ethics set of rules that regulate the use of computers

Aim:
-​ to raise awareness of ethical issues
-​ Promote ethical behaviours among professionals working in the electronic industries
-​ Ensuring engineers and scientist respect the need for ethical behaviour

PRINCIPLES
1.​ Public
-​ Software engineer shall act consistently with the public interest
2.​ Client and Employer
-​ Software engineer shall act in a manner that is in the best interests of their clients and employer
consistent with the public interest
3.​ Product
-​ Software engineers shall ensure that their product and related modifications meet the highest
professional standards possible
4.​ Judgment
-​ software engineers shall maintain integrity and independence in their professional judgement
5.​ Management
-​ Software engineers managers and leaders shall subscribe to and promote an ethical approach to the
management of software development and maintenance
6.​ Profession
-​ Software engineers shall advance the integrity and reputation of their profession consistent with the
public interest
7.​ Colleagues
-​ Software engineers shall be fair to and supportive of their colleagues
8.​ Self
Software engineers shall participate in lifelong learning regarding the practice of their profession
and shall promote an ethical approach to the practice of the their profession

COPYRIGHT ISSUES
A copyright is legal protection that gives creators total control of how their work is used and distributed and
prevents others from using their work without their permission
Why need copyright?
-​ software piracy = making illegal copies of software
-​ Which can be sell out or give away to other people

Steps to stop illegal copying of outward and to stop illegal copies being sold:
-​ User will be asked to agree the license agreement before software continue to install
-​ user will be asked to key in a product key (string of letters and numbers) which was supplied with the
original copy of the software

SOFTWARE LICENSING
1.​ Commercial Software
-​ Available to customers for a fee
-​ Providing a licence for one genuine copy to be used on a single device or a multi-use licence for
multiple users
-​ Software is offered free of charge if an earlier version was bought by user
-​ Fully copyright protected and none of the code can be used without prior consent of the copyright
owner
2.​ Free Software and the Open Source Initiative
-​ non profit organization that promote the benefits of giving users the freedom to run, copy, change,
and adapt software
-​ Freedoms:
-​ Run the software for any legal purpose they wish
-​ Study the program source code and modify it where necessary to meet their needs
-​ Redistribute copies of the software to friends and family
-​ Distribute code modified by the user to family and friends
-​ User don’t need to seek permission as it’s not protected with copyright restrictions but user not allow
to:
-​ Add source code from another piece of software unless this is also described as free
software or open source software
-​ Use the source code to produce software which copies existing software which is subject to
copyright laws
-​ Use the source code to produce software which is deemed offensive by third parties

-​ Free Software Foundation


-​ Focuses on what the recipient of the software is permitted to do with the software
-​ Not subjected to copyright laws and users are often requested to tick a box say they
“understand the agree to the terms and conditions”
-​ Open Source Initiative
-​ Focuses on the practical consequences offered by the 4 freedoms
-​ Aim to provide effective collaboration on software development by the users

3.​ Freeware
-​ software a user can download from the internet free of charge
-​ Ex; adobe reader, skype
-​ Free software
-​ subjected to copyright laws and users are often requested to tick a box say they “understand the
agree to the terms and conditions”
-​ User is not allowed to study or modify the source code in any way
4.​ Shareware
-​ allows users to try out some software free of charge for a trial period
-​ End of trial, author of software will request that you pay fee if you wish to continue using it
-​ Once paid, user is registered with the originator of the software and free updates and help are then
provided
-​ Trial period often miss some features of the full version, not available until fee is paid
-​ Protected under copyright law = any source code cannot be used without permission

ARTIFICIAL INTELLIGENCE (AI)


= a machine or application which carries out a task that requires some degree of intelligence when carried
out by a human being

Tasks can be:


-​ Carrying out mathematical calculations or functions
-​ Recognizing person’s face
-​ Ability to operate machinery
-​ Analyzing data to predict the outcome of a future event

IMPACT
1.​ Social
-​ leave people with more time to pursue their interests
-​ Transport = automation in payment, GPS (waze)
-​ Criminal Justice System = facial recognition system in forensic science
2.​ Economic
-​ automation will cause production to be more efficient
-​ Increase unemployment (low skill jobs)
-​ Instability for the future labour
3.​ Environmental
-​ Find patterns and interconnection within thousands of data set
-​ Help scientists to make predictions about the environment and climate change

CH8 - DATABASES
= a structured collection of items of data that can be accessed by different application programs

FILE BASED APPROACH

Limitations:
-​ Storage space is wasted when data items are duplicated by the separate applications and some
data is redundant
-​ Data can be altered by one application and not by another - inconsistent
-​ Enquirers available can depend on the structure of data and software used so data is not
independent
RELATIONAL DATABASE
= database in which the data items are linked by internal pointers

+​ storage space is not wasted as data items are only stored once - no little or no data redundant
+​ Data entered is one application is available in another application - data is consistent
+​ Enquirers available are not dependent on the structure of data and software used - data is
independent

*Table = a group of similar data in a database, with rows for instance of an entry and columns for each
attribute
*Record = a row in a table in a database
*Field = column in a table in a database

KEYS
-​ Candidate Key = an attribute or smallest set of attributes in a table where no tuple has the same
value
-​ Primary Key = a unique identifier for a table/ a unique attribute used to identify a record
-​ Secondary Key = a candidate key that is an alternative to the primary key
-​ Foreign Key = a set of attributes in one table that refers to the primary key in another table
-​ tuple is a single instance of an entity that is represented as a table row.
-​ Attribute =a column in the table/ an individual data item stored for an entity
-​ entity=anything that can have data stored about it
-​ Referential integrity =makes sure that when data is changed the change is reflected in all related
records/the database must not contain any values of foreign key that are not matched with the
corresponding primary key.

RELATIONSHIP
= formed when one table in a database has a foreign key that refers to a primary key in another table in the
database
ENTITY RELATIONSHIP

1.​ One-to-One
2.​ One-to-Many
3.​ Many-to-One
4.​ Many-toMany

NORMALISATION
= used to construct a relational database that has integrity and in which data redundancy is reduced
-​ table that has not been normalised appear larger

1.​ First Normal Form (1NF)


​ = entities do not contain repeated groups of attributes
2.​ Second Normal Form (2NF)
= entities are in 1NF and non-key attributes depend upon the primary key
3.​ Third Normal Form (3NF)
​ = entities are in 2NF and all non-key attributes are independent
-​ table contains no non-key dependencies
DATABASE MANAGEMENT SYSTEMS (DBMS)
-​ Is used to create and manipulate a database
-​ Provide data management such as development of a data dictionary
-​ The logical schema uses methods like ER diagram to show the structure of the database and its
relationships
-​ The query processor allow the user to perform searches to find specific data
-​ The developer interface allows user to create tables, forms, reports

HOW A DBMS ADDRESS THE LIMITATION OF A FILE BASED APPROACH


1.​ Data Redundancy Issue
-​ solved by storing data in separate linked tables, which reduces the duplication of data as most items
of data are only stored once
-​ Items of data used to link tables by the use of foreign keys are stored more than once
-​ DBMS will flag any possible errors when any attempt is made to accidentally delete this type of item
2.​ Data Inconsistency Issue
-​ solved by storing most items of data only once, allowing updated items to be seen by all applications
-​ As data is not inconsistent, the integrity of the data stored is improved
-​ Consistent data is easier to maintain as an item of data will only be changed once, not multiple
times, by different applications
3.​ Data Dependency Issue
-​ data is independent of the applications using the database, so changes made to the structure of the
data will be managed by DBMS and have little or no effect on the application using the database
4.​ The DBMS Approach
-​ uses a more structured approach to the management, organisation, and maintenance of data in a
database
-​ An already defined data structured can be used to set up and create the database
-​ Uses a data dictionary to store the metadata, including the definition of tables, attributes,
relationships between tables and any indexing
-​ Can also define the physical storage of the data.
-​ Improve the integrity of data stored, helping to ensure that it is accurate, complete and
consistent.
-​ Data Modeling
-​ To show the data structure of a database
-​ Ex: E-R diagram gives a visual representantion of the relationships of tables in database
-​ Logical Scheme
- The overview of a database structure that models problems by using ER diagrams
independent of any particular DBMS.
-​ Provides data security to prevent unwanted alteration, corruption, deletion, sharing data with others
that has no access
-​ Using usernames, passwords to prevent unauthorised access
-​ Encryption of the data stored
-​ Using access rights — different level of access
USAGE OF DBMS SOFTWARE TOOLS
1.​ Developer Interface
-​ allows a developer to write queries in Structured Query Language (SQL)
-​ These queries are then processed and executed by the Query Processor
-​ Allow the construction of more complex queries to interrogate the database
2.​ Query Processor
-​ Takes a query written in SQL and processes it
-​ Includes a DDL interpreter, DML compiler, and a Query Evaluation Engine
-​ DDL Statements = interpreted and recorded in the database’s data dictionary
-​ DML Statements = compiled into low level instructions that are executed by the query
evaluation engine
-​ DML compiler will optimise the query

DATA DEFINITION LANGUAGE (DDL) & DATA MANIPULATION LANGUAGE (DML)

DATA DEFINITION LANGUAGE (DDL)


= a language to create, modify, and remove the data structures that form a database
-​ Written as scripts that uses syntax similar to a computer program
-​ To work on relational databases structure

DATA MANIPULATION LANGUAGE (DML)


= a language used to add, modify, delete, and retrieve the data stored in a relational database
-​ written in a script that is similar to a computer program
-​ To work with the data stored in the relational database

STRUCTURED QUERY LANGUAGE (SQL)


= a list of SQL commands that perform a given task, often stored in a File for reuse
CH9 - ALGORITHM DESIGN AND PROBLEM-SOLVING

COMPUTATIONAL THINKING SKILLS

ABSTRACTION
- the process of extracting essential information, while ignoring what is not
relevant, for the provision of a solution
-​ Encourages the development of simplified models that are suited to a specific purpose
by eliminating any unnecessary characteristics from that model
-​ Ex: Map, Calendar, Timetables
-​ Maps to show what is required for a specific purpose: road map
-​ Only showing essential details needed
Benefits:
+​ the time required to develop the program is reduced so the program can be delivered to
the customer more quickly
+​ The program is smaller in size so it takes up less space in memory and download times
are shortened
+​ Customer satisfaction is greater as their requirements are met without any extraneous
features

HOW
-​ identify the purpose of the model of the situation that is to be built
-​ Once identified, sources of information need to be identified (observations, view of
potential users, evidence of existing models)
-​ Use information gathered from appropriate sources to identify what details need to be
included in the model (details to be presented, need to be removed, etc)

DECOMPOSITION
= the process of breaking a complex problem into smaller parts until each part is easy to
examine and understand, hence a solution can be developed for it

Pattern Recognition
= used to identify those parts that
are similar and could use the same
solution
-​ led to the development of
reusable program code in the form
of subroutines, procedures, and
functions
-​ When writing a comp
program, each final part is defined
as a separate program module that
can be written and tested with a
separate pro cedure or function
ALGORITHMS
= an ordered set of steps to be followed in the completion of a task

METHODS
1.​ Structured English
-​ method of showing the logical steps of the algorithm using an agreed subset of
straightforward English words for commands and mathematical operations
2.​ FlowChart
-​ a diagrammatic representation of an algorithm
-​ To show the structure of an algorithm
3.​ Pseudocodentax of a specific programming language, but provide sufficient detail to
allow a program to be written in a high-level language
4.​
-​ a method of showing the detailed logical steps in an algorithm, using keywords,
identifiers with meaningful names, and mathematical operators
Not follow the sy3 fxds
STEPWISE REFINEMENT
= the practice of subdividing each part of a larger problem into a series of smaller parts, and so
on, as required
CH10 - DATA TYPES AND STRUCTURES

DATA TYPES
= a classification of different types of data
-​ Determine properties like what operations can be conducted on the data and how the
data will be stored

RECORD
= a composite data type comprising several related items that may be of different data types

*Composite Data Type = a data type constructed using several of the basic data types available
in a particular programming language
-​ must be defined before it can be used
-​ Any data type not provided by a programming language must be defined before it can be
used
In records, there is an IDENTIFIER
-​ Identifier = a unique name applied to an item of data

ARRAYS
= a data structure containing several elements of the same data types
-​ Index = the position of each component of an array
-​ Lower Bound = the index of the first element in an array
-​ Usually 0 or 1
-​ Upper Bound = the Index of the last element in an array
-​ Why?
-​ Used to store multiple data types in a uniformly accessible manner
-​ All data types use the same identifier and each data item can be accessed
separately by the use of an index
-​ Hence, a list of items can be stored, searched, and put into an order

1D ARRAYS
= a list
2D ARRAYS
= a table, with rows and columns

LINEAR SEARCH
= a method of searching in which each element of an array is checked in order
-​ uses variables Upperbound and Lowerbound so that the algorithm is easier to adapt for
different lengths of list
-​ REPEAT UNTIL loop makes use of 2 conditions, so that the algorithm is more efficient,
termination as soon as the item is found in the list

IDENTIFIER TABLE
-​ good practice to provide an identifier table to keep track of and explain the use of each
identifier in an algorithm
-​ Allows the programmer to keep track of the identifiers used and provides a useful
summary of identifiers and their uses if the algorithm requires modification at a later date

BUBBLE SORT
= a method of sorting data in an array into alphabetical or numerical order by comparing
adjacent items and swapping them if they are in the wrong order
-​ start from the lower bound and finishing with the element next to the upper bound
-​ The element at the upper bound is now in the correct position
-​ This comparison is repeated with 1 less element in the list until there is only 1 element
left or no swaps are made
FILE
= a collection of data stored by a computer program to be used again

1.​ OPEN FILE

2.​ EOF

3.​ CLOSE FILE


ABSTRACT DATA TYPE (ADT)
= a collection of data and a set of operations on that list

STACKS QUEUES LINKED LISTS

= a list containing several = a list containing several = a list containing several items
items operating on the items operating on the first in, in which each item in the list
last in, first out (LIFO) first out (FIFO) principle points to the next item in the list
principle

➔​ uses two pointers ➔​ uses two pointers ➔​ Uses a smart pointer that
➔​ A base pointer ➔​ A front pointer points points to the first item in
points to the first to the first item in the the linked list
item in the stack
queue and a rear ➔​ Every item in a linked list
and a top pointer
points to the last pointer points to the is stored together with a
item in the stack last item in the queue pointer to the next item
➔​ When they are ➔​ When there are equal, ➔​ This is called a node
equal there is only there is only one item ➔​ The last item in a linked
one item in the in the queue list has a null pointer
stack

— queue has a finite size, — use two 1D arrays, one


so can come full for the linked list and one
— As items are removed for the pointers to the
from the front and next item in the list
added to the end, the — link list can become full
position of the queue — items can be removed
in the array won't from any position in the
change linked list, the empty
— Therefore queue should position in the array must
be managed as a be managed as an
circular queue to avoid empty linked list (heap)
moving the position of
the items in the array
every time an item is
removed
— Every time a queue is
updated (removed or
added), the front
pointer is updated to
the first element (lower
bound) and the rear
pointer to the last
element (upper bound)
●​ items can be ●​ Items can be added to ●​ In a linked list, a new
added to the stack the queue (enqueue) item is always added to
(push) and and removed from the the start of the list
removed from the queue (de queue)
stack (pop) ●​ The first item added to
●​ The first item a queue is the first
added to a stack item to be removed
is the last item to from the queue
be removed from
the stack

-​ Memory -​ Management of files -​ Using arrays to


Management sent to a printer implement a stack
-​ Expression -​ Buffers used with -​ Using arrays to
evaluation keyboards implement a queue
-​ Backtracking in -​ Scheduling -​ Using arrays to
recursion implement a binary tree
STACK

QUEUE
LINKED LIST
CH12 - SOFTWARE DEVELOPMENT
PROGRAM DEVELOPMENT LIFECYCLE
PURPOSE OF A PROGRAM DEVELOPMENT LIFECYCLE
-​ To develop a successful program or suite of programs that is going to be used by others
to perform a specific task

STAGES

1.​ Analysis
-​ A process of investigation, leading to the specification of what a program is required to
do
2.​ Design
-​ Uses the program specification from the analysis stage to show how the program should
be developed
3.​ Coding
-​ The writing of the program or suite of programs
4.​ Testing
-​ The testing of the program to make sure that it works under all conditions
5.​ Maintenance
-​ The process of making sure that the program continues to work during use

WATERFALL MODEL
= A linear sequential program development cycle, in which each stage is completed before the
next is begun

PRINCIPLE ●​ linear, as each stage is completed before the next is begun


●​ Well documented as full documentaries is completed at every
stage
●​ Low customer involvement, only involved at the very start and end
of the process

BENEFITS +​ easy to manage, understand and use


+​ Stages do not overlap and are completed one at a time
+​ Each stage has specific deliverables
+​ Work well for smaller programs when requirements are known and
understood

DRAWBACKS -​ difficult to change the requirements at a later stage


-​ Not suitable for programs where the requirements could be subject
to change
-​ Working program is produced late in the life cycle
-​ Not suitable for long, complex projects

ITERATIVE MODEL
= a type of program development cycle in which a simple subset of the requirements is
developed, then expanded or enhanced, with the development cycle being repeated until the full
system is deployed

PRINCIPLE ●​ Incremental development as the program development life cycle


is repeated
●​ Working programs are produced for parts of the system at every
iteration
●​ High customer involvement, as part of the system can be shown
to the customer after every iteration

BENEFITS +​ some working programs developed quickly at an early stage in the


lifecycle
+​ Easier to test and debug smaller programs
+​ More flexible as easier to alter requirements
+​ Customers involved at each iteration therefore no surprises when
final system delivered

DRAWBACKS -​ whole system needs to be defined at start, so it can be broken


down into pieces to be developed at each iteration
-​ Need good planning overall and for every stage
-​ Not suitable for short simple projects

RAPID APPLICATION DEVELOPMENT (RAD)


= a type of program development cycle in which different parts of the requirement are developed
in parallel, using prototyping to provide early user involvement in testing

PRINCIPLE ●​ Minimal planning


●​ Reuses previously written code where possible, make use of
automated code generation where possible
●​ High customer involvement, as customers can use the
prototypes during development

BENEFITS +​ reduced overall development time


+​ Rapid frequent customer feedback informs the development
+​ Very flexible as requirements evolve from feedback during
development
+​ As parts of the system are developed side by side,
modification is easier because arch part must work
independently

DRAWBACKS -​ system under development needs to be modular


-​ Needs strong teams of skilled developers
-​ Not suitable for short simple projects

PROGRAM DESIGN
STRUCTURE CHART
= a modeling tool used to decompose a problem into a set of sub-tasks
-​ shows the hierarchy or structure of the different modules and how they connect and
interact with each other
-​ Show selection
-​ Show repetition

STATE TRANSITION DIAGRAMS


= A diagram showing the behavior of an FSM

CAN BE CONSTRUCTED BY:


1.​ States are represented as nodes (circles)
2.​ Transitiotion are represented as interconnecting arrows
3.​ Events are represented as label on the arrow
4.​ Conditions can be specified in square brackets after the event label
5.​ The initial state is indicated by an arrow with a black dot
6.​ A stopped state is indicated by a double circle
*Finite State Machine
= a mathematical model of a machine that can be in one of a fixed set of possible states
-​ 1 state is changed to another by an external input (TRANSITION)

PROGRAM TESTING AND MAINTENANCE

WAYS OF AVOIDING AND EXPOSING FAULTS IN PROGRAMS


-​ Faults in an executable program = faults in design of the program
-​ Avoid?
-​ provision of a comprehensive and rigorous program specification at the
end of the analysis phase of the program development life cycle
-​ followed by the use of formal methods such as structure charts, state
transition diagrams
-​ Coding Stage
-​ Avoid?
-​ Information hiding, encapsulation, and exception handling
-​ Faults or Bugs = exposed at the testing stage
-​ Can appear during the lifetime of a program and may be exposed during live
running
-​ Faults are then corrected as part of the maintenance stage of the program
lifecycle

TYPES OF ERRORS

1.​ SYNTAX ERROR


​ = errors in the grammar of a source program
-​ during the program development life cycle, program are either compiled or
interpreted so they can be executed
-​ During this operation, the syntax if the program is checked, and errors need to be
corrected before the program can be executed
-​ Many IDE offers suggestion about what syntax errors are and how to correct
them
2.​ LOGIC ERROR
​ = errors in the logic of a program => program does not do what it’s supposed to do
-​ found when the program is being tested
-​ Many IDE allows you to single step through the program to find errors
-​ Manually check using trace table
-​ Trace Table = shows the process of dry-running a program with columns
showing the values of each variables as it changes
3.​ RUN-TIME ERRORS
​ = an error found in a program when it is executed, the program may stop unexpectedly
-​ when program is tested in IDE, this type of error may be managed, and a suitable
error message given
-​ If program has been released for use and a run-time error occurs, the developer
should be informed so that the program can be updated and re-released or a
patch can be sent out to all customers to solve the problem
-​ Patch = a small program, released by the developers, to run with an
existing program to correct an error or to provide extra functionality

PROGRAM TESTING
TEST STRATEGY
= an overview of the testing required to meet the requirements specified for a particular program
-​ shows how and when the program is to be tested

TEST PLAN
= a detailed list showing all the stages of testing and every test that will be performed for a
particular program
-​ to clarifier what tests need be perform
During the program design stage, pseudocode is written
-​ Tested using a dry run on trace table
-​ Dry Run = a method of testing a program that involves working though a program
or module from a program manually
WALKTHROUGH
= formalized version of a dry run using predefined test cases
-​ When another member of the development team independently dry runs the
pseudocode, or the developers takes the team members through the dry run process
-​ Often does as a demonstration
-​ During the program development and testing, each module is tested as set out in the
test plan

TYPES OF TEST DATA


1.​ Normal
-​ Data that is to be accepted by a program and is used to show that the program is
working as expected
2.​ Abnormal
-​ Data should be rejected by a program as it unsuitable or could cause problems
3.​ Extreme
-​ Data that is on the limit of that accepted by the program
-​ Ex: Number >= 12 AND Number <= 32
-​ 12 would be lower limit
-​ 32 would be upper limit
4.​ Boundary
-​ Data that is on the limit of that accepted by a program or that data is just outside
the limit of that rejected by the program
-​ Ex: Number >= 12 AND Number <= 32
-​ Accept data 12 and 11 as lower limit
-​ Accept data 32 and 33 as upper limit
-​ Or
-​ 11 and 33 should be rejected
TYPES OF TESTING DURING DEVELOPING PROCESS
1.​ White Box
-​ the detailed testing of how each procedure works
-​ Involves testing the structure and logic of every path through a program module
2.​ Black Box
-​ Tests a module’s input and output
3.​ Integration
-​ the testing of any separately written modules to ensure that they would work
together, during the testing phase of the program development life cycle
-​ If any of the models have not been written yet, this can include Stub Testing
-​ Stub Testing = make use of dummy modules for testing purposes

TYPES OF TESTING AFTER DEVELOPMENT


1.​ Alpha Testing
-​ The testing of a completed or nearly completed program in-house by the
development team
2.​ Beta Testing
-​ The testing of a completed program by a small group of users before it is
released
3.​ Acceptance Testing
-​ The testing of a completed program to prove to the customer that it works as
required

TYPES OF PROGRAM MAINTENANCE


1.​ Corrective Maintenance
-​ The correction of any errors that appears during use
-​ Changes to correct a bug in the program
2.​ Perfective Maintenance.
-​ The process of making improvements to the performance of a program
3.​ Adaptive Maintenance
-​ The alteration of a program to perform new tasks
-​ Changes due to change in specification/requirements

You might also like