0% found this document useful (0 votes)
12 views44 pages

Understanding Data Representation in Computing

The document covers fundamental concepts of information representation in computer science, including data representation, multimedia, and compression techniques. It explains binary and hexadecimal systems, character sets like ASCII and Unicode, and the differences between bitmap and vector graphics. Additionally, it discusses network topologies, client-server models, and the advantages and disadvantages of cloud computing.

Uploaded by

Maggie Chen
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)
12 views44 pages

Understanding Data Representation in Computing

The document covers fundamental concepts of information representation in computer science, including data representation, multimedia, and compression techniques. It explains binary and hexadecimal systems, character sets like ASCII and Unicode, and the differences between bitmap and vector graphics. Additionally, it discusses network topologies, client-server models, and the advantages and disadvantages of cloud computing.

Uploaded by

Maggie Chen
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

AS Computer Science

Chapter 1: Information Representation

1.1 Data Representation

Why do we use Binary?

 Electronic components can only reliably represent two states: on/off or high/low
voltage.

Definition of overflow.

 A condition when the result of a calculation is too large to fit into the number of bits
defined for storage.

Why do we use Hexadecimal?

 Hexadecimal simplifies binary representation, aiding memory addressing and byte


visualization, easier for humans to read, understand and remember.
 One nibble can be written by one hexadecimal digit.

Uses of Hexadecimal

 Error code
 IP address
 MAC address
 HTML colour codes

Benefits of Using Binary Coded Decimal (BCD)

 Straightforward to convert to/from BCD and denary so it is less complex to encode


and decode for programmers.
 Easier for digital equipment to use BCD to display output information.
 Can represent monetary values exactly.

Uses of BCD

 Financial/banking calculations
 because it is difficult to represent decimal values exactly in normal binary and
financial transactions use only two decimal places and must be accurate, with no
accumulating errors.
 Electronic displays (e.g. calculators, digital clocks)
 because visual displays only need to show individual digits.
 because conversion between denary and BCD is easier.
 The storage of the date and time in the BIOS of a PC
 because conversion between denary and BCD is easier.

Definition of character set.

 All of the characters/symbols that the computer can use/represent. Each character
has a unique number.

ASCII & Extended ASCII & Unicode

Character Set Number of bits

ASCII 7

Extended ASCII 8

Unicode 32

What are the similarities of the ASCII and Unicode?

 Both can use 8 bits.


 Both represent each character using a unique code.
 Unicode will contain all the characters that ASCII contains.

What are the differences between ASCII and Unicode?

 Unicode can go up to 32 bits per character whereas ASCII is 7 or 8 bits. Unicode can
represent a wider range of characters than ASCII.
 Different languages are represented using Unicode, ASCII is only for one language.

How a word is represented by a character set?

 Each character has a unique binary code.


 The binary code for each character is stored in sequence.

1.2 Multimedia

Graphics

Definition of bitmap image.

 Image is made of pixels and each pixel has one colour.


 Each colour has a unique binary code.
 Code for the colour of each pixel is stored in sequence.

Definition of pixel.

 The smallest addressable component of a bitmap image.


Definition of image resolution.

 The number of pixels in the bitmap file defined as the product of the width and the
height values.

Definition of screen resolution.

 The product of the width and height values for the number of pixels that the screen
can display.

Advantages of high-resolution.

 More pixels can be stored.


 The image is less pixelated.

Disadvantages of high-resolution.

 It will require a lot of space to store it and will quickly run out of memory
 It'll take a long time to transmit images across the internet or other data route

Definition of bit depth.

 The number of bits used to store each colour.

Definition of colour depth.

 The number of bits per pixel, determines the number of colours that can be
represented in the image.

Definition of file header.

 A set of bytes at the beginning of a bitmap file which identifies the file and contains
information about the coding used.

Items included in the file header

 File type
 Compression type
 Location of data within the file
 Dimensions

Definition of vector graphics.

 A graphic consisting of drawing objects defined in a drawing list, allowing for


scalability without loss of quality.

Definition of drawing object.


 A component defined by geometric formulae and associated properties, such as
rectangle, line or circle.

Definition of property.

 Defines one aspect of the appearance of the drawing object.

Definition of drawing list.

 A list that stores the commands required to draw each object.

Characters of bitmap images

 Bitmap is made of colours stored for individual pixels.


 When bitmap is enlarged the pixels get bigger and it pixelates.
 Bitmap files are usually bigger than vector graphics files because of the need to
store data about each pixel.
 Bitmap images can be compressed with significant reduction in the file size.

Characters of vector images

 Store a set of instructions about how to draw the shape.


 When a vector is enlarged it is recalculated and does not pixelate.
 Vector graphics have smaller file sizes because they contain just the instructions to
create the shape.
 Vector graphic images do not compress well because of little redundant data.

Sound

Definition of analogue data.

 Data obtained by measurement of a physical property which can have any value from
a continuous range of values.

Definition of digital data.

 Data that has been stored as a binary value which can have one of a discrete range
of values.

How computer encodes the sound track?

 The amplitude of the wave is measured at regular time intervals.


 Each amplitude is given a corresponding binary number.
 The binary number of each amplitude is saved in sequence.

Definition of sampling.

 Measuring the amplitude of the sound wave at regular time intervals.


Definition of sampling rate.

 The number of samples taken per second.

Definition of sampling resolution.

 The number of bits assigned to each sample.

Definition of bit rate.

 The number of bits required to store 1 second of sound.

Explain the effects of reducing the sample rate.

 Fewer samples per unit of time.


 File size will decrease.
 Larger gaps between samples.
 Sound accuracy will be reduced.

1.3 Compression

Definition of lossless file compression.

 File compression method where the original file can be restored following
decompression.

Definition of lossy file compression.

 File compression method where parts of the original file cannot be recovered during
decompression, so some of the original detail is lost.

Lossy compression for bitmap image

 Reduce bit depth


 Reduces the number of bits per colour which means each pixel has fewer bits.
 Reduce number of colours
 Fewer colours means fewer bits needed to store each colour.
 Reduce image resolution
 Fewer pixels per unit measurement means less binary to store.

Lossy compression for sound

 Reduce sample rate


 Reduce sample resolution
 Using perceptual music shaping
 Frequencies that are outside the human hearing range.
 If two sounds are played at the same time, only the louder one can be heard by
the ear, so the softer sound is eliminated.

Explain why lossy compression should not be used on a text file.

 None of the original data can be deleted.


 The text file compression would be corrupted.

Definition of run-length encoding.

 A compression method that encodes repeated byte values by specifying their count
and value.

Explain the reason why RLE may not reduce the file size of a bitmap image. Give
one example.

 RLE stores a colour and the number of times it occurs consecutively.


 An image may not have many sequences of the same colour.
 It would need to store each colour and then the count 1 which add data.
 Example: Red-Green-Blue would become Red1 Green1 Blue1.

Chapter 2: Communication

Characteristics of local area network.

 Covers a small geographical area.


 The infrastructure is privately owned, not controlled by external organisations.

Benefits of Connecting Computers to a LAN.

 Allows the sharing of files/data // Allows communication between the devices.


 Allows the sharing of resources e.g. hardware/software (applications).
 Allows central management, e.g., backup, security, etc.

Differences between WAN and LAN

 WAN covers a large geographical area and LAN covers a small geographical area.
 LAN connections between devices are usually physical, whereas the WAN
connections are often virtual.
 A LAN has a high data transfer rate, whereas a WAN has a low data transfer rate.
 The ownership of a LAN is private; the ownership of a WAN can be private or public.
 LAN is usually more secure than a WAN because protection is easier to implement.

A school is setting up a network within one of its buildings.

State whether the network will be a LAN (local area network) or a WAN (wide area
network). Justify your choice.
 LAN.
 Small geographical area.
 No external infrastructure/ transmission media//does not use Internet to transmit
within the building.

Roles of Clients and Servers in Client-server Model.

 Web pages/files are saved on servers.


 Clients send requests to the web server.
 Web servers process the requests and return the results to the client.
 Client displays the results to the user.

