Computing AS Unit One
Computing AS Unit One
CHAPTER ONE
a) The Arithmetic & Logic Unit; ALU, Control Unit and Registers (Program Counter,
Accumulator, Memory Address Register, Memory Data Register, Current Instruction
Register). Buses: data, address and control: How this relates to assembly language
programs.
Buses
- Address Bus – carries address of memory location being read from or written to
- Data Bus – carries data that is being transmitted
- Control Bus – sends control signals from the control unit to synchronise components
Units
- Memory Unit – contains the registers, stores the OS and data and software that is currently in
use
- Control Unit – manages the execution of instructions by using control signals, it also
synchronises actions using the inbuilt clock
The program counter, MAR and CIR are used in this process.
c) The factors affecting the performance of the CPU, clock speed, number of cores, cache.
- Number of Cores – each core is a distinct processing unit. It has its own cache and they all
share a higher-level cache. Can work separately on different tasks or in combination on a
single task.
- Clock Speed – speed at which the CPU works (Hz).
- Cache Size – Ram is faster than alternate storage but still slower than the processor, which
can make it a bottleneck. Cache is built into the processor, reducing travel distance. Likely to
be used data is stored here. Very expensive and a larger cache runs slower.
Most desktop or laptop computers use CISC (complex instruction set computing) architecture made by
Intel or AMD. Smartphones and tablets use RISC (reduced instruction set computing) ARM architecture.
The key differences between the two CPUs are: Instructions - RISC has fewer instructions than CISC.
Some computer architectures allow additional processors to run in parallel with the main processor, or
an array processor to execute a single instruction on multiple pieces of data simultaneously.
Co-processors
Parallel Processing
Array Processors
- Array processors are also known as Single Instruction Multiple Data (SIMD), because they allow the
same calculation to be performed on multiple pieces of data at once This speeds up calculations,
because loading and saving data from RAM is slow (in comparison to the actual calculation). A 4-way
array processor will have 4 sets of registers (either physically or virtually), allowing 4 pieces of data to
be saved or loaded at once. Array processing is useful when there is a large amount of data being
input or output.
g) How different input and output devices can be applied as a solution of different problems.
- Input device – A peripheral used to provide data. It enters data into a system
o Mouse
o Webcam
o Touch screen
o Magnetic strip reader
- Output device – A device that allows information to be received from a system
o LCD Monitor
o Laser printer
o Speaker
o Projector
CD – Compact Disk
CD-RW – Compact disk rewritable (written and erased on the same disk multiple times)
- Volatile
- Stores parts of the OS and programs currently in use
- Can access any location to read from or write to
- Non-volatile
- Cannot be changed
- Most often embedded into the motherboard
- Includes important boot instructions for the computer
k) Virtual storage.
Cloud Storage
It is known as cloud storage from the users point of view. Realistically it is hosted on physical storage,
such as large magnetic or solid state server farms.
- Benefits
o It’s on the internet so it’s accessible anywhere
o You can’t lose it like you could a USB
o It is limitless if you pay (and relatively cheap)
- Drawbacks
o You can’t access it without a good internet connection
o You have to trust a third party with your data
CHAPTER TWO
a) The need for, function and purpose of operating systems.
Operating systems work as a shell around the hardware. This is the software that manages the
computer.
Kernel - the kernel is the very core of the operating system. It lays beneath the user interface and it
helps manage the system resources including memory management and scheduling. Running
applications use the kernel to send and receive data to and from devices.
b) Memory management (paging, segmentation, and virtual
memory).
Segmentation – jobs are split into different segments logically (not using
a fixed page size). The size of the segment depends on the size of each
part of the program. For example, parts of the same loop will be kept
together.
This allocates memory and reallocates when necessary (if something has been deleted etc.) to allow
separate processes to reside in memory and then run at the same time.
Memory management also protects processes and data from each other by blocking access to the memory
space of another program. (Make sure that a process cannot access and alter the data of another process).
Virtual Memory
Sometimes a job is too large to fit in the primary memory. (Or too many jobs need to be stored in the
primary memory). In this case the job may be split with some of it stored in primary memory and the rest in
virtual memory. This is possible because a job can be split into pages or segments. When the job is
processed, the operating system may have to constantly fetch pages/segments from virtual memory to store
them on RAM, ready to be processed by the CPU. This will slow down the processing of this job. This is called
disk thrashing.
c) Interrupts, the role of interrupts and Interrupt Service Routines (ISR), role within the fetch
decode execute cycle.
Sometimes an interrupt is raised (e.g. by the hardware or by an application). An interrupt tells the CPU
to stop working on the current job to process a specific set of instructions called an Interrupt Service
Routine. Example of interrupts generated by external devices: printer ran out of paper; a device has
been disconnected; computer battery is running low and the computers need to go in “hibernation
mode”.
At the end of each iteration of the Fetch- Decode-Execute cycle, the processor check to see if they are
any interrupts. When an interrupt is raised, the OS checks if its priority is greater than the priority of
the job or Interrupt Service Routine currently being processed. If it is:
- The current job is stopped and the registers of the current job are being saved into a stack
- The Interrupt Service Routine can then be processed (The PC counter will point to where the ISR
starts in memory)
- When the Interrupt Service Routine has been fully processed, the previous job can be resumed.
All the registers which have been saved in the stack will be retrieved from the stack.
d) Scheduling: round robin, first come first served, multi-level feedback queues, shortest job
first and shortest remaining time.
The OS controls how the CPU is used and in what order jobs are being processed. Multi-tasking operating
systems allocate short amount of CPU time to different programs to give the illusion that the CPU is multi-
tasking. The scheduler constantly maintains an up-to-date list of jobs that need to be completed by the CPU.
This list is called the job queue.
Round Robin - Each task is given a small "time slice" - perhaps of a few milliseconds. After the time is
up, the processor moves on to the next task.
Shortest Time Remaining - The job with the least time remaining is processed first. This is similar to
shortest job first, although it is considered slightly superior because long jobs will slowly "bubble up"
until they have the shortest time remaining.
Multi-Level Feedback Queues - A number of queues are set up. If a task actively uses large amounts
of processor time, it is placed in a lower priority queue, until it reaches the "base" queue, which
operates in a round robin fashion.
First Come First Served - The first job to be ready for processing is processed.
Shortest Job First - The shortest job is processed first. Although this leads to lots of jobs being done
quickly, it can lead to some longer jobs never getting processed.
- Distributed Operating System – this can control and coordinate many computers so they
collaborate on a single task, presenting to the user at the end as if they were a single system.
- Embedded Operating System – specifically designed for a single task with efficiency in mind
(e.g washing machines, cars)
- Multi-tasking – several programs may be running at once. Separate cores could be used but
there may be more programs than cores. Because of the high speeds of processors they can
complete many tasks quickly and move on, using scheduling.
- Multi-user – this allows more than one person to share a computer’s resources at the same time
(simultaneously) . Different log in accounts does not equal multi-user.
- Real Time Operating Systems – these are designed to carry out actions in a guaranteed
amount of time. Often the response time is within a small fraction of a second – emergency
systems use real time operating systems.
f) BIOS.
The BIOS runs when the system is booted, before the operating system. The BIOS runs the POST to
check that all the hardware is responding. The BIOS access some settings which can be changed, such
as which drives to use when looking for the operating system. The BIOS starts the operating system.
g) Device drivers.
Device drivers are software used to enable an operating system to communicate with specific
hardware devices – e.g. printers/keyboards.
h) Virtual machines, any instance where software is used to take on the function of a
machine including executing intermediate code or running an operating system within
another.
A virtual machine is a piece of software that can translate intermediate code into machine code. High
level code is precompiled into intermediate code that can then be run on ant computer where the
virtual machine is installed.
Application software are programs that allow the computer to be used to solve particular problems or
perform particular tasks for the end user.
In the exam, you must use generic terms and not proprietary names. For example, use “Word
processing software” as opposed to Microsoft Word, or “Database software” instead of Microsoft
Access.
j) Utilities.
Defragmentation: over time, lots of files can be split up and saved in different areas. Disk
defragmentation groups all the parts of a file so they can be read in one go.
File compression: these programs reduce the amount of space data takes up in storage. Algorithms
make use of the fact data is often repeated (lossy/lossless)
File managers: allow files and directories to be moved, copied, deleted, and renamed.
Closed source – When the compiled machine code has been sold commercially. Unlikely that that
company will provide the source code as people can change it and sell it as their own.
Open source – Where the source code is publicly available so users can modify it to suit their needs.
Anybody can contribute to the development and troubleshooting of open source code.
Open source code is free but can lack the professional finish of closed source codes. Hackers can also
access and edit open source codes for bad.
This is all the coding stuff. It’s all relatively simple – iteration, recursion etc. comes under this.
n) Assembly language (including following and writing simple programs with Little Man
Computer).
Opcodes - the portion of a machine language instruction that specifies the operation to be performed.
Instruction set – defines the valid instructions that a machine may execute.
Term Definition
Serial File A type of file that contains information which is recorded in the order that it
occurs. It is not sorted, and therefore difficult to search it effectively.
Sequential File A file of records stored in chronological order based on account number or
some other identifying data.
Indexing Using an additional table with a field in one column and its location in the
other. It is designed to speed up data retrieval.
Hashing The transformation of a string of characters into usually a shorter fixed-length
value or key that represents the original string. The key field (username) of a
record can be transformed by a hashing algorithm to generate a disk address
used to locate a record.
Relational A database with more than one table. In a relational database, tables are
Database linked using relationships:
- One to one
- One to many
- Many to many
Primary Key A unique identifier within a table. Each record will have a different one, used
for locating a certain thing – e.g. a number plate for a car.
Secondary Key A field used for indexing data. It is used to sort data in a different order to the
primary key. There can be more than one secondary key per table.
Foreign Key Used to link tables. A foreign key in one table is a primary key in another.
The main Protocol that governs the Internet is the IP protocol: Internet Protocol. It is based on the use of
IP addresses and on packet switching. The Internet then uses several additional protocols for different
uses, the main ones being:
As the Internet is designed to connect many networks (WAN/LAN) and devices together. Each network
and each device may use a different configuration. It is required for all of these to agree on set
standards to be able to communicate.
c) Internet structure: The TCP/IP Stack, DNS Protocol layering, LANs and WANs, Packet and
circuit switching.
IP Address – every computer connected to the internet has an IP Address. We are currently on IPv4,
which uses 4 bytes, but we are transitioning to IPv6 which uses 16 bytes.
MAC Address – the computer’s hardware address, often assigned by the manufacturer.
DNS – a domain name server associates domain names with their IP addresses. They can be easily
hacked due to their openness which means people can redirect you to a different website when you
type in a domain name.
Data Packet – information does not follow a fixed path. It can change routes mid conversation. Data is
split into packets and sent, and then is reassembled on arrival. Each packet has the IP Address of
where it is coming and where it is going. Routers help keep track of the route of the packet and sends
them on the shortest route. TCP manages the sending and receiving of packets and makes sure all of
the packets are there. If a packet is missing it will request it. TCP will only complete the download
when all of the packets are there.
Circuit Switching - when using circuit switching, a path between the two computers is established at the
start, and then all the packets are sent in order. The
advantage of this is that the message arrives in the right
order, and the packets do not need sorting. However, it makes
inefficient use of the network, as the paths the packets are sent
over cannot be reused until the packets have finished being
transmitted, and the message is very easy to intercept.
- Application layer – collects data, validates it and packages it. It also receives data
and converts it into the required form (either readable to humans or machines)
- Network layer – concerned with the layout of the network, what nodes there are,
what topology is being used and how to best get the data efficiently from source to
destination
- Physical layer – provides a transport medium to conduct the messages as the network
layer conducts it
Client-server - denoting a computer system in which a central server provides data to a number of
networked workstations.
Peer-to-peer - a peer-to-peer network is created when two or more PCs are connected and share
resources without going through a separate server computer.
HTML
Learners are expected to have an awareness of the following tags. Any other tags used will be
introduced in the question.
<title>
<body>
<div>
<form>
<input> where the input is a textbox (i.e. has the attribute type="text" and another attribute name to
identify it) or a submit button (i.e. has the attribute type="submit")
<p>
<li>
<ol>
<ul>
<script>
CSS
Learners are expected to be able to use CSS directly inside elements using the style attribute
<h1 style="color:blue;">
and external style sheets. In the style sheets they should be able to use CSS to define the styling of
elements:
h1{ color:blue; }
classes
and Identifiers
background-color border-color border-style border-width color with named and hex colours font-
family font-size height width
JavaScript
Learners are expected to be able to follow and write basic JavaScript code. It is hoped they will get
practical experience of JavaScript in their study of the course. They will not be expected to commit
exact details of syntax to memory. Questions in the exam will not penalise learners for minor
inaccuracies in syntax. Learners will be expected to be familiar with the JavaScript equivalents of the
structures listed in the pseudocode section (with the exception of input and output (see below). They will
not be expected to use JavaScript for Object Oriented programming or file handling. Questions will
not be asked in JavaScript where something is passed to a subroutine by value or reference is
relevant.
Input
Input will be taken in by reading values from a form. NB learners will not be expected to memorise the
method for doing this as focus will be on what they do with that input once it is received.
Output
The Internet can be slow at times, especially in its early days relying on early 56Kbps modems as
opposed to the 3-4 Mbps average bandwidth. Therefore, if you could compress the files that were
being sent on the Internet, then you sent smaller files, and smaller file sizes means faster downloads. It
also frees up the network and avoids clogging up the bandwidth.
a) Primitive data types, integer, real/floating point, character, string and Boolean.
24/07/2007
Date/Time A date or date and time
31/10/2007 10:51:36
Each number between 0 and 255 can be coded in 1 Byte (=8bits) using a unique combination of 0 and
1. For instance: The number 97 can be converted into binary code:
97 = 64 + 32 + 1
128 64 32 16 8 4 2 1
0 1 1 0 0 0 0 1
c) Use of sign and magnitude and two’s complement to represent negative numbers in
binary.
Addition
Subtraction
e) Represent positive integers in hexadecimal.
g) Positive and negative real numbers using normalised floating point representation.
In floating point representation, you have both a mantissa and an exponent. The larger the mantissa,
the more accurate a number can be. The larger the exponent, the bigger a number can be. The
exponent expresses how many jumps away from 1 the negative number in the mantissa is.
h) How character sets (ASCII and UNICODE) are used to represent text.
- ASCII (American Standard Code for Information Interchange) is the most common format for
text files in computers and on the Internet. In an ASCII file, each alphabetic, numeric, or special
character is represented with a 7-bit binary number (a string of seven 0s or 1s). 128 possible
characters are defined. However, extended ASCII uses 8 bits for each character.
- Unicode is a character set that uses at least 2 bytes for each character. Whilst this may be
unnecessary for western and European languages, eastern languages such as mandarin
requires a lot more characters in order to be able display the language.
Term Definition
Array A data structure that contains a group of elements (which are typically
all of the same data type) stored under a single identifier. It can store
multiple values.
Element Each value is an element.
Index A number used to access a single element from the array.
Bounds The number of items in the array (could be rows and columns).
Lists A list is similar to an array but is flexible in size. Elements can be
appended or removed.
Tuples A tuple is exactly like a list but it cannot be changed, so you can’t
append or remove values. They are fixed values, such as days of the
week.
Stack:
Queue:
k) Define problems
using Boolean logic.
l) Manipulate Boolean expressions, including the use of Karnaugh maps to simplify Boolean
expressions.
m) Use logic gate diagrams and truth tables.
CHAPTER FIVE
a) The Data Protection Act 1998.
The DPA sets out the requirements for the control or storage of individual’s personal data.
This act was introduced to protect the investment of time, money, and effort by the people who create
original pieces of work. This includes books, music, phone apps, films etc. They all invest a great deal
of time and their work belongs to them, so this act aims to:
The increase of criminal offenses on the internet prompted an act of parliament providing authorities
such as the police to intercept communications. They can:
There was concern about the act being used to monitor non-criminal activities, such as determining
whether or not a family lived in school catchment area.
e) The individual (moral), social (ethical) and cultural opportunities and risks of digital
technology: Computers in the workforce, Automated decision making, Artificial
intelligence, Environmental effects, Censorship and the Internet, ...
When responding a discuss question about the impact of Computer on our lives consider the following
technologies
- Treating injuries and diseases (e.g. Connected Devices for monitoring heartbeats, bood
pressure, sleep patterns...), 3D Printing, Robotics, Virtual Reality Glasses...)
- Leisure Activities (Virtual Reality, mobile devives, Addiction (Candy Crush...)...)
- Environment (Sharing Economy, 3D Printing!, Energy Monitoring devices, Cloud Computing
(Server farms)...)
- Home (Connected devices, Connected CCTV cameras, Domotic, Robotic
- Education (Mobile Devices, MOOC, Augmented Reality, Cloud Computing...)
- Freedom of speech (Social Networks, Crowd Funding)
Monitoring behaviour
Some people feel like the constant CCTV cameras feel like ‘Big Brother’, but many understand that it is
for the greater good. It is possible to convict a person of a crime from CCTV footage, making the
world a safer place. Technology is also useful for criminal’s curfews – ankle tags etc. Young drivers can
also reduce the cost of insurance by using a black box to monitor their driving. Some people also find
it unfair that their social lives are now linked to their work lives since employers tend to search up
Facebook and Twitter profiles.
When you use a product, that company can gain data on you. They can then share this data with
partner companies – such as getting ads from similar products to those you have already bought.
Data mining is an automated process that searches for patterns in large data sets in order to predict
events. It can be used for science, engineering and business.