Computer Science Revision
Computer Science Revision
Computer Science Revision
3 hr
Revision Topic Areas
• Block 1 - Programming
• Block 2 - Data Representation
• Block 3 - Compression and Encryption
• Block 4 - Computers and Assembly Language
• Block 5 - Networking and HTML
• Block 6 - Databases and SQL
• Block 7 - Issues and Impact
• Block 8 - Microcontrollers
• Block 9 - Computational Models + Emerging Trends
• Block 10 - Computational Thinking
Block 1
Programming
Programming Elements
• Escape Squence • For loops
• Operators • While loops
• Errors • Functions
• Data types • File IO
• Variables
• Relational operators
• If … then … else
• Arrays
Sequence, selection and iteration
These are the fundamental building blocks of any program
and any true programing language will contain all of these.
Most common
Logic Questions
Logic Answer
Validation
presence , range , length , type, look-up
Type of validation Description Example
Data Represenation
What is a binary number?
• A binary number is made up of just 2 digits
and is known as base 2.
01
• Each position is 2 times more than the other.
1x8
1101 1x4 8 + 4 + 1 = 13
0x2
1x1
18
Adding binary
There are 6 addition questions that you need
to complete. Complete them independently
00001011 00010011
+ 00001101 + 00000111
What is Overflow?
If there were only 8 bits to store numbers this
would mean that the 9th bit would be lost. This is
called overflow and this leaves an incorrect
value.
ASCII
What is a Hexadecimal number?
• A hexadecimal number is made up of 16 digits and
is known as base 16.
0123456789ABCDEF
How hexidecimal is laid out
Number system Output (Bytes)
Denary 15
Binary 0000 1111
Hexadecimal 0F
A C
AC = (10 X 16) + (12 X 1) = 160 + 12 = 172
Two’s complement
Two’s complement is the method computers use to represent signed
numbers. The most significant bit is the sign bit:
• 0 = positive value
• 1 = negative value.
Read page 123-124 of the GCSE text book to gain a deeper understanding of
this and overflow within the number systems
The Size of Things
Hard Drive Capacity Comparison But also think about GHZ Giga
1 Kilobyte (KB) A kilobyte is 1024 Bytes Hertz for clock speed, think CPU
1 Megabyte (MB) A Megabyte is 1 048 576 processing speed!
Bytes or easier to remember
as 1024 Kilobytes.
1 Gigabyte (GB) A Gigabyte Is 1024 Mega bits per second for speed
Megabytes like your broadband connection
1 Terabyte (TB) A Terabyte Is 1024 Gigabytes at home.
What type of data can Lossless data compression works best on files containing strings
be compressed using a of repeating data, whether the repeating data is characters,
lossless compression strings of letters or words.
algorithm?
Describe how a losslessA lossless RLE algorithm is a simple compression algorithm in
RLE algorithm works. which runs of data (sequences in which the same data value
occurs in many consecutive data elements) are stored as a
single data value and count, rather than as the original run. So,
for example, FFFFFFFFFFFF would be represented as 12F.
Some lossless In a lookup table, a number is assigned to repeated words.
compression algorithms Then when the compression algorithm is run, the words listed
use a lookup table. in the lookup table are replaced in the file by a number. A
Explain what the considerable size reduction can be achieved by using a lookup
lookup table is for. table and the original file can still be reconstructed without any
loss of quality.
Lossy and Lossless
Explain how lossy Lossy data compression permanently discards some of the original
compression differs data. It exploits the fact that human beings cannot detect subtle
from lossless differences in sounds and colours. Key data is retained and less
compression. important data is discarded when lossy data compression takes
place.
Explain why lossy The data in photographs and audio files contains differences too
compression is usually subtle for the human eye or ear to detect. Therefore, lossy
used for media files. compression can drastically decrease the file size by discarding some
of the data, while the quality is still acceptable to human beings.
Outline the process of The lossy compression algorithm analyses the data within the audio
compressing an audio signal. The lossy compression algorithm retains the key data and the
file using a lossy removes the non-audible or less audible components of the signal.
compression
algorithm.
Outline the process of The lossy compression algorithm divides the bitmap image into
compressing a bitmap blocks of 8x8 pixels. It then analyses the data within the 8x8 pixel
image using a lossy block and ranks it according to its importance to visual perception.
compression The lossy compression algorithm retains the key data and discards
algorithm. the less important data. It achieves this by replacing the colour
values of some of the pixels.
Misconceptions
Bandwidth (capacity) – “ I used a total of 15GB this
month”
How much capacity is used
An important element to the public key system is that the public and private
keys are related in such a way that only the public key can be used to
encrypt messages and only the corresponding private key can be used to
decrypt them. Moreover, it is virtually impossible to deduce the private key if
you know the public key.
Types
The only difficulty with public-key systems is that you need to know the
• RSA
recipient's public key to encrypt a message for him or her. What's needed,
therefore, is a global registry of public keys, which is one of the promises of • Diffie-
the new LDAP technology.
Hellman
Public key cryptography was invented in 1976 by Whitfield Diffie and Martin
Hellman. For this reason, it is sometime called Diffie-Hellman encryption. It is
also called asymmetric encryption because it uses two keys instead of one
key (symmetric encryption).
Uses of Encryption
Users of encryption What they use encryption for
Businesses to protect corporate secrets/sensitive information
to protect customer data against hacking
to protect against accidental data leaks/losses
Individuals to protect personal information
to guard against identity theft
Governments to secure classified/sensitive information and to protect it
against hacking
E-traders to send and receive confidential information such as
customers’ credit card details
to protect customer data against hacking
to protect against accidental leaks/losses
The military to secure classified information/state secrets
to protect against hacking
Block 4
Storage
Feedback
Types of Bus
Function Type of bus
Sends and receives signals that Control bus
control the CPU and other parts
of the computer system
Carries the address of memory Address bus
locations used to store data and
program instructions
CPU Transfers the binary data around Data bus
the computer
Input / output
Data, control and address bus
devices
A persistent data storage area for data and program Secondary storage,
instructions e.g. hard disk drive,
solid state memory
To provide connections to the input and output peripherals Sound card, network
such as printers, mouse, keyboard, touch screen, speakers, card and graphics card
networks, and so on
Non Volatile and Volatile Memory
Network Topologies
Star, Token Ring, Mesh, Bus
What can we do with a network?
• What devices would they want to connect (laptops,
PCs, games consoles, phones)?
• How would they connect them (wired, wireless or mix)?
• How would they access the internet?
• What speeds would they want for their connections?
• Where abouts in the house would they put the router,
the printer, the NAS drive and any other devices?
• What streaming services would they provide across the
network?
• How would they protect their network from hackers
and viruses?
Research
Research the benefits and drawback of these two options, considering
security, performance, control, cost and expertise.
This is sort of question pupils may have to answer in the written paper.
Block 6
We can use this to search a database. It will return all of the relevant records
Query which match the criteria.
There are many different types of these. For example, date, time, integer, real,
Data Type string etc...
This is a field which is used to uniquely identify each record in the database. This
Primary Key (Key Field) is necessary in case two records in the database have the same name.
SQL SELECT
Structure:
SELECT column_name,column_name
FROM table_name
WHERE column_name operator value
ORDER BY column_name
Example:
SELECT firstName, surname
FROM Contacts
WHERE surname = ‘Lewington’ AND surname = ‘Walton’
ORDER BY surname asc
Structure:
UPDATE games
SET city='Paris'
WHERE yr = 2012;
Block 7
Living in a Services are rolled out first in areas with the greatest population, where
rural area the infrastructure is better. This is cost-effective for the companies
because they get a greater return on their investment more quickly.
In rural areas houses can be quite far apart, so services to these areas are
reduced. Companies may be less willing to invest as it is not as cost-
effective. Sometimes people living in rural areas need to pay to get the
service installed.
Weak People with weak literacy skills may miss out on products and services
literacy because they cannot read about what is available.
skills
Digital Divide
Have a People who have a disability might not be able to operate products that
disability are aimed at the mass market, so these people have to wait until
products and services are adapted to their needs, e.g. people who are
hearing impaired have to wait for TV programmes with subtitles.
From an People from ethnic minorities may have the same problem as people who
ethnic have weak literacy skills. They might be isolated from mainstream society
minority and unaware of what is available. They might also have different cultural
values from the mainstream, which means that they do not want the
products or services that are available.
Elderly Older people might think that the technology is too advanced for them
and they will never be able to learn how to use it. This will deter them
from buying into new technology, e.g. older people might prefer writing
letters as it is what they are used to, and they may not want to switch to
email.
Computers and health
• monitoring the impact of new drugs,
• medical record keeping (may include apps IOS health app)
• robotic surgery
• life support and monitoring systems
• diagnosis by expert systems
• MRI scanning
• 3D printing of body parts
• web-connected biometric devices
• health promotion campaigns
Videos
VLE – Virtual Learning Environments
https://www.youtube.com/watch?v=QdP4_7xXXVw
Cloud Computing
https://www.youtube.com/watch?v=DGDtujmOBKc
VR
https://www.youtube.com/watch?v=i4Zt3JZejbg
Environment Question
AJ’s is a fast-food company with five outlets. The outlets are
connected via the Internet to the head office. Data from each outlet is
transmitted to the head office computers at the end of each day.
Microcontrollers
Microcontrollers
Characteristics
• Usually embedded in other devices
• Dedicated to one task
• Usually low-powered/battery-operated devices
• Use actuators and sensors to function
What is an actuator? What are the role of sensors
• An actuator is used to in
• Aa sensor
microcontroller?
is a converter that
move or control output measures a physical quantity
• Usually a type of motor for and converts it to a signal.
moving or controlling a • This signal is used by the
mechanism or system. microcontroller to make a
decision.
Questions
Answers
Block 9
Characteristics
Systems under study are non-linear.
Uses realistic/actual data.
Used by adjusting parameters and studying the outcomes.
Usually implemented in computer simulations.
Computational Thinking
Sort Algorithms
• Bubble sort
• Quick sort
• Heap sort
• Selection sort
• Insertion sort
• Merge sort
Depth and Breadth Search Algorithms
In some situations it is necessary to alter the order of a search in
order to make the search more efficient. To explore this we need
to understand data trees and nodes.
Other Algorithms
• Minumum
• Maximum
• Mean
• Count