Common Applications of Client-server Model.

 File server
 Domain controller server
 Printer server
 Database server
 Email server
 Web server

Why Web Application Uses Server-side Scripting?

 All data is held on the server // All processing is performed on the server.
 The server only sends the results of the query to the client.
 The client does not have access to all the data, which keeps the data more
secure/consistent.
 Customers can be identified when they log in from a database of usernames and
passwords.

Benefits of Client-server Model.

 Different servers can provide a wide range of services.


 Provides for the central storage of all files and documents.
 Security: including the administration of user accounts – is centralized.
 It allows an organization to control the downloading and use of files.
 The files can be better protected from malware attacks because the files are stored
on one server which will be regularly scanned using appropriate anti-virus software.

Drawbacks of Client-server Model.

 Initial set-up cost for the server and the client workstations will be high.
 A server-based network requires the use of a specialist network operating system.
 If the server fails then the work of all users is affected.

Characteristics of thin-client.
 Data is not stored on the client computer.
 Client computer is reliant on access to server.
 Client computer is heavily reliant on network/internet connection.
 Client computer requires few local resources/memory.
 Client computer performs minimal functions/processes.

Characteristics of thick-client.

 The server performs minimal / some processing for the client.


 The clients also do most of their own processing/work independently //most of the
resources are installed lacally.

Key Features of Peer-to-peer Network.

 All computers are of equal status.


 Each computer provides access to resources and data // data is distributed
 computers can communicate and share resources.
 Each computer is responsible for its own security.

Benefits of Peer-to-peer Network.

 It avoid the possibility of congestion on the network when many clients are
simultaneously attempting to download files.
 No dedicated server is required.
 Additional computers can join the P2P network easily.
 Each computer can act as both provider and receiver of resources.

Drawbacks of Peer-to-peer Network

 Reduced security // no central management of security.


 Only as secure as the weakest computer on the network
 Each computer is at risk from viruses from other computers
 No central management of backup.
 If the data from one computer is not backed up it is lost to all of them
 No central management of files/software.
 Consistency may be difficult to maintain
 Each computer may have different software from the others
 Individual computers may respond slower.
 Because they are being accessed by other computers
 In order to share files etc. all the computers involved need to be switched on.
 So the files etc. may not be always available

Advantages of Bus Topology.

 Even if one node fails, the remainder of the network continues to function.
 It is easy to increase the size of the network by adding additional nodes.
Disadvantages of Bus Topology.

 If the main cable fails, the whole network goes down.


 The performance of the network deteriorates under heavy loading.
 The network is not secure since each packet passes through every node.

Characteristics of Mesh Topology.

 All computers are connected to at least one other device.


 There are multiple routes between devices.
 The computers can act as relays, passing packets on towards the final destination.

Advantages of Mesh Topology.

 If one line goes down there are more routes available.


 Improved security as not using one main line.
 No/fewer collisions.
 New nodes can be added without interruption or interfering with other nodes.
 More secure because data is sent over a dedicated connection.

Disadvantages of Mesh Topology.

 A large amount of cabling is needed, which is expensive and time-consuming.


 Set-up and maintenance is difficult and complex.

How packets are transmitted between two devices in star topology.

 Sending computer transmits packets directly to switch/router/central device.


 Switch/router/central device checks destination address of packet and forwards
directly to that device.

Advantages of Star Topology.

 Data collisions are greatly reduced due to the topology.


 It is a more secure network since security methods can be applied to the central
node and packets only travel to nodes with the correct address.
 It is easy to improve by simply installing an upgraded hub.
 If one of the connections is broken it only affects one of the nodes.

Disadvantages of Star Topology.

 The initial installation costs are high.


 If the central hub/switch fails, then the whole network goes down.

Advantages of Hybrid Network.

 They can handle large volumes of traffic.


 It is easy to identify where a network fault has occurred.
 They are very well suited to the creation of larger networks.

Andy plays some of the computer games over the internet. He has several devices
that connect wirelessly to the router in his house.

Identify the topology of Andy’s home network. Justify your choice.

 Star topology.
 Devices are connected directly to the router independently// all devices are only
connected to the router.

A new classroom is being set up with 20 computers and a switch.

Explain one advantage of implementing a star topology instead of a bus topology


in the new classroom.

 Star topology is more resilient to faults.


 because there is no single cable and lends to less disruption to teaching
 Higher performance as fewer collisions.
 because each device in the class room is only connected to the switch
 Easier to add new nodes.
 because each device in the classroom connects directly to the switch
 Easier to fault find compared to bus topology.

Definition of Cloud Computing.

 Accessing a service/files/software on a remote server

Benefits of Cloud Computing.

 Can be accessed anywhere with Internet access.


 Do not need to install security // security might be better.
 Do not need to perform backups.
 Do not need to buy specific software/hardware.
 Can easily share documents.
 Can have multiple people working on the same document.

Drawbacks of Cloud Computing.

 You cannot access it if no internet access.


 Reliant on someone else to backup.
 Reliant on someone else for security // can have poorer security.
 Cannot access if server goes down.

Characteristics of Public Cloud.

 Computing services offered by third-party provider over the public Internet.


 Public is open/available to anyone with the appropriate
equipment/software/credentials.

Characteristics of Private Cloud.

 Dedicated/bespoke services/storage on a remote server only accessible for the


organisation.
 Computing services offered either over the Internet or a private internal network.
 Only available to selected news, not the general public.

Benefits of Private Cloud over Public Cloud.

 Not reliant on a third party.


 Gives greater control over security/privacy.
 Gives greater control over backup.
 Storage can be tailored/scalable to company requirements.

A company sells online Computer Science courses to students in different


countries. The courses are stored on a public cloud.

a) Explain why the company uses a public cloud to store these courses.

 Courses must be available to anyone who wishes to follow them.


 Courses must be available on the internet.
 Company is willing to share infrastructure with other companies (public) which is
more economic for the company.

b) Describe two disadvantages of storing data on a public cloud compared to


storing data on a server in a Local Area Network (LAN).

 There could be a possible loss of control unlike the LAN, because the data is stored
on a remote infrastructure/someone else’s infrastructure.
 Reliance on external agency to complete task, e.g. backups, security.
 Requires reliable internet connection to ensure access to the remote data, more
likely with LAN.
 Increased recurring costs as cloud provider charges must be paid, costs for LAN
once only.

Types of transmission media

Cable:

 Twisted pair
 Coaxial
 Fiber-optic

Wireless:

 Radio waves
 Microwaves
 Satellites

Benefits of Fibre-optic Cable.

 Less interference in the signal.


 The signal does not degrade as quickly // Needs less signal boosting.
 More secure // more difficult to hack.
 Greater bandwidth // Faster transmission speeds possible.

Drawbacks of Fibre-optic Cable.

 Initial installation cost is higher //Cable/hardware is more expensive to buy per


meter.
 Specialists / trained personnel are needed to install/maintain.
 Difficult to terminate // The electronics at both ends are more complex.
 Fibers can break when bent.
 Only transmits data in one direction // Cannot transmit power, only data.

Differences between Fibre-optic and Copper Cable.

 Fibre optic data is transmitted using light, and copper cable through signals.
 Fibre optic has higher bandwidth than copper cable // Fibre optic has higher
transmission rates than copper cable.
 Fibre optic has smaller risk of (noise) interference than copper cable.
 Fibre optics can be used over longer distances than copper cable before repeaters
are needed.
 Fibre optic is much more difficult to hack into than copper cable.
 Fibre optics is more prone to damage than copper cable.

Advantages of Transmitting Data Using Satellites.

 Not fixed to a single location.


 Allows access in remote/rural areas.

Disadvantages of Transmitting Data Using Satellites.

 High latency/ lag / slow to connect.


 More expensive than wired methods, as need extra equipment.
 Signal is affected by bad weather.
 The transmission speed is slower than fixed-line broadband.
 Direct line of sight needed.

Benefits of Wireless Network.

 Less hard-wiring/hardware is required, reduced cost of setting up the network.


 Users and computers can be mobile, the network can be accessed from anywhere
within range of an access point.
 It is much more straightforward to connect other devices, no need to physically
connect each device.

Drawbacks of Wireless Network.

 Transmissions may be less secure.


 because data packets can be intercepted // easier connection by unauthorised
user
 Bandwidth may be limited // As more devices connect the bandwidth can be reduced.
 so access may be slow
 It is subject to interference from other signals or obstacles
 which can hinder transmission or corrupt data
 Limited range // greater attenuation
 so there is a need for repeaters // users can easily move out of range
 Higher latency
 so transmission will be slower

Definition of fibre-optic.

 Transmits data as light, uses (a bundle of) glass/plastic threads to transmit data.

Definition of copper cable (twisted pair & coaxial).

 Carries data as electrical signals and can consist of a twisted pair.

Definition of satellies.

 A communication device in Earth’s orbit that receives and transmits data.

Definition of Radio waves.

 Carries data wirelessly, often known as Wi-Fi // Carries data in the form of
electromagnetic waves.

Students can connect their devices to the university network using cables or a
wireless connection.

Explain the benefits to the students of allowing them to use both wired and
wireless connections.

 Some students might only have one sort of connection on their device.
 Wired provides better performance for the student’s device, for example, enableing
faster access to university databases.
 There will be less infrastructure, if students connect via a cable.
 Students can transmit private/ confidential data/ work securely, for example, their
final dissertation.
 Wireless connection means that the students can use their devices in different
rooms/ sites/ outside/anywhere more freely//student devices can be portable.
 Wireless connection enables the students to bring multiple devices//cring their own
devices// change devices.

Characteristics of Server.

 Server processes the requests and authorises traffic.


 Firewall software on the server authorises traffic.

Definition of Repeater.

 An electronic device in a communication channel that restores the digital signal so it


can be transmitted over greater distances.
Characteristics of Switch.

 To allow two or more devices to communicate with one another.


 To connect individual devices to each other.
 To receive transmissions and forward them to their destination.

Characteristics of Bridge.

 To connect two LANs / segments with the same protocol.


 To transmit data between two networks with the same protocol.

Role and Function of Router.

 Receive packets from devices / internet.


 Find destination of packets using the IP address.
 Forward packets to the destination.
 Assign private IP addresses to devices on LAN.
 Store/update/maintain a routing table.
 Routing table: a database that keeps track of paths, like a map, and uses these to
determine which way to forward traffic
 Find most efficient path to destination.
 Maintain table of MAC and IP addresses.
 Provides the LAN with a public IP address.
 Network Address Translation (NAT): NAT is a technique used by routers to allow
multiple devices in a private local area network (LAN) to share a single public IP
address.

Definition of Wireless Network Interface Card (WNIC)

 Hardware component that allows a device to connect to a wireless network. Provides


a MAC address to the device to identify it on the wireless network.

Functions of WNIC.

 Provide interface to wireless network as an antenna.


 Receives analogue radio waves convert them to digital/binary.
 Checks incoming transmissions for correct MAC / IP address ignore transmissions
not intended for it.
 Encrypts / encodes the data // Decrypts / decodes the data.
 Takes digital/binary input and converts to analogue waves sends the radio waves via
the antenna.

Functions of Wireless Access Point.

 To allow connection of devices (to the central device) using radio signals / Wi-Fi
 To allow the central device to send / receive radio signals / Wi-Fi signals
 To allow wireless enabled devices to connect to a wired network
Characteristics of Ethernet.

 A protocol suite for data transmission over universal wired network connections.
 Uses Carrier Sense Multiple Access / Collision Detection (CSMA/CD).
 Data is transmitted in frames.
 Each frame has a source and destination (IP/MAC) address and error checking data
(so damaged frames can be resent).

How CSMA/CD Used in a Bus Network.

 CSMA/CD is a protocol used to detect and prevent collisions in a bus topology.


 Before transmitting, a device checks if the channel is busy.
 If the channel is busy the device waits // if the channel is free the data is sent
 because there is more than one computer connected to the same transmission
medium.
 Two workstations can start to transmit at the same time, causing a collision.
 If a collision is detected by the device, transmission is aborted / a jamming signal is
transmitted.
 both devices wait a (different) random time and then try again.

Tasks Performed by Devices to Deal with Collisions When Using CSMA/CD.

 To monitor the communication channel.


 To send data only when there is no data being transmitted / the line is quiet/idle.
 To detect a collision and then stop transmissions of further data //transmit a
jamming signal.
 To calculate a random wait time / back-off time, then retransmit the data after that
random wait time.
 Increase random time if multiple collisions.

How Collision is Managed Using CSMA/CD.

 Jamming signal is transmitted by the sending device.


 Transmission is aborted.
 The sending device waits a random time before trying to send data again if further
collisions occur the wait time is increased.

Drawbacks of CSMA/CD.

 Random time increased each time so can be infinite waiting.


 May be constant jamming signal so nothing ever sends.
 Certain nodes cannot be prioritised.
 High power consumption.
 Only suitable for short distance network // limited distance.
 Not scalable // more nodes means exponentially longer waiting times.
Describe the way in which a bus network uses Ethernet technology for
communication.

 Ethernet operates over cable.


 Destination and source nodes are identified by MAC addresses.
 Data to be transmitted is divided into frames containing source and destination
addresses and error checking data.
 All data is transmitted over the same cable.
 Using CSMA/CD.

Differences between Internet and World Wide Web.

 Internet is the infrastructure / global collection of networks.


 World Wide Web is the collection of interlinked, multimedia web pages/content,
webpages are written in HTML.
 The World Wide Web is accessed over the Internet.
 WWW uses HTTP protocol to transfer web pages, Internet uses IP protocol.

Melinda sends emails from her webmail account (email account accessed through
a website).

Explain whether Melinda is using the internet, or the World Wide Web (WWW), or
both.

 Uses both.
 Using internet because sending data on the infrastructure.
 Using WWW because accessing a website ( that is stored on a web server operated
by the webmail) that is part of the WWW.

How URL is Converted into Its Matching IP Address/How URL is converted into its
matching IP address.

 URL is parsed to obtain the Domain name.


 Domain name is sent to the nearest Domain Name Server (DNS).
 DNS holds a list of Domain names and matching IP addresses.
 DNS name resolver searches its database for the Domain name.
 If DNS does not find the Domain name, the request is forwarded to a higher level
DNS.
 If the domian name is found, the IP address is returned.
 If the domian name is not found, the request is passed to a higher level server.
 If the Domain name is finally not found, an error message is generated.

Definition of Bit streaming

 Continuous ordered flow of bits over a communication path.


Real-time v.s. On-demand Bit Streaming.

 Real-time is direct from source whereas on-demand is pre-recorded /downloaded


to view later.
 Real-time cannot be re-watched, on-demand can be paused, re-watched etc.
 Real-time plays continually, on-demand downloads sections/blocks and cannot play
until next section is downloaded.

How Video is Sent Using Bit Streaming.

 The data is compressed before transmitting.


 The video is transmitted continuously as a series of bits.
 The video is hosted on a media server.
 On download, the server sends the data to a buffer on the client computers // The
buffer stores the data from the server.
 The recipient/user’s software receives bit stream from the buffer.

Dominic sends his videos to his colleagues over the Internet using bit streaming.

Justify whether the video will be sent using real-time or on-demand bit streaming.

 On-demand.
 The video does not need to be broadcast live// the video is already recorded.
 Dominic’s colleagues will watch the video at a later date// at their convinience.

A user watches a video available on a website. The website uses on-demand bit
streaming.

Describe how it is possible to watch the video without it continually pausing.

 User needs high-speed broadband (connection).


 Data is streamed to a buffer (in computer).
 Buffering stops video pausing as bits streamed.
 As buffer is emptied, it fills up again so that viewing is continuous.
 Actual playback is (a few seconds) behind the time the data is received by computer.

Definition of Bit rate.

 The number of bits per second that can be transmitted via a digital network.

Characteristics of Bit rate.

 Higher bit rates allow for more data to be transmitted, resulting in higher quality
audio and visuals.
 The bit rate is limited by the bandwidth of the network connection.

Hardwares to Support Internet.


 Modems
 PSTN (Public Switched Telephone Network)
 Dedicated lines
 Cell phone network

Roles of PSTN.

 The PSTN consists of many different types of communication lines, therefore the
digital data may need to be converted into a different form/analogue signal.
 Data is transmitted in both directions at the same time // full duplex data
transmission
 Using a PSTN the communication passes through different switching centres/ISPs

Definition of Modem.

 A computer hardware device that converts data from a digital format into a format
suitable for an analogue transmission medium such as telephone or radio.

Definition of Dedicated lines.

 Dedicated lines: connection that is only used for that business/organisation.


 This facility must be purchased from a telephone company.
 This enables a dedicated line to carry phone calls, allow lots of staff to connect
simultaneously to their work computers from home and carry video transmission
without buffering and signal degradation.

Definition of Cell Phone Network.

 Cell phone network: send data to cell towers over mobile connection.
 The land mass is divided into areas called ‘cells’, hence the term ‘cell phone’. A
least one transceiver or base station serves one cell.

Purpose of IP (Internet Protocol) Address.

 IP address used to locate a device on a network.


 Each address is unique within the network.
 Allows a device/gateway/node to send data to the correct destination / a specific
device/gateway/node.

A laptop on a home network connects to the Internet through a router. The laptop
has an IP address.

 Give the reasons why the laptop has an IP address.


 To identify the laptop in the home network.
 To allow the router to send data to laptop from the Internet/ another device in the
home network.
Format of IPv4.

 Four groups of (denary or Hexadecimal integers.


 Numbers between 0 and 255.
 Each stored in 1 byte / 8 bits // the whole is stored in 32 bits / 4 bytes.
 Separated by full stops.

Characteristics of IP Address Subnet.

 IP address is made up of a network ID and a host ID.


 Each subnetwork has a different network ID.
 Every device in each subnetwork has a different host ID but the same network ID.
The host ID uniquely identifies the device within the subnetwork.

Why use Subnetting.

 To improve the security of the LAN.


 so that devices do not receive unintended data
 so that a compromised device does not expose the whole network
 so not all devices can access all segments
 To make the network management easier.
because faults can be isolated more efficiently
 because only one subnetwork may need taking down/changing while the rest of
the network can continue
 To make the network easier to expand // For better control of network growth.
 by allowing for greater range of IP addresses to be available
 To improve network performance.
 To reduce network congestion.
 by localising network communications // by dividing data between segments
 so that devices are not flooded with data because data sent between devices on
the same subnet stays within the subnet

Why Need IPv6?

 The number of IP addresses needed will exceed the number available using IPv4.

Format of IPv6.

 Eight groups of hexadecimal digits.


 Numbers between 0 and FFFF.
 Each stored in 2 bytes/16 bits // the whole stored in 128 bits / 16 bytes.
 Separated by colons.
 The first instance of multiple groups of zero can be replaced by a double colon.

Differences between IPv4 and IPv6


 The numbers in an IPv4 address are separated by full stops and in an IPv6 address
they are separated by colons.
 IPv4 has 4 groups of digits whilst IPv6 has 8 groups.
 IPv4 is usually represented in denary whilst IPv6 is usually represented in
hexadecimal.
 IPv4 groups are between 0 and 255 whilst IPv6 is between 0 and FFFF.
 IPv4 is 32 bits whilst IPv6 is 128 bits.

Definition of Static IP Address.

 An IP address that is fixed / doesn’t change each time a device re-joins a LAN /
network.

Definition of Dynamic IP Address.

 An IP address that may be refreshed / changed each time a device re-joins a LAN /
network.

Why Web Server Using a Static Instead of a Dynamic IP address.

 Static IP does not change whereas a dynamic IP address does change.


 The DNS does not need updating which might be delayed causing ‘address not
found’ errors.
 The webserver may be accessed directly using just the IP address // the IP address
is still held in cache memory.

Definition of Public IP Address.

 An IP address that is assigned to a device to allow direct access on the internet.

Characteristics of Public IP Address.

 Public is assigned by an ISP.


 Public IP addresses can be accessed by anyone using the Internet.
 Public is used to get internet service.
 Public IP addresses must be unique throughout the Internet.

Definition of Private IP address.

An IP address used for internal LAN communication only.

Definition of Private IP Address.

 Private is assigned by a router.


 Private IP addresses cannot be accessed by anyone using the Internet.
 Private is used to communicate within a network.
 Private can be duplicated in different networks // private addresses are unique only
within the (local) network.
Diiferences between Private and Public IP addresses.

 Security of Private IP address is the responsibility of the network management of the


LAN.
 Outsiders accessing the LAN over the Internet will have no knowledge of particular
private IP addresses for a recipient device – only the IP address of the router for this
LAN.
 The allocation and security of Public IP addresses will be managed by the ISP.
 If a user doesn’t want the recipient to know their public IP address then use VPN.
 VPN effectively hides the IP address from the provider of a resource.
 The disadvantage of using VPN is that it can be used for illegal access to a
resource.
 User living in another country may not be allowed legal access to media content
from another country. Using normal IP address would mean denied access so a
VPN is needed to disguise the true location of the user.

Joshua’s laptop is connected to the router on his home network. The laptop has a
private IP address. The router has both public and private IP addresses.

Explain the reasons why Joshua’s laptop has a private IP address only, but the
router has both a private and a public IP address.

 The router needs a public IP address so it can be identified on the Internet.


 The router needs a private IP address, so it can be identified on the home network.
 The router has a public and a private IP address so that it can route data between
the two networks (home and Internet).
 The laptop needs a private IP address so it can be identified on the home network//
so the router knows where to send data.
 The laptop does not have a public IP address because it does not connect directly to
the Internet.
 This is more secure because it hides the laptop from the outside world.
 All data from the Internet must be transmitted via the router.

Chapter 3: Hardware

3.1 Computers and their components

Definition of Embedded system.

 Microcontroller within a larger system that performs one specific task.

Structure of the embedded system.

 A processor
 Memory
 An input/output capability
Purpose of the embedded system.

 They are special-purpose, possibly performing only a single function.

Examples of the embedded system.

 Vending machine
 Washing machine

Characteristics of the embedded system.

 The embedded system is built into a larger system.


 Combination of hardware and software designed for a specific function.
 Must have a processor, memory and input/output capability.
 The system is not easily changed.

Advantages of the embedded system.

 Small in size therefore easy to fit into devices.


 Relatively low cost to make.
 Usually dedicated to one task, making for simple interfaces and often no requirement
of an operating system.
 Consume very little power.
 Very fast reaction to changing input.
 With mass production comes reliability.

Disadvantages of the embedded system.

 Difficult to upgrade devices to take advantage of new technology.


 Troubleshooting faults in the device becomes a specialist task.
 Cannot be easily adapted for another task.
 Due to the difficulty in upgrading and fault finding, devices are often just thrown
away rather than being repaired, which means it is wasteful.

Explain why televisions are embedded systems.

 The embedded system is built into the television.


 Combination of hardware and software designed for a specific function.
 The system is not easily changed by the television owner.

Principle operation of microphone.

 The microphone has a diaphragm ribbon.


 The incoming sound waves cause vibrations of the diaphragm.
 Causing a coil to move past a magnet (dynamic microphone)
 Changing the capacitance (condenser microphone)
 Deforms the crystal (crystal microphone)
 An electrical signal is produced.

Principle operation of resistive touchscreen.

 A resistive touchscreen has two layers with an air gap between the layers.
 When the user touches the screen, the top layer moves to touch the bottom layer.
 ...so the space between the conductive layers is removed, this creates a point of
contact and circuit is completed.
 The horizontal and vertical position of this point is calculated.

Benefits of resistive touchscreen.

 Cheaper to manufacture.
 Can use gloved finger or pen.

Drawbacks of resistive touchscreen.

 Poor visibility in sunlight.


 Do not allow multi-touch facility.

Principle operation of capcaitive touchscreen.

 A capacitive touch screen has several layers.


 The electrical charge changes where the user pressed.
 The point of contact is identified from the change in electrical field.
 The microprocessor calculates the coordinates of touch.

Benefits of capacitive touchscreen.

 Allows multi-touch facility.


 Good visibility in sunlight.
 Very durable surface.

Drawbacks of resistive touchscreen.

 Cannot use when wearing standard gloves.

Principle Operations of Speaker.

 Takes an electrical signal and translates it into physical vibrations to create sound
waves.
 The electric current passes through the coil and the current in the coil creates an
electromagnetic 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 electromagnet//changing
the direction of the current changes the direction of the polarity of the electromagnet.
 The electromagnet 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
 The amount of movement will determine the frequency and amplitude of the sound
wave produced

Principle Operations of Laser Printer.

 Printing drum given a positive charge. As this drum rotates, a laser beam scans
across it removing the positive charge in certain areas, leaving negatively charged
areas which exactly match the text/images of the page to be printed.
 Drum is coated with positively charged toner (powdered ink). Since the toner is
positively charged, it only sticks to the negatively charged parts of the drum.
 Negatively charged sheet of paper is rolled over the drum.
 Toner on the drum sticks to the paper to produce an exact copy of the page sent to
the printer
 To prevent the paper sticking to the drum, the electric charge on the paper is
removed after one rotation of the drum.
 The paper goes through a fuser (a set of heated rollers), where the heat melts the ink
so that it fixes permanently to the paper.
 A discharge lamp removes all the electric charge from the drum so it is ready to print
the next page.

Describe what is meant by CAD model.

 Computer Aided Design is a way to digitally create 2D drawings of 3D models of


real-world products before they are manufactured.

Principle Operations of 3D Printer.

 Additive manufacturing.
 Uses a digital 3D model or a Computer Aided Design (CAD) (file).
 The software splits the object into slices
 The data about the slices is sent to the printer
 Builds up the model one layer at a time starting from the bottom usingx, y and z
coordinates.
 A stepper motor moves the nozzle into position
 The nozzle extrudes the molten plastic
 The fan cools the layer
 The material is fused/cured together layer by layer.

Principle Operations of VR Headset.

 A headset can have one or two (LCD) displays/screens/lenses that output the image
to the user.
 The headset has speakers that output surround sound to give a realistic experience.
 The user's head movements are detected using a sensor. This sensor is a
gyroscope/accelerometer.
 The data is transmitted to a microprocessor that analyses the data to identify the
direction/speed of movement.
 Some headsets use digital cameras that record the user's eye movements for
analysis.

Type of sensors

 Temperature sensor
 Pressure sensor
 Sound sensor
 Infra-red sensor

Role of Control System.

 Convert electrical energy into a mechanical force and cause an action.

Importance of feedback.

 To ensure the system operates with given criteria/constraints.


 By enabling system output to affect subsequent system input.
 Thus allowing conditions to be automatically adjusted.

Describe two types or RAM.

 DRAM: A type of volatile computer memory that has memory cells paired with
transistors and capacitors and required periodic refreshing to maintain data integrity.
It is relatively cheap and has a higher memory capacity.
 SRAM: A type of volatile computer memory that stores data using flip-flops, allowing
for faster access and lower power consumption compared to DRAM.

Differences between SPAM and DRAM.

DRAM SRAM

 consists of a number of transistors and  uses flip-flops to hold each bit of


capacitors memory
 needs to be constantly refreshed  does not need to be constantly
 less expensive to manufacture than refreshed
SRAM  has a faster data access time than
 has higher memory capacity than SRAM DRAM
 main memory is constructed from DRAM  processor memory cache makes use of
 consumes more power than SRAM SRAM
under reasonable levels of access, as it if accessed at a high frequency, power
needs to be constantly refreshed usage can exceed that of DRAM

What is meant by ROM?


 Read-Only Memory: Non-volatile memory that cannot be written to but can be read
from any number of times.

Characteristics of ROM.

 Share the random-access or direct access properties of RAM.


 Used to store the start-up/boot-up instructure/BIOS (the program run immediately
when a system is switched on).

Benefits of using EEPROMs.

 No additional equipment is needed to change, enabled firmware updates by non-


technical users, which means that the contents of the firmware can be changed
easily.
 Can be erased and reprogrammed multiple times, so firmware can be updated and
can be erase a particular byte or the whole EEPROM.
 Possible to reprogram/update without removing the chip from the device.

Explain the difference between PROM, EPROM and EEPROM.

 PROM can be set once, EPROM and EEPROM can be overwritten multiple times.
 EPROM needs to be removed from device EEPROM can be erased in site.
 EPROM can be erased using UV light, EEPROM can be erased using voltage//is
flash storage.
 EPROM must be entirely erased before rewriting, EEPROM does not have to be
entirely erased before rewriting.

Differences between RAM and ROM.

RAM ROM

 temporary memory device  permanently memory device


 volatile memory  non-volatile memory device
 can be written to and read from  data stored cannot be altered
 used to store data, files, programs, part  sometimes used to store BIOS and
of OS currently in use other data needed at start up
 can be increased in size to improve
operational speed of a computer

Describe the purpose of RAM andROM in a 3D printer.

RAM:
 stores currently running parts of the 3D printer software.
 stores the data about the layers being printed//contents of buffer stores current
progress of printing.
 stores the data about the printer, e.g. plastic levels nozzle position.
ROM:
 stores the boot-up/start-up instruction for the 3D printer.

Characteristics of Primary Storage (Main Memory)

 Is the only one directly accessible to the CPU.

The self-checkout machines have primary storage. Give two reasons why the self-
checkout machine needs primary storage.

 To storage the files needed to boot the system.


 To store parts of the self-checkout machine operating system.
 To store the self-checkout machine software.
 To store the intermediate data/running total for items purchased.

Purpose of Buffer.

 To act as temporary storage//to store (downloaded) data before it is used by the


receiving device.
 To allow processes/devices to operate at different speeds//independently of each
other.

Examples of using Buffer.

 Printer buffer used when data is transferred from a computer to a printer.


 Video buffer when streaming videos.
 Keybroad buffer when performing data entry.

The computer uses a buffer when transmitting data to the VR headset.

Explain how a buffer is used when data is transmitted between the computer and
the VR headset.

 The buffer is used as a temporary store for data going to the headset.
 Data is transferred into buffer by computer.
 Data is retrieved from the buffer by the headset.
 When the buffer is empty/full, an interrupt is sent to the computer requesting more
data stopping further data being sent.
 When the headset has enough data/needs more data, an interrupt is sent by the
headset to the computer to stop sending data from buffer.

Characteristics of Secondary Storage.

 To store files/software long term.


 Does not lose the data when the device is powered down - it is non-volatile.

Principle Operation of Hard Disk.

 The hard disk has one or more disk.


 Each surface of the disk is capable of being magnetized.
 The disks are mounted on a central spindle.
 The entire mechanism id 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.
 Electronic circuits control the movement of the arm and hence the heads.
 The surface of the disk is divided into concentric tracks/circles and 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.

Advantages of Hard Disk.

 High capacities possible.


 Low cost per storage unit.
 Greater longevity.

Disadvantages of Hard Disk.

 Very susceptible to damage from physical shocks.

Principle Operations of SSD.

 No moving parts.
 Solid state memory is non-volatile.
 Makes use of blocks of NAND gates/NOR gates/integrated circuits.
 SSD controller manages the components.
 Uses a grid of columns and rows that has two transistors at each intersection/cell.
 One transistor is called a floating gate, the second transistor is called the control
gate.
 Floating gate: the type of gate that canretain electrons without power.
 Control gate: the type of gate that allows or stops current from passing through.
 Memory cells store voltages which can represent either a 0 or a 1.
 Essentially the movement of electrons is controlled to read/write.
 Not possible to overwrite existing data//it is necessary to first erase the old data
then write the new data in the same location.

Benefits of SSD compared to HDD.

 Are more reliable, because no moving parts to go wrong.


 Are considerably lighter which makes them suitable for labtops.
 Do not have to "get up to speed" before they work properly.
 Have a lower power consumption.
 Run much cooler.
 Are very thin because they have no moving parts.
 Faster in data access.

Principle Operation of Optical Disc.

 Drive motor 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 the disc to read/write.
 Surface of disc has a reflective metal layer/phase change metal alloy.
 Tracks on the disc have sequence of pits and lands/amorphous and crystalline state.
 Reflected light in then encoded as a bit pattern.

3.2 Logic gates and logic circuits

NOT Gate

 The output is 1 if the input is not 1.

AND Gate

 The output is 1 only when both inputs are 1.

OR Gate

 The output is 0 only when both inputs are 0.

NAND Gate

 The output is 0 only when both input are 1.

NOR Gate
 The output is 1 only when both input are 0.

XOR Gate

 The output is 1 only when both inputs are different.

Chapter 4: Processor Fundamental

4.1 CPU architecture

Definition of Stored program.

 Instructions and data are stored in the same memory space/in main memory.
 The new idea was that not only should the data be stored in memory, but that the
processing that data should also be stored in the same memory.

Definition of Control Unit.

 Part of processor which is used to control and manage the execution of instructions.

Characteristic of Control Unit.

 To coordinate/synchronise the actions of other components in the CPU.


 To send and receive control signals along the control bus.
 To manage the execution of instructions in sequence.
 To control the communication between the components of the CPU.

Definition of System Clocks.

 Produces timing signals on the control bus to ensure synchronisation takes place.

Characteristics of System Clocks.

 Synchronise operations by creating timing signals.


 To keep track of the date and time/timetamp files.
 To process operations in the correct order/sequence.

Definition of Register.

 A discrete memory location within the CPU designed to hold temporary data and
instructions to be/has been processed.

Characteristic of Register.

 Registers are placed close to the ALU to allow very short access times.
 Each register has limited storage capacity, typically 16, 32 or 64 bits.
Definition of Accumulator.

 Holds the interim result of a calculation before and after the execution of an
instruction by the ALU. It is located within the ALU.

Definition of Special Purpose Register.

 Designed to carry out a specific role.

Role of Special Purpose Register.

 Program Counter (PC): holds the address of the next instruction to be read from. The
contents are incremented/changed to the next address each cycle.
 Memory Address Register (MAR): stores the address of the memory location
currently being read from or written to, which is held in the PC. The data at this
address is then fetched and transferred to MDR.
 Current Instruction Register (CIR): holds the instruction currently being decoded and
executed. It holds the data received from the MDR.
 Memory Data Register (MDR): stores the data/instructions which has been read from
or is to be written to the address in the MAR. The instruction in it is copies to the
CIR.
 Index Register (IX): store a value that is added to an address to give another address.
 Status register (SR): store flags which can be referenced individually. Each flag is set
or cleared depending on the operation, e.g. overflow, underflow.

Role of Status Register.

 Carry flag (C) is set to 1 if there is a carry following an addition operation.


 Negative flag (N) is set to 1 if the result of a calculation yields a negative value.
 Overflow flag (V) is set to 1 if an arithmetic operation results in an overflow being
produced.
 Zero flag (Z) is set to 1 if the result of an arithmetic or logic operation is zero.

Special Purpose Register v.s. General Purpose Register.

 Special purpose registers hold the status of a program whereas general purpose
registers hold the temporary data while performing operations.
 Special purpose register are specialised for a specific use, whereas general purpose
registers are used for any purpose.
 General purpose registers can be used by most instructions, whereas special
purpose can only be used by certain instruction.

Definition of Immediate Access Store (IAS).

 Memory unit that can be directly accessed by the processor.

Characteristics of Immediate Access Store (IAS).


 IAS holds all the data/instructions/programs currently in use.
 IAS is volatile memory.
 IAS has fast access times.

Definition of Control Bus.

 Transmits signals between the control unit and the other components.
 Bi-directional.

Signals that control bus can transfer.

 Interrupt.
 Timing.
 Read.
 Write.

Explain how the CU, system block and control bus operate to transfer data
between the components of the computer system.

 The system block gives out timing signals, which are sent on the control bus, to
synchronise the other system components.
 The control unit initiates data transfer by generating signals that are sent on the
control bus to other components.

Definition of Address Bus.

 Carries address from the CPU to Main Memory and I/O devices.

Characteristics of Address Bus.

 Unidirectional.
 This can be to the memory controller to identify a location in memory which is to be
read from or written to or it can be to the I/O system to identify the source or
destination of the data.

Benefit of increasing address bus width.

 Increase in the number of directly addressed memory locations.

Definition of Data Bus.

 Carries data between the processor and memory/carries data that is currently being
processed.

Characteristics of Data Bus.

 Bi-directional.
 It might be carrying data from CPU to the memory or carrying data to the CPU.
 Another option is to carry data to or from an I/O device. Some computer systems will
only allow input to the CPU before data can be stored in memory. Other systems will
allow direct transfer to memory.

Describe the role of the address bus, the data bus and buffers in the process of
writing data to the optical disc reader/writer.

 A buffer temporarily hold data until it is ready to be transmitted to the device.


 The address of the data to be written to the device in RAM is carried on the address
bus.
 All data to be written to the device/buffer is carried on the data bus.

*Register Transfer Notation.

 item on the left = Destination of the data


 [ ] = content being moved
 [[ ]] = Content of the address being moved

Stages of F-E Cycle.

 The address in the PC is the address of the next item to be fetched.


 The address is copied into MAR using the address bus.
 MAR <- [ PC ]
 The instruction from that address moved/copied from main memory to MDR using
the data bus.
 MDR <- [[ MAR ]]
 The instruction is transferred fromMDR to CIR.
 CIR <- [ MDR ]
 The processor's instruction set is used to decode the instruction into opcode and
operand.
 The processor executes the instruction//the processor processes the data as
required.
 The address in PC is incremented ready for next loop.
 PC <- [ PC ] + 1

How Bus Width influence Computer Performace.

 The width of the data bus determines the number of bits that can be simultaneously
transferred.
 Increasing the width of the data bus increases number of bits/amount of data that
can be moved at one time (or equivalent).
 Hence improving processing speed as fewer transfers are needed.
 e.g. double the width of the data bus moves two times of data per block pulse.

How Number of Cores influence Computer Performace.

 Each core processes one instruction per block pulse.


 More/multiple cores mean that sequences of instructions can be split between them
and so more than one instruction is executed per block pulse//more sequences of
instructions can be run at the same time.
 More cores decreases the time taken to complete task.

What is Clock Speed?

 This refers to the number of electrical pulses that the clock inside the CPU can
produce every second, which is essentially the number of F-E cycles that a CPU can
carry out per second.
 This measuremnt is made in hertz and modern clock speeds are usually measured in
gigahertz.

How Clock Speed influence Computer Performace.

 The clock sends out a number of pulses in a given time interval (clock speed).
 Each instruction is executed on a clock pulse//one F-E cycle is run on each clock
pulse, so the clock speed dictated thenumber of instructions that can be run per
second.
 The faster the clock speed, the more instructions can be run per second.

A computer has a single 2.1 GHz CPU.

Describe how increasing the clock speed to 4 GHz can increase the performance
of the computer.

 The CPU can now perform nearly twice as many F-E cycles per second.
 Instead of 2.1 billion F-E cycles per second, the CPU can now perform 4 billion F-E
cycles per second.

How Cache Memory influence Computer Performace.

 Cache is fast access memory (close to the CPU).


 Cache stores frequently used instructions/data.
 More cache means more instructions/data can be transferred faster.
 Less swapping between RAM and cache.
 Prevents the CPU idling while waiting for data.

Ways to increase computer system performance.

 Increase the size of cache memory, so that the CPU can continue working without
waiting for data.
 Increase clock speed, so that more instructions are performed in a time period.
 Increase the number of cores, so that more instructions are performed in parallel.
 Increase bus width.
 Increase quantity of RAM, so allowing more applications to reside in memory at the
same time, saving disk access times.
Hardware Interrupts

 Printer is out of paper.


 Press a key on the key board.
 Move the mouse.
 Power supply failure.

Software Interrupts

 Buffer full.
 Division by zero//runtime error in a program.
 Stack overflow.
 Array index out of bounds.
 Two processes trying to access the same memory location//attempt to access an
invalid memory location.

How data is transmitted through a USB port?

 1 bit is transferred at a time.


 Can be synchronous or asynchronous.
 USB-3 is full duplex and earlier versions are half-duplex.

Benefits of Using USB Port.

 Fast data tranfer, useful when transferring large files such as video files.
 Automatic connection/plug-and-play, so usually there is no need to install separate
device drivers.
 USB is a standard adopted by many manufacturers, meaning all new computers will
be equipped with USB ports.
 Devices may be powered or charged through USB, so external devices may be
charged while working at the computer.

Benefits of HDMI.

 The current standard of mordern televisions and monitors.


 Allows for a very fast data transfer rate.
 Improved security (helps prevent piracy).
 Supports modern digital system.

Drawbacks of HDMI.

 Not a very robust connection (easy to break connection when simply moving device).
 Limited cable length to retain good signal.
 There are currently five cable/connection standards.

Benefits of VGA.

 Simpler technology.
 Only one standard available.
 It is easy to split the signal and connect a number of devices from one source.
 The connection is very secure.

Drawbacks of VGA.

 Old out-dated analogue technology.


 It is easy to bend the pins when making connections.
 The cables must be of a very high grade to ensure good undistorted signal.

4.2 Assembly language

Types of addressing mode.

 Immediate addressing: operand is the value to be used in the instruction.


 Direct addressing: operand is the address which holds the value to be used in the
instruction.
 Indirect addressing: the operand is an address that hold the address which has the
value to be used in the instruction.
 Index addressing: the contents of the index register (IX) are added to operand to give
the actual address that holds the value to be used in the instruction.
 Relative addressing: the address to be used is an offset number of locations away,
relative to the address of the current instruction.

Definition of instruction set.

 A list of all the commands that can be processed by a CPU.

Types of Instruction Set.

 Data movement
 Input and output
 Arithmetic operations
 Unconditional and conditional instructions
 Compare instructions

4.3 Bit manipulation

Actions of First Pass of two-pass assembler.

 reads the source code one line at a time.


 Remove anything not required, such as comments and white space.
 Adds labels to the symbol table.
 Check the opcode is in the instruction set.
 Expansion of macros.
Sequence of Steps of First Pass.

 The assembler scans theassembly language instructions in sequence.


 When it meets a symbolic address, it checks to see if it is already in the symbol table.
 If it is not, it adds it to the symbol table in the symbolis address column.
 If it is already in the symbol table, it checks to see if the absolute address is
known. If it is known, it is entered in the appropriate cell. If it is not known, it is
marked as unknown.
 Purpose of first pass: to create a symbol table.

Actions of Second Pass of two-pass assembler.

 Reads the source code one line at a time.


 Generates object code.
 including opcode and operand, from the symbol table generated in Pass 1 and
opcode/mnemonic lookup table.
 Save or execute the program.

Chapter 5: System Software

5.1 Operation System

Purpose of operation system.

 To hide the complexities of the hard ware from the user.


 To provide a platform for software to run.
 To procide a user interface.

Key management tasks carries out by operation system.

 File management.
 creates files/folders
 renames file/folders
 Security management.
 creates accounts/passwords
 provide/upgrade firewall/anti-malware
 Hardware management (input/ output/peripherals).
 receive data from input device//sends data to output device
 use of device drivers
 Process management.
 decides whichprocess to run next
 supports multitasking
 Memory management.
 controls the movement of data between RAM, processor, Virtual Memory, etc
 allocates memory to processes
File Management

 Provides file naming conventions.


 Contols access//implements access rights//implements password
protection//Makes file sharing possible.
 Specifies tasks that can be performed on a file (e.g. open, close, delete, copy,
create, move, etc.)
 Storage space is divided into file allocation units.
 Space is allocated to particular files.
 Maintains/creates directory structures.
 Specifies the logical method of file storage (e.g. FAT or NTFS).

Security Management

 Sets up user accounts.


 Checks usernames, passwords//Authentication.
 Implements access rights.
 Automatic backup.
 System restore/roll back (to previous stable state).

Hardware Management

 Installs device drivers to allow communication between peripherals and computer.


 Send data and receives data to and from peripheral such as to an output device and
from an input device.
 Handles buffers for transfer of data to ensure smooth transfer between devices that
transmit and receive at different speeds.
 Manages interrupts/signals from the device.

Process Management

 Manages the scheduling of processes//decides which order to run processes.


 Manages which resources the processes require such as allocating memory.
 Enables processes to share data.
 Prevents interference between processes//resolution of conflicts.
 Hanles the process queue.
 It allows multi-tasking/multi-processing by ensuring fair access, handling priorities
and handling interrupts.

Memory Management

 RAM is assigned into blocks.


 Dynamic allocation of RAM to programs/processes.
 Reclaims unused blocks of RAM.
 Prevents two programs/processes occupying the same area of RAM at the same
time.
 Moves data from secondary storage when needed//manages paging, segmentation
and virtual memory.

How Process Management support multitasking.

 Allows one process to be paused whilst another process can be actioned.


 Decides which process is to be run next.
 Switches between processes to allow them to share the use of the processor.
 Identification/description of scheduling.

How Memory Management support multitasking.

 Stores data from all currently running programs concurrently in RAM.


 Stops the data from overwriting each other in RAM/primary storage.
 DEcides which processes should be in main memory.
 Makes efficient use of memory.

Purpose of Utility Software.

 To help users to optimise the computer.


 E.g. making memory allocation more efficient, checking the system for faults.

Utility Software

 Disc formatter.
 to prepare a disk for first use//set up the file system
 to partition the disc
 to delete all the data from the disc
 Disc contents analysis/disk repair software.
 to identify and mark bad sectors
 to restore corrupted files
 to recover lost data (due to hardware failure)
 Virus checker.
 scans files stored on a computer system for malicious code
 scans files when they enter the system/memory stick inserted/download etc.
 sets up a schedule for virus-checking
 isolates/deletes viruses
 regularly updates the virus definitions
 Defragmentation software.
 over time saving and deleting of small files fragments in the disk
 the software makes individual files contiguous
 so access time to the files is improved
 because head movement is reduced
 File compression.
 to reduce the size of files
 saves storage and memory space
 reduces transmission time
 Back-up software.
 to make a copy of data at regular intervals
 so that if it si lost/corrupted it canbe retrieved

Explain how the disk formatter, disk contents analysis and disk repair utilities work
together.

 Disk contents analysis checks for errors/problems with the disk.


 Disk repair attempts to fix the errors.
 The disk for matter prepares the disk for initial use again.

5.2 Language Translators

Operations of Interpreter.

 Read each line then translates it and excutes it.


 Stops when an error is encountered//displays errors where it finds them.

Operations of Compiler.

 Attempts to translate the whole resource code before running it.


 Creates a separate error report at the end of the translation process.
 If translation successful/no errors creates an executable file.
 excutable file: a file produced by a compiler that can be run independent of
translator software and does not include the source code.

The need of executable file.

 Program can distributed without source code, so it cannot be edited/stolen.


 Users do not require the translator to run the program, so time is not spent
retranslating by user.

Benefits of Interpreter.

 Allows the developer to make real-time changes, so the program can be debugged
at each stage.
 The interpreter translates line-by-line and will stop when an error is found.
 The effect of any changes made by the developer can be seem immediately.
 The developer can test when incomplete, so small parts can be tested without having
to test the rest of the program.
 If one section does not work others can still be tested.
 Only one error is displayed at a time, so fewer errors to correct simultaneously and
no dependent errors.

Drawbacks of Interpreter.

 Source code is needed at run time.


 Translation software needed every time the program is run.
 Execution time increased.

Benefits of Compiler.

 Creates an executable file, os the code can be tested multiple times without having
to recompile.
 So repeated testing takes less time.
 The developer can debug multiple errors simultaneously.
 Source code does not have to be compiled each time it is run, does not need the
compiler to be present at run-time.

Drawbacks of Compiler.

 larger amounts of source code take time to compile.


 Slower to produce the object code than an interpreter.
 Code cannot bechanged without recompilation.
 The program will not run if there are any errors.
 Errors cannot be corrected in real-time.
 One error may result in other false errors being reported.
 Cannot easily test specific sections of the source code//cannot easily test
unfinished source code.

Why high-level language programs might be partially compiled and partially


interpreted.

 Partially compiled programs can be used on different platforms as they are


interpreted when run.
 Code is optimised for the CPU as machine code is generated at run time.
 Source code does not need recompiling so more efficient to run.

Machine Independent

 The program code can be translated to run on any processor/platform.


 Source code is translated into machine independent intermediate code not machine
dependent code.

How Java source code program is translated.

 Java uses a two-step translation process.


 Java code is partially interpreted - partially compiled.
 Code is translated first into intermediate code/"bytecode" using the Java compiler.
 The bytecode is finally interpreted by the Java Virtual Machine.

Definition of Program Library (Library Routines).


 Set of pre-written/pre-compiled/ pre-tested subroutines which can be called in
other programs.

How to use Program Library.

 Program libraries store pre-written functions and routines.


 The program library can be referenced/imported.
 The functions/routines can be called in her own program.

Benefits of Program Library.

 Saves programming/testing time as code does not have to be written/re-written


from scratch//code does not have to be tested.
 Code is already tested so it is more robust/likely to work.
 The programmer does noy need to maintain the library//library routines are updated
automatically.
 Can perform complex calculations that the programmer may be unable to do.
 Makes code more easily readable.

Drawbacks of Program Library.

 Compatibility issues: may not work with the other code/ may require changing
program for it to work.
 Not guaranteed thorough testing: may be unknown or unexpected bugs/virus.
 Libray routine may not meet exact needs, may give unexpected results//may need
editing.
 If library routine is changed, there may be unexpected results/errors.

Characteristics of Dynamic Link library (DLL).

 A collection of self-contained (shared library) programs that are already compiled.


 Linked to the main program during execution.
 Library file only loaded into memory when required at run time.
 A DLL file can be made available to several applications (at the same time).
 If DLL routine is updated the program thatuses it will run the update.

Benefits of DLL.

 Maintenance not needed to be done by the programmer because the DLL is separate
from program.
 The calling program does not need recompilation by the programmer when a DLL file
changes.
 Because the DLL file can be updated independently of the calling program, updates
will apply to all programs that use the DLL file.

Drawbacks of DLL.
 The executable code is not self-contained, the DLL files needed to be included at
run time.
 Appropriate linking software must be available at run-time to link/include/import the
DLL files.
 Unexpected changes to the DLL file/corrupted DL file could mean the program stops
working as expected.
 Malicious changes to the DLL file could install a virus on the user's computer/related
files could be corrupted.

Integrated Development Environment (IDE)

 For coding:
 Context-sensitive prompts: gives suggestions for code as the user types instead
of having to write/remember the code.
 Auto-correct: corrects spelling mistakes so that user has fewer errors to correct.
 For initial error detection:
 Dynamic syntax checks: highlight/underline/color syntax errors as the code is
entered.
 For presentation:
 Pretty-printing: colour code keywords so the user can identify any errors.
 Expand/collapse (code) block: the user can hide code that they are not currently
working on.
 For debugging:
 Single stepping: run the code one line at a time so the effects of each statement
can be seen.
 Breakpoints: stop the code at a specific line to check the current progress/value.

IDE summary

 When writing code:


 Enter code into an editor.
 Pretty-printing to identify key term.
 Context-sensitive prompts to help complete statements.
 Expand and collapse code blocks.
 Auto-complete to suggest what to type next.
 Auto-formatting to indent code blocks.
 Dynamic syntax checking.
 When testing code:
 Single stepping to run the code line by line.
 Breakpoints to stop the code at set points to check values
 Report window to see how variables change.

Common questions

Powered by AI

IPv4 addresses are represented in four groups of denary numbers separated by full stops, each ranging from 0 to 255, while IPv6 addresses are represented in eight groups of hexadecimal numbers separated by colons, each ranging from 0 to FFFF . IPv4 has a 32-bit structure, limiting the number of available addresses, whereas IPv6 uses a 128-bit structure, significantly expanding the available address space . These differences allow IPv6 to overcome the IP address exhaustion seen with IPv4, providing a nearly inexhaustible number of addresses .

Wireless connection allows students to use their devices freely across different locations such as rooms or outdoor areas, contributing to flexibility . The Wireless Network Interface Card (WNIC) facilitates this by enabling devices to connect to the network wirelessly, while also providing security through encryption and decryption of data . This setup ensures that students can securely transmit private data like final dissertations, even when moving between various locations .

Process management supports multitasking by scheduling processes, which involves determining their execution order and switching between them to ensure fair use of the CPU . This includes actioning one process while pausing another, allowing multiple processes to share processor time efficiently and preventing resource conflicts . It enables concurrent execution by handling priorities, interrupts, and maintaining a process queue, ensuring that multiple tasks run smoothly and effectively .

Network Address Translation (NAT) allows multiple devices in a local network to share a single public IP address, facilitating internet connectivity without exposing each device's private IP address . This shields individual devices from direct internet exposure, enhancing network security by mitigating the risk of external attacks . NAT also aids in the organization of network traffic by translating private network addresses to a single public address, thereby efficiently managing bandwidth and routing within the network .

The control unit manages and coordinates the execution of instructions by synchronizing the actions of other CPU components through control signals . It also manages the sequence of instructions by controlling component communication within the CPU . System clocks produce timing signals that ensure operations within the CPU occur in a synchronized manner, maintaining proper execution order . Together, these components ensure that instructions are executed in a timely and orderly fashion, maintaining system efficiency and reliability .

Subnetting improves network performance by localizing network communications and reducing congestion, as data meant for devices within the same subnet does not travel outside of it . It enhances network management by isolating faults more efficiently, as only one subnetwork may need to be modified without affecting the rest . Security is improved because subnetting prevents unauthorized access to certain parts of a network, reducing the risk of a compromised device affecting the entire network .

Routers contribute to efficient data transmission by storing, updating, and maintaining a routing table, which helps them find the most efficient path for forwarding packets to their destination . They support network security by providing Network Address Translation (NAT), allowing multiple devices in a private LAN to share a single public IP address, which hides their private IP addresses and reduces exposure to potential threats . Additionally, routers assign private IP addresses to devices on a LAN, enhancing isolation and security within the network .

Logic gates are the building blocks of digital circuits, performing basic logical functions essential for processing binary data. Each gate produces an output based on a set of rules: NOT gate inverts input, AND gate outputs one when both inputs are one, OR gate outputs zero when both inputs are zero, NAND and NOR gates are combinations of these operations . XOR gate outputs one when inputs differ . These gates synthesize complex operations necessary for computing processes by combining their simple functions into larger, more intricate circuits .

Dedicated lines are vital in business communication as they provide exclusive connectivity for organizations, ensuring reliable transmission of data without sharing bandwidth with other users . This facility, which must be purchased from a telephone company, enables efficient handling of tasks such as multiple staff connecting to work remotely and carrying out video transmissions without buffering issues, thus enhancing operational efficiency .

Utility software helps users optimize computer performance by performing maintenance tasks such as efficient memory allocation and system fault checking . Defragmentation software rearranges fragmented data on the disk so that files are stored contiguously, reducing access time by minimizing head movement . Virus-checking utilities scan files for malicious code, isolate or remove detected viruses, and regularly update virus definitions, securing the computer against malware threats .

You might also like