0% found this document useful (0 votes)
82 views

Paper 1 - Summary Revision Notes - OL CS

Uploaded by

jana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Paper 1 - Summary Revision Notes - OL CS

Uploaded by

jana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

CS

Paper 1 –
Theory –
Summary
Revision
Notes
Gamal Orphy
OL CS Gamal Orphy

Table of Contents
Section 1: Data Representation ...................................................................... - 2 -
Section 2: Communication and Internet Technologies ............................... - 4 -
Section 3: Logic Gates and Logic Circuits ................................................... - 11 -
Section 4: Operating Systems and Computer Architecture ..................... - 15 -
Section 5: Input and Output devices ........................................................... - 21 -
Section 6: Memory and Data Storage.......................................................... - 32 -
Section 7: High and Low-Level Languages ................................................. - 40 -
Section 8: Security and Ethics ....................................................................... - 43 -

-1-
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 1: Data Representation


The Denary System
¨ The DENARY SYSTEM is a base-10 system
¨ the denary system uses 0 to 9 values
¨ the denary system has units that increase by 10
The Binary System
¨ The BINARY SYSTEM is a base-2 system
¨ Thus, only the two ‘values’ 0 and 1 can be used in this system to represent each digit.
¨ A binary system has units that increase by 2

Measurement of the size of computer memories


¨ A binary digit is commonly referred to as a BIT.
¨ 4 bits referred to as a NIBBLE.
¨ 8 bits are usually referred to as a BYTE.
Name of memory size Number of bytes Equivalent denary value
1 Kilobyte 210 1024
1 Megabyte 220 1048576
1 Gigabyte 230 1073741824
1 Terabyte 240 1099511627776
1 Petabyte 250 1125899906842624

The Hexadecimal System


¨ Because it is a system based on 16 different digits
¨ the numbers 0 to 9 and
¨ the letters A to F are used to represent each hexadecimal (hex) digit. (A = 10, B = 11, C =
12, D = 13, E = 14 and F = 15.)
Use of the hexadecimal system
1. Memory dumps
2. HyperText Mark-up Language (HTML) Colours
For example:
¨ # FF 00 00 represents primary colour red
¨ # 00 FF 00 represents primary colour green
¨ # 00 00 FF represents primary colour blue

-2-
Paper 1 Theory Summary
OL CS Gamal Orphy

3. Media Access Control (MAC)


¨ The MAC address refers to the network interface card (NIC) which is part of the device.

NN:NN:NN:DD:DD:DD

¨ where the first half (NN – NN – NN) is the identity number of the manufacturer of the
device and the second half (DD – DD – DD) is the serial number of the device.

4. ASCII Codes (ex. Web addresses)


¨ Each character used on a keyboard has what is known as an ASCII CODE (AMERICAN
STANDARD CODE FOR INFORMATION INTERCHANGE).
¨ These codes can be represented using hexadecimal values using 2 characters (1 byte).

5. Assembly code and machine code

Difference between the 3 number systems:


¨ A binary number system is a base-2 system
¨ A denary number system is a base-10 system
¨ A hexadecimal number system is a base 16 system
¨
¨ A binary number system uses 0 and 1 values
¨ A denary number system uses 0 to 9 values
¨ A hexadecimal number system uses 0 to 9 values and A to F characters
¨
¨ A binary number system has units/ placeholders/column headings that increase by the
power of 2
¨ A denary number system has units/ placeholders/column headings that increase by the
power of 10
¨ A hexadecimal number system has units/ placeholders/column headings that increase by
the power of 16
¨
¨ Binary has more digit for a value than Denary// Denary has less digits for the same value
than binary// Hexadecimal has less digits for the same value than binary and denary.

-3-
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 2: Communication and Internet


Technologies
Data Transmission
Simplex Data Transmission:
¨ is in one direction only (i.e. from sender to receiver).
¨ Example: data being sent from a computer to a printer.

Half-Duplex Data Transmission:


¨ is in both directions but not at the same time (i.e. data can be sent from ‘A’ to ‘B’ or from
‘B’ to ‘A’ along the same line, but not at the same time).
¨ Example: a walkie-talkie conversation between two people where only one person
speaks at a time.

Full-Duplex Data Transmission:


¨ is in both directions simultaneously (i.e. data can be sent from ‘A’ to ‘B’ and from ‘B’ to ‘A’
along the same line, both at the same time).
¨ Example: broadband connection on a phone line.

Serial Data Transmission:


¨ is when data is sent, one bit at a time, over a single wire or channel
Benefits:
¨ This method of data transmission is more reliable over long distances
¨ less likely for data to get skewed
¨ It is cheaper as only a single wire.
Drawbacks:
¨ data is transmitted at a slower rate than parallel data transmission.
An example of its use is
¨ sending data from a computer to a modem for transmission over a telephone line.
¨ Universal Serial Bus (USB)
¨ WIFI

-4-
Paper 1 Theory Summary
OL CS Gamal Orphy

Parallel Data Transmission:


¨ is when several bits of data (usually 1 byte) are sent down several wires or channels at the
same time; one wire or channel is used to transmit each bit.
Benefits:
¨ a faster method of data transmission than serial.
Drawbacks:
¨ This method of data transmission works very well over short distances (over longer
distances, the bits can become ‘skewed’ – this means they will no longer be
synchronised).
An example of its use is:
¨ When sending data to a printer from a computer using a ribbon connector.
¨ Internal electronics of the computer system (Integrated circuits, buses and other internal
components)

Asynchronous and synchronous data transmission


Asynchronous Data Transmission
¨ refers to data being transmitted in an agreed bit pattern.
¨ Data bits (1s and 0s) are grouped together and sent with CONTROL BITS:
Benefit:
¨ This prevents data becoming mixed up.
¨ If an error occurred only one bye has to be resent
Drawback:
¨ slow method of transmission
Synchronous Data Transmission
¨ is a continuous stream of data
¨ The data is accompanied by timing signals generated by an internal clock.
¨ The receiver counts how many bits (1s and 0s) were sent and then reassembles them into
bytes of data.
Benefit:
¨ Fast transmission of data
Drawbacks:
¨ if an error occurred the whole block of data has to be resent

Universal Serial Bus (USB)


¨ is an asynchronous serial data transmission method.
¨ It has quickly become the standard method for transferring data between a computer
and a number of devices.

-5-
Paper 1 Theory Summary
OL CS Gamal Orphy

Essentially, the USB cable consists of:


¨ a four-wire shielded cable
¨ two of the wires are used for power and the earth
¨ two of the wires are used in the data transmission.
When a device is plugged into a computer using one of the USB ports:
¨ the computer automatically detects that a device is present
¨ the device is automatically recognised, and the appropriate DEVICE DRIVER is loaded up
¨ if a new device is detected, the computer will look for the device driver which matches
the device
¨ if this is not available, the user is prompted to download the appropriate software.
Advantages Disadvantages
Devices plugged into computer are The maximum cable length is 5 metres
automatically detected
The connectors can only fit in one way The present transmission rate is limited to
500 megabits per second
Several different data transmission are The older USB standard may not be
supported supported in the near future
Newer USB standards are backward
compatible

Error-checking methods
Parity checking
¨ Can be either odd or even
¨ Sender counts number of 1s and sets parity bit
¨ Systems that use EVEN PARITY have an even number of 1- bits; systems that use ODD
PARITY have an odd number of 1-bits.
¨ Checked after transmission to make sure parity is correct, if incorrect then error is
detected

Echo check
¨ when data is sent to another device
¨ data is sent back again to the sender.
¨ The sender compares the two sets of data to check if it matches.
¨ If it doesn’t match then error is detected
¨ this isn’t very reliable.
o If the two sets of data are different, it isn’t known whether the error occurred
when sending the data in the first place, or if the error occurred when sending the
data back for checking!

-6-
Paper 1 Theory Summary
OL CS Gamal Orphy

Checksum
¨ The checksum for the bytes is calculated
¨ this value is transmitted with the block of data
¨ at the receiving end, the check sum is recalculated from the block of data received
¨ the calculated value is then compared with the checksum received
¨ if they are the same value then the data is transmitted correctly
¨ if the values are different then an error has occurred, and a request is sent for the data to
be transmitted

Automatic Repeat Request (ARQ)


¨ It uses an ACKNOWLEDGEMENT and TIMEOUT
¨ check is performed on received data by e.g. checksum
¨ If an acknowledgement isn’t sent back to the sender before timeout occurs, then the
message is automatically resent.
¨ if error is detected, request sent to resend the data (negative acknowledgement is used)
¨ data is resent until till it is resent correctly
¨ or request times out

Check Digit
¨ A digit that is calculated from the data
¨ It is appended / added to the data
¨ Digit is recalculated when data is entered
¨ Digits are compared to check for error

Internet technologies
Internet Service Provider (ISP)
Description of the role of the ISP:
¨ Provide access to the internet / dial up / broadband
¨ Usually charge a monthly fee
¨ Monitor usage of user
¨ Give users an IP address
¨ Determine bandwidth
¨ Provide security services
¨ Provide web hosting facilities and supports domain names (for websites)
¨ Provide access to Email / Mailbox
¨ Provides online data storage.

-7-
Paper 1 Theory Summary
OL CS Gamal Orphy

Internet Protocol (IP) Address


¨ Each device on the internet is given a unique address known as the INTERNET
PROTOCOL (IP) ADDRESS.
¨ This is a 32-bit number which is usually written in the form:
¨ 109.108.158.1
¨ The only IP addresses that remain fairly unchanged are web servers.
¨ IP addresses can be IPv4 or IPv6
¨ IP address can be static
o meaning it doesn’t change each time it is connected to the Internet
¨ IP address can be dynamic
o meaning that it can change each time a device is connected to the Internet

MAC Address:
¨ Media Access Control
¨ This is a unique number that identifies a device connected to the internet.
¨ address is 48 bits
¨ first 6 digits is the manufacturer code of the device
¨ last 6 digits is the serial number of the device
What is the difference between an IP address and a MAC address?
¨ The IP address gives the location of a device on the internet, whereas the MAC address
identifies the device connected to the internet.

Hypertext Mark-up Language (HTML)


¨ HYPERTEXT MARK-UP LANGUAGE (HTML) is used when writing and developing web
pages.
¨ HTML uses <tags> which are used to bracket a piece of code; for example, <td> starts a
standard cell in an HTML table, and </td> ends it.
¨ translated by a web browser to display webpages
HTML structure and presentation
¨ Structure and presentation are defined using (mark-up) tags
¨ Structure and presentation dictate the appearance of the website
¨ Structure is used for layout
¨ Presentation is used for formatting / style
¨ Separate file / CSS can be used for presentation content

Structure:
¨ instructs how the layout of the content is displayed
¨ example: images and text

Presentation:
¨ instructs how the content will be formatted
¨ is the style of the document; example: colour of the font

-8-
Paper 1 Theory Summary
OL CS Gamal Orphy

Hypertext transfer protocol (http)


¨ HYPERTEXT TRANSFER PROTOCOL (HTTP) is a set of rules that must be obeyed when
transferring files across the internet.

Web browsers
¨ is software which allows a user to display a web page on their computer screen.
¨ translates the HTML document
¨ This can often be in the form of videos, images or sound.
¨ identifies protocols
Most web browsers share the following features:
¨ they have a HOME page
¨ they have the ability to store a user’s favourite websites/pages
¨ they keep a history of the websites visited by the user
¨ they give the ability to go backward and forward to websites opened.

The web browser will break up the URL (Uniform Resource Locator) into three parts:
http://www.hoddereducation.com/igcse
Protocol: http://
Web servers name: www.hoddereducation.com
Domain name: hoddereducation.com
Domain suffix/type: .com
File name (webpage): igcse

How the web browser uses the URL to access the webpage?
¨ The web browser sends URL to DNS
¨ DNS stores an index of URL and matching IP address
¨ DNS searches for URL to obtain the IP address
¨ IP address sent to web browser, (if found)
¨ Web browser sends request to IP of webserver
¨ If URL not found DNS returns error

-9-
Paper 1 Theory Summary
OL CS Gamal Orphy

How is information sent from a web server on the Internet to the user’s
computer and displayed on screen?
¨ a web browser is used
¨ user enters URL
¨ protocols used is HTTP of HTTPS
¨ The URL contains the domain name
¨ The DNS server looks up the IP address of the company
¨ the web browser sends a request to the web server
¨ Data for the website is stored on the company’s web server
¨ the web server sends back the data back to the web browser
¨ web server uses users IP address to send back the data
¨ the data is transferred into HTML
¨ HTML is translated by the user’s web browser to display the website

- 10 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 3: Logic Gates and Logic Circuits


The function of the logic gates
NOT gate

Description:
The output, X, is 1 if:
the input, A, is 0
Truth table:
Input Output
A X
0 1
1 0
How to write this:
X = NOT A (logic notation)
X = ā (Boolean algebra)

AND gate

Description:
The output, X, is 1 if:
both inputs, A and B, are 1
Truth table:
Input Output
A B X
0 0 0
0 1 0
1 0 0
1 1 1

How to write this:


X = A AND B (logic notation)
X = a · b (Boolean algebra)

- 11 -
Paper 1 Theory Summary
OL CS Gamal Orphy

OR gate

Description:
The output, X, is 1 if:
either input, A or B, is 1
Truth table:
Input Output
A B X
0 0 0
0 1 1
1 0 1
1 1 1

How to write this:


X = A OR B (logic notation)
X = a + b (Boolean algebra)

NAND gate (NOT AND)

Description:
The output, X, is 1 if:
input A AND input B are NOT both 1
Truth table:
Input Output
A B X
0 0 1
0 1 1
1 0 1
1 1 0

How to write this:


X = A NAND B (logic notation)
X = &&&&&
a ∙ b (Boolean algebra)

- 12 -
Paper 1 Theory Summary
OL CS Gamal Orphy

NOR gate (NOT OR)

Description:
The output, X, is 1 if:
neither input A nor input B is 1
Truth table:
Input Output
A B X
0 0 1
0 1 0
1 0 0
1 1 0

How to write this:


X = A NOR B (logic notation)
X = &&&&&&&
a + b (Boolean algebra)

XOR gate

Description:
The output, X, is 1 if:
(input A is 1 AND input B is 0)
OR
(input A is 0 AND input B is 1)
Truth table:
Input Output
A B X
0 0 0
0 1 1
1 0 1
1 1 0

How to write this:


X = A XOR B (logic notation)
X = (a ∙ b&) + (a& ∙ b) (Boolean algebra)

- 13 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Using NAND Gates only


The AND gate:

The OR gate:

The NOT gate:

The XOR gate:

- 14 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 4: Operating Systems and


Computer Architecture
Operating Systems

Reason for having an operating system:


¨ It controls the hardware
¨ Allows the user to communicate with the computer
¨ Performs complex tasks such as multitasking and multiprogramming
¨ It handles the interrupts and errors

It is worth mentioning here that simple devices with embedded microprocessors don’t
always have an operating system.
Devices not having an operating system:
¨ Household items, such as cookers, microwave ovens and washing machines.
Reason for not having an operating system:
¨ They only carry out single tasks which don’t vary.
¨ The input is usually a button pressed or a touchscreen option selected which activates a
simple hardware function which doesn’t need an operating system to control it.

- 15 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Interrupts
¨ Signal sent from a device or from software to the processor.
¨ The interrupt will cause the OS/current process to pause
¨ Used to make sure that vital tasks are dealt with immediately
¨ The OS/CPU/Interrupt Service Routing will service/handle the interrupt
¨ They have different levels of priority
¨ After the interrupt is serviced, the (previous) process is continued
¨ It enables multi-tasking to be carried out on a computer
¨ A valid example of an interrupt e.g. ‘out of paper’ message for a printer, a disk drive is
ready to receive more data
What happens when an interrupt is serviced?
1. Whenever an interrupt is serviced, the status of the current task being run is saved;
2. This is done using an INTERRUPT HANDLER and once the interrupt has been fully
serviced
3. the status of the interrupted task is reinstated, and it continues from the point prior to the
interrupt being sent.

Buffers
¨ Used in computers as a temporary memory area.
¨ If it wasn’t for buffers, processors would spend the majority of their time idle, waiting for
the hardware device to complete its operation.
¨ Buffers are essentially filled from the processor or memory unit and whilst these are
emptied to the hardware device, the processor carries on with other tasks.
¨ Buffers are used, for example, when streaming a video from the internet.

- 16 -
Paper 1 Theory Summary
OL CS Gamal Orphy

This flow chart shows how buffers and interrupts are used when a document is sent to a
printer.

- 17 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Computer architecture
VON NEUMANN ARCHITECTURE
¨ Buses essentially move data around the computer and also send out control signals to
make sure everything is properly synchronised.
Type of Bus Description of bus Signal direction

carries addresses between the Unidirectional: travel in one


Address bus
processor and the memory direction
sends data between the
Bi-directional: travel in both
Data bus processor, the memory unit and
direction
the input/output devices
carries signals relating to the
control and coordination of all
Bi/Unidirectional: travel in one or
Control bus activities within the computer
both directions
(examples include: the read and
write functions)
Memory unit
¨ The computer memory unit is made up of a number of partitions.
¨ Each partition consists of an ADDRESS and its CONTENTS (Data).
Consider the READ operation:
¨ Suppose we want to read the contents of memory location 1111 0001; the two registers
are used as follows:
¨ The address of location 1111 0001 to be read from is first written into the MAR (memory
address register):

¨ Then a ‘read signal’ is sent to the computer memory using the control bus
¨ Then the data itself in the contents of that location is copied to the MDR (memory data
register).
¨ Then data from the MDR are then output to the user.

Consider the WRITE operation:


¨ Suppose we want to write contents into memory location 1111 0001; the two registers
are used as follows:
¨ The address of location 1111 0001 to be written is first written into the MAR (memory
address register):

¨ Then the data itself to be written is copied into the MDR (memory data register).
¨ Then a ‘write signal’ is sent to the computer memory using the control bus
¨ Then the data in the MDR is copied into the location held in the MAR

- 18 -
Paper 1 Theory Summary
OL CS Gamal Orphy

CPU
Arithmetic and Logic Unit (ALU)
¨ The ALU is responsible for carrying out any mathematical operations
¨ The ALU is responsible for carrying out any logical operations (AND/OR/NOT)
¨ The ALU contains the register ACC
¨ The ACC stores data and values that are being calculated and used by the ALU
Control unit (CU)
¨ controls the operation of the memory, processor and input/output devices.
¨ Sends signals to other components telling them what to do
¨ Instructions are interpreted
Input and output devices
¨ Input devices convert external data into a form the computer can understand and can
then process (e.g. keyboards, touchscreens and microphones).
¨ Output devices show the results of computer processing in a humanly understandable
form (e.g. printers, monitors and loudspeakers).
The fetch–execute cycle
Stages:
¨ Fetch
¨ Decode
¨ Execute

Cycle:
¨ The program counter (PC) contains the address of the memory location of the next
instruction which has to be fetched
¨ This address is then copied from the PC to the memory address register (MAR).
¨ the address is then sent to the memory unit using the address bus
¨ The value in the PC is then incremented by 1 so that it now points to the next instruction
which has to be fetched
¨ The contents of the (instruction) at the memory location (address) contained in MAR are
then copied temporarily into the memory data register (MDR)
¨ Data is sent using the data bus
¨ The contents (instructions) of the MDR are then copied and placed into the current
instruction register (CIR)
¨ The address part of the instruction if any is placed in the MAR
¨ The instruction is finally decoded and then executed by sending out signals (via the
control bus) to the various components of the computer system

- 19 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Components of Von Neumann architecture:


¨ Control Unit
¨ Arithmetic and logic unit (ALU)
¨ Memory address register (MAR)
¨ Memory data register (MDR) // Memory buffer register (MBR)
¨ Accumulator (ACC)
¨ Immediate Access Store (IAS)
¨ Main memory // RAM
¨ Program counter (PC)
¨ Current instruction register (CIR)
¨ Address bus
¨ Data bus
¨ Control bus
¨ Input device
¨ Output device
¨ Secondary storage device

Functions and roles of the registers:


¨ MAR: stores the address to be accessed in the memory
¨ MDR: stores the data in transit between the memory unit and the CPU // stores the
instruction before being sent to the CIR
¨ ACC: stores the data/values being calculated and used by the ALU
¨ PC: stores the address of the next instruction to be fetched/accessed in the memory
¨ CIR: stores the instruction that is being processed by the CU
Description of stored program concept when applied to the Von Neumann model:
¨ The program is stored on a secondary storage device
¨ Data and instructions are moved to memory / RAM
¨ Data and instructions are stored in the same memory / RAM
¨ Data and instructions are moved to registers to be executed
¨ Instructions are fetched and executed one at a time

- 20 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 5: Input and Output devices


Input devices
¨ A device used to enter data into the computer either manually or automatically to input
data into machine readable format

Two-dimensional scanners
¨ Shines a light onto the surface of the document
¨ A scan head moves across the document
¨ Reflected light is captured using sensors (CCD)
¨ Uses mirrors and lenses
¨ Captured image is converted into a digital file
¨ Produces a 2D digital image
To input text from documents:
¨ Computers equipped with OPTICAL CHARACTER RECOGNITION (OCR) software allow
the scanned text from the document to be converted into a TEXT FILE FORMAT.

Three-dimensional scanners:
¨ Scanners shines a laser (or light) over the surface of a 3D object
¨ Records measurements of the geometry/dimensions of the object
¨ Measurements are converted to digital file
¨ Produces a 3D digital model
¨ The scanned images can be used in COMPUTER AIDED DESIGN (CAD).
¨ TOMOGRAPHY technology which basically builds up an image of the solid object
through a series of very thin slices.

Barcode readers/scanners
¨ Shines light or laser at barcode
¨ Light is called an illuminator
¨ Light is reflected back; black lines reflect less light than white lines
¨ Sensors (photoelectric cells) detect the light
¨ Different reflections give different binary values
¨ A microprocessor interprets the barcode

Stock control cycle:


¨ The barcode number is looked up in the stock database
¨ When the barcode number is found, the stock item record is looked up.
¨ The price and other stock item details are sent back to the checkout

- 21 -
Paper 1 Theory Summary
OL CS Gamal Orphy

¨ The number of stock items in the record is reduced by one each time the barcode is
read.
¨ This new value for number of stock items is written back to the stock item record.
¨ The number of stock items is compared to the re-order level; if it is less than or equal to
this value, more stock items are automatically ordered.
¨ Once an order for more stock items is generated, a flag is added to the record to stop re-
ordering every time the stock item barcode is read.
¨ When new stock items arrive, the stock levels are updated in the database.
Advantages of using barcodes to the management include:
¨ Much easier and faster to change prices on stock items
¨ Much better and more up-to-date sales information / sales trends
¨ No need to price every stock item on the shelves (this reduces time and cost to the
management)
¨ Allows for automatic stock control
¨ Possible to check customer buying habits more easily by linking barcodes to, for
example, customer loyalty cards.
Advantages of using barcodes to the customers include:
¨ Faster checkout queues (staff don’t need to remember/look up prices of items)
¨ Errors in charging customers are reduced
¨ The customer is given an itemised bill
¨ Cost savings can be passed on to the customer
¨ Better track of ‘sell by dates’ so food should be fresher.

Quick response (QR) codes


¨ QR code is captured / scanned / imaged, by a camera / scanner /barcode reader / QR
code reader
¨ Read using a laser
¨ Processed by an app
¨ Light is reflected back
¨ Black squares reflect less light than white squares
¨ Modules are used for orientation / alignment
¨ Squares / data are decoded
Advantages of QR codes include:
¨ there is no need for the user to write down or key in a website address; scanning the QR
code does this automatically
¨ QR codes can store website addresses/URLs that appear in magazines, trains, buses or
even on business cards, giving a very effective method of advertising.

- 22 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Difference between QR codes and Barcodes:


¨ barcode 1D and QR code 2D
¨ barcodes contain vertical lines and QR codes contain ‘squares’
¨ QR code can hold more data than a barcode
¨ QR code can be read from any angle, some barcode readers have to be lined up with
the barcode // QR codes are more error tolerant / faster to scan than barcodes
¨ barcodes are frequently used at checkouts / libraries // QR codes are used for
advertising // QR codes are frequently used by mobile phones to obtain information

Digital cameras
Taking an image:
¨ Image is converted from analogue to digital (using ADC)
¨ Image is turned into pixels
¨ Each pixel is given a binary value
¨ Pixels form a grid (to create the image)
¨ Each pixel has a colour
¨ Pixels are stored in sequence (in a file)
¨ Meta data/file header is stored (to describe the dimensions/resolution of the image)

Role of the microprocessor in the digital camera:


¨ adjust the shutter speed
¨ focus the image automatically
¨ operate the flash automatically
¨ adjust the aperture size
¨ adjust the size of the image
¨ remove ‘red eye’ when the flash has been used

Keyboards
¨ A circuit board present under the keys
¨ A key is pressed that presses a switch
¨ When a key is pressed it completes a circuit
¨ An index is searched to find the corresponding character
¨ Each character is represented by an ASCII code
¨ Each character is added to a buffer to be processed

Microphones
For example:
¨ doing a ‘voice over’ in a presentation
¨ part of a speech recognition system
¨ part of a voice recognition system
¨ enabling a disabled person to communicate with a computer.

- 23 -
Paper 1 Theory Summary
OL CS Gamal Orphy

How it operates:
¨ When a microphone picks up sound, a diaphragm vibrates
¨ This vibration produces an electric signal.
¨ This signal goes to a sound card
¨ the signal is converted into digital values and stored in the computer.

Touchscreens
Capacitive:
¨ uses multiple layers that acts as a capacitor
¨ that transmits electric currents from all 4 corners of the screen
¨ when the top layer is touched the current changes
¨ sensors are used to read the electric field
¨ the coordinates of the “touch” is determined by a microprocessor
Benefits:
¨ good visibility in sunlight
¨ allows multitouch
¨ this is a midium cost technology
Drawbacks
¨ Cannot use while wearing standard gloves
Infra-red:
¨ (Infrared) rays are sent across screen (from the edges)
¨ Has sensors around edge
¨ (Infrared) rays form a grid across the screen
¨ (Infrared) ray is broken (by a finger blocking a beam)
¨ Calculation is made (on where beam is broken) to locate the ‘touch’

Benefits:
¨ allows multitouch
¨ can use fingers/stylus/gloved fingers/pen
Drawback:
¨ expensive to manufacture
¨ sensitive to dust/dirt
¨ some heat sensitive systems allow only bare fingers to be used

- 24 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Resistive:
¨ uses multiple layers of materials to transmit current
¨ when the top layer is touched into the bottom layer
¨ this closes a circuit
¨ and the electric current is transmitted to find the location of the “touch”
Benefits:
¨ cheap to manufacture
¨ can use stylus/fingers/gloved fingers/pen
Drawbacks
¨ poor visibility in sunlight
¨ vulnerable to scratching
¨ does not allow multitouch

Sensors
¨ SENSORS are input devices which read or measure physical properties.
¨ These can include temperature, pressure, acidity and so on.
¨ When the computer is used to control devices, such as a motor or a valve, it is necessary
to use a DIGITAL TO ANALOGUE CONVERTER (DAC) since these devices need
analogue data to operate in many cases.
¨ Frequently, an ACTUATOR (in output devices) is used in these control applications.
Analogue signals:
¨ Continuous data that contains infinite values
Digital data:
¨ Discrete data that has only two values

- 25 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Sensor Application
temperature • control a central heating system
• control/monitor a chemical process
• control/monitor the temperature in a greenhouse
moisture/humidity • control/monitor the moisture levels in soil in a greenhouse
• control/monitor the humidity levels in the air in a greenhouse
• monitor dampness levels in an industrial application
(e.g., monitor moisture in a paint spray booth in a car factory)
Light • switch street lighting on at night and off during the day
• monitor/control light levels in a greenhouse
• automatically switch on a car’s headlights when it gets dark
infra-red/motion • turn on the windscreen wipers on a car automatically
• detect intruders in a burglar alarm system
• count people entering/leaving a building
Pressure • detect intruders in a burglar alarm system
• weigh things (e.g. check the weight of a vehicle)
• monitor/control a process where gas pressure is Important
acoustic/sound • pick up noise levels (e.g. footsteps) in a burglar alarm system
• detect the noise of liquids dripping in a pipe

gas (e.g. O2 or • monitor pollution levels in a river or in the air


CO2) • measure O2 and CO2 levels in a greenhouse
• check for CO2 leaks in a power station
pH • monitor/control acidity/alkalinity levels in the soil in a greenhouse
• pollution/environmental monitoring in rivers
magnetic field • any application where detection of changes in a magnetic field is
required (e.g. in cell phones, CD players, etc.)
• used in anti-lock braking systems in motor vehicles

Monitoring operation:
¨ Sensors send data to the microprocessor
¨ Data is converted to digital using ADC
¨ The microprocessor compares data with stored values
¨ If the data from the sensors is different than the stored values
¨ …the microprocessor sends a signal to alert the user
¨ Using a buzzer or warning lights
¨ This process is continuous

- 26 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Control operation:
¨ Sensors send data to the microprocessor
¨ Data is converted to digital using ADC
¨ The microprocessor compares data with stored values
¨ If the data from the sensors is different than the stored values
¨ …the microprocessor sends a signal to an actuator
¨ To take an output action and affect the physical environment
¨ This process is continuous
Benefits of sensors:
¨ Can work continuously
¨ Avoids human error
¨ It could be a dangerous environment and will avoid human risk
¨ Detect errors instantly
¨ Maintain consistent and correct conditions

Interactive whiteboards
They also allow a user:
¨ to write on the whiteboard using a special stylus and the text or drawings produced are
then stored in an electronic form for later use.
¨ It is possible for this image to be annotated by adding labels, a description or even
changes to the design for later use.
¨ The annotated version can then be saved in an electronic form to allow these changes to
be made.

Output Devices
¨ A device used to extract and output data from the computer system to the user to output
data in human readable format

Inkjet printer
¨ a print head which consists of nozzles which spray droplets of ink on to the paper to form
characters
¨ an ink cartridge or cartridges
¨ a stepper motor and belt which moves the print head assembly across the page from
side to side
¨ a paper feed which automatically feeds the printer with pages as they are required.

- 27 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Types
Thermal bubble:
¨ Tiny resistors create localised heat which makes the ink vaporise.
¨ This causes the ink to form a tiny bubble
¨ as the bubble expands, some of the ink is ejected from the print head onto the paper.
¨ When the bubble collapses, a small vacuum is created which allows fresh ink to be drawn
into the print head.

Piezoelectric:
¨ A crystal is located at the back of the ink reservoir for each nozzle.
¨ The crystal is given a tiny electric charge which makes it vibrate.
¨ This vibration forces ink to be ejected onto the paper
¨ at the same time more ink is drawn in for further printing.

Steps
1. The printer driver ensures that the data is in a correct format
2. The data is then sent to the printer and it is stored in a temporary memory known as a
printer buffer
3. Rollers are used to move the paper through the printer
4. Nozzles spray/drop/jet ink onto the paper
5. Ink jets/print head/nozzles are moved across the paper (to distribute the ink)
6. The print head moves from side to side across the paper printing
7. After a full pass, the paper is advanced very slightly to allow the next line to be printed

Laser printers
Steps
1. The printer driver ensures that the data is in a correct format
2. The data is then sent to the printer and it is stored in a temporary memory known as a
printer buffer
3. The start of the printing process involves a printing drum being given a positive charge
4. As this drum rotates, a laser beam is scanned across it removing the positive charge in
certain areas,
5. this leaves negatively charged areas which exactly match the text/images of the page to
be printed
6. The drum is then coated with positively charged TONER (powdered ink).
7. Toner sticks to the negatively charged parts of the drum
8. A negatively charged sheet of paper is then rolled over the drum to attract the toner
9. The paper finally goes through a fuser to melt ink on paper
10. Then a discharge lamp removes all the electric charge from the drum making it ready to
print the next page

- 28 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Applications of inkjet and laser printers


INKJET PRINTERS are best for:
¨ One-off photos or where only a few pages of good quality and colour printing are
needed
LASER PRINTERS are best for:
¨ Any application that needs high-volume printing (in colour or monochrome) for example,
producing a large number of high-quality flyers or posters for advertising)

3D printers
¨ 3D PRINTERS are primarily used in COMPUTER-AIDED DESIGN (CAD) applications.
¨ The solid object is built up layer by layer using materials such as powdered resin,
powdered metal, paper or ceramic powder.
How to create a solid object using a 3D printer
¨ A design is made using computer-aided-design (CAD) software
¨ The finalised drawing is imported into some special software that prepares it in a format
which is understood by the 3D printer
¨ The 3D printer is set up to allow the solid object to be made
¨ The solid object is built up layer by layer (often 0.1 mm thick); this can take several hours
¨ The object is removed from the printer and then prepared; some require the removal of
excess powder and other.

2D and 3D cutters
¨ Design is created on the CAD
¨ Material is loaded to cutter
¨ Different types of material can be used
¨ Uses lasers to cut material
¨ That is focussed using a special lens
¨ Can work on both the x, y (2D) and z axis (3D)

Laser cutters can cut the following materials:


¨ glass
¨ crystal
¨ metal
¨ polymer
¨ wood.

Actuators
¨ Used in many control applications involving sensors and devices such as ADC and DAC.

- 29 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Loudspeakers/headphones
¨ Sound is produced from a computer by passing the digital data through a DIGITAL TO
ANALOGUE CONVERTER (DAC) and then through an AMPLIFIER
¨ Finally, the sound emerges from speaker
¨ Sampling rate: No. of samples per second
¨ Sampling resolution: No. of bits per sample
¨ Bit rate: No. of bits per second (Sampling rate multiplied by sampling resolution)

LCD and LED monitors


LCD:
¨ The display is made up of pixels
¨ that are arranged together as a matrix
¨ Each pixel has three filters, red, blue and green
¨ Shades of colour are achieved by mixing red, blue and green
¨ The screen is backlit using fluorescent or LED
¨ Light is shone through the liquid crystals
¨ The liquid crystals can be made to turn on or off
¨ by changing the shape of the crystal

LEDs advantages:
¨ LEDs reach their maximum brightness almost immediately
¨ LEDs give a whiter light which sharpens the image
¨ LEDs produce a brighter light
¨ monitors using LED technology are much thinner
¨ LEDs last longer
¨ LEDs consume very little power
OLED
¨ OLEDs are thinner, lighter and more flexible
¨ OLED layers can be made from plastic rather than the glass used in LED and LCD
screens
¨ OLEDs give a brighter light than LEDs
¨ OLEDs do not require backlighting like LCD screens – OLEDs generate their own light
¨ since OLEDs require no backlighting, they use much less power than LCD screens
¨ since OLEDs are essentially plastics, they can be made into large, thin sheets

- 30 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Light projectors
Digital Light Projectors (DLP):
¨ Uses a large number of micro mirrors
¨ Each mirror can create a pixel in an image
¨ Mirrors tilt away and towards the light source
¨ Mirrors reflect light towards a lens
¨ Light passes through color wheel and color filter
¨ Then projected onto a wall or screen
LCD projectors:
¨ Light sent to stationary mirrors
¨ Light reflected back at red, green and blue wavelengths
¨ Reflected light passes through three lcd screens
¨ Light then produces red, green and blue versions of the image
¨ Light passes through special color filters to produce the colored image
¨ Then projected through a lens onto a wall or screen

- 31 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 6: Memory and Data Storage


File formats
Musical Instrument Digital Interface (.midi/.mid)
¨ Musical Instrument Digital Interface file
¨ Stores a set of commands / instructions for how the sound should be played
¨ Does not store the actual sounds
¨ Data in the file has been recorded using digital instruments
¨ Standard for controlling devices such as synthesisers and sound cards
¨ Specifies pitch of the note // specifies the note to be played
¨ Specifies when each note plays and stops playing // Specifies key on/off
¨ Specifies duration of the note
¨ Specifies volume of the note
¨ Specifies the tempo
¨ Specifies the type of instrument

MPEG-3 (MP3) and MPEG-4 (MP4)


MPEG-3 (.mp3)
¨ Contains actual sound
¨ Contains samples of the sound wave
¨ Contains metadata (information about the sound track, for example bit rate, name, date
of creation)
¨ Recorded using microphone // Is recorded/played on an MP3 recorder/player
¨ uses technology known as AUDIO COMPRESSION (Uses lossy compression)
¨ To convert music and other sounds into an MP3 file format.
¨ Essentially, this compression technology will reduce the size of a normal music file by
about 90 per cent.
¨ For example, an 80-megabyte music CD can be reduced to 8 megabytes using MP3
technology.
¨ The CD files are converted using FILE COMPRESSION software.
¨ This is done using file compression algorithms which use PERCEPTUAL MUSIC SHAPING,
this essentially removes sounds that the human ear can’t hear properly.
¨ For example, 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.

- 32 -
Paper 1 Theory Summary
OL CS Gamal Orphy

MPEG-4 (.mp4)
¨ This format allows the storage of multimedia files rather than just sound. Music, videos,
photos and animation can all be stored in the MP4 format.
¨ Videos, for example, could be streamed over the internet using the MP4 format without
losing any real discernable quality.

Joint Photographic Experts Group (.jpg) files


¨ The resolution of the photographs is reduced
¨ This is the result of changing the number of PIXELS per centimetre used to store the
image (that is, reducing the PICTURE RESOLUTION).
¨ Reduces colour depth of the image, so reduces number of bits stored for each pixel
¨ This is another example of lossy file compression.
Calculation of the size of an image:
1. The colour depth in bits change it to bytes (divide by 8)
2. The total number of pixels is calculated from Height times Width
3. Multiply total number of pixels by results from step 1 to get total number of bytes
4. Change bytes to measurement needed according to question (example: divide by 1000
for kilobytes)

Text and number file formats


¨ If number files undergo any form of file compression, then it tends to be lossless.
¨ Since it very important that none of the information/data is lost.

Lossless and lossy file compression


Lossless file compression
Why use lossless:
¨ So that the decompressed text will be exactly the same as the original
¨ The file will not work properly if any details are lost.
Text files can also undergo lossless file compression.
¨ a compression algorithm is used
¨ no data is lost in the process
¨ repeated words/patterns can be indexed // repeated sections of words/patterns can be
indexed
¨ The indexed words/patterns can be replaced with numerical values

- 33 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Lossy file compression


¨ A compression algorithm
¨ Permanently deleting some data // file cannot be restored to original
¨ In case of images:
¨ Colour depth / palette can be reduced
¨ Resolution can be reduced // number of pixels can be reduced
¨ Less bits will be required for each pixel / colour with this technique, the file compression
algorithm eliminates unnecessary bits of data as seen in MP3 and jpeg formats.
¨ It is impossible to get the original file back once it is compressed.

Why use lossy:


¨ As images will contain less detail but without noticeable degredation in quality
¨ It will decrease storage size more than lossless.

Memory and Data storage


Memory and storage devices can be split up into three distinct groups:
Primary memory
¨ Directly accessed by the CPU
¨ contains both non-volatile and volatile storage
¨ Primary is internal to the computer/device
Secondary storage
¨ Not directly accessed by the CPU
¨ Non-volatile storage
¨ Secondary is internal to the computer/device
Off-line storage.
¨ Non-volatile storage
¨ Off-line storage is storage that is removable from a computer/device // not internal //
portable
Difference between primary and secondary:
¨ Primary RAM and ROM
¨ Secondary HDD and SSD
¨ Primary is directly accessible by CPU
¨ Secondary is not directly accessible by CPU
¨ Primary stores boot up instructions and can hold data whilst being processed
¨ Secondary stores files/software
¨ Primary has faster access speed
¨ Secondary has a slower access speed
¨ Primary has both volatile and non-volatile
¨ Secondary is non-volatile

- 34 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Primary memory
Random Access Memory (RAM):
¨ it is volatile/temporary memory (the contents of the memory are lost when the power to
the RAM is turned off)
¨ the data or contents of a RAM chip can be read from or written to.
¨ they can be changed.
¨ There is another type of RAM that is non-volatile which is SRAM
It is used to store:
¨ data, files or part of the operating system that are currently in use
¨ it can be written to or read from and the contents of the memory can be changed.
There are currently two types of RAM technology:
¨ dynamic ram (DRAM)
¨ static RAM (SRAM).
Dynamic RAM (DRAM)
¨ Consists of transistors and capacitors.
¨ Capacitor – this holds the bits of information (0 or 1)
¨ Transistor – this acts like a switch; it allows the chip control circuitry to read the capacitor
or change the capacitor’s value.
¨ This type of RAM needs to be constantly REFRESHED.
DRAMs have a number of advantages over SRAMs:
¨ they are much less expensive to manufacture than SRAM
¨ they have a higher storage capacity than SRAM.
Static RAM (SRAM)
¨ A big difference between SRAM and DRAM is that this type of memory doesn’t need to
be constantly refreshed.
¨ It makes use of ‘flip flops’
¨ SRAM is much faster than DRAM when it comes to data access

Read Only Memory (ROM):


¨ they are non-volatile/permanent memories (the contents of the memory remain even
when the power to the ROM is turned off)
¨ the data or contents of a ROM chip can only be read
¨ they cannot be changed.
It is used to store:
¨ they are often used to store the start-up instructions when the computer is first switched
on (for example, ROM might store the basic input/output system (BIOS))

- 35 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Secondary storage
Hard Disk Drives (HDD)
¨ The hard disk drive will have a number of platters (magnetized)
¨ These read–write heads can move very quickly – typically they can move from the centre
of the disk to the edge of the disk (and back again) 50 times a second.
¨ Data is stored on the surface in sectors and tracks.
¨ A sector on a given track will contain a fixed number of bytes.
Description how it stores data:
¨ Uses a read/write head
¨ Data stored on tracks and sectors on the platters
¨ the disc rotates at very high speed
¨ the read/write head changes the magnetic field of the disc
¨ the data is stored on a magnetizable media
¨ it changes the polarity of the medium
¨ the difference in magnetic signals represents binary values when read or stored.
Benefits of HDD(Magnetic media):
¨ Cheaper than solid state per unit memory
¨ They have longer longevity for read/write operations
¨ HDD are trusted technology
¨ Sometimes for cases of file servers, the speed is not that big of an issue
¨ For fixed devices, the durability is not an issue.
Solid-state Drives (SSD)
¨ They have no moving parts, and all data is retrieved at the same rate.
¨ The most common type of solid-state storage devices store data by controlling the
movement of electrons within NAND chips.
¨ The data is stored as 0s and 1s in millions of tiny transistors
¨ This effectively produces a non-volatile rewritable memory.
¨ However, a number of solid-state storage devices sometimes use
o ELECTRONICALLY ERASABLE PROGRAMMABLE READ-ONLY MEMORY
(EEPROM) technology. The main difference is the use of NOR chips rather than
NAND.
The benefits of SSDs:
¨ they are more reliable (no moving parts to go wrong)
¨ they are considerably lighter (which makes them suitable for laptops)
¨ they don’t have to ‘get up to speed’ before they work properly
¨ they have a lower power consumption
¨ they run much cooler than HDDs (these last two points again make them very suitable for
laptop computers)
¨ because they have no moving parts, they are very thin
¨ data access is considerably faster than HDD.

- 36 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Off-line storage
Off-line storage includes:
¨ Optical Storage: CD/DVD/DVD-RAM/ Blu-ray disks
¨ Solid State: USB flash memory/memory sticks/SD-XD cards
¨ removable/external hard disk drives (magnetic storage systems).
Optical off-line storage
CD/DVD disks
¨ CDS and DVDS are described as OPTICAL STORAGE DEVICES.
¨ Laser light is used to read data and to write data in the surface of the disk.
¨ Both CDs and DVDs use a thin layer of metal alloy or light-sensitive organic dye to store
the data.
¨ The data is stored in ‘pits’ and ‘lands’ on the spiral track.
¨ A red laser is used to read and write the data.
¨ One of the main differences of DVD and CD is the use of DUAL-LAYERING in DVD

Types of CDs/DVDs:
CD-ROM/DVD-ROM:
¨ An optical disc that already has data on it and cannot be edited
CD-R/DVD-R:
¨ An empty disc that data can be added to only once
CD-RW/DVD-RW:
¨ An empty disc that data can be added to multiple times
DVD-RAM
¨ Instead of a single, spiral track, they use a number of concentric tracks
¨ Use of concentric tracks allows simultaneous read and write operations to take place.
¨ They allow numerous read and write operations (up to 100 000 times) and have great
longevity (over 30 years) which makes them ideal for archiving.
Blu-ray disks
¨ Single layer of polycarbonate
¨ Uses blue laser

Main differences between CDs, DVDs and Blu-ray.

- 37 -
Paper 1 Theory Summary
OL CS Gamal Orphy

How Data is read from an optical disk:


¨ (Red) laser is used
¨ (Laser beams) shines onto surface of the disk
¨ It is rotated (at a constant speed) to be read
¨ Surface is covered in a track (that spirals from the centre)
¨ Data is represented on the surface using pits and lands
¨ Pits and lands represent binary values
¨ Pits reflect light back differently (to the area in between/land)
¨ Optical device can determine the binary value from the light reflection
Uses of Optical Media:
¨ All these optical storage media are used as back-up systems.
¨ This also means that CDs and DVDs can be used to transfer files between computers.
¨ Manufacturers often supply their software using CDs and DVDs.
¨ When the software is supplied in this way, the disk is usually in a read-only format.
¨ The most common use of DVD and Blu-ray is the supply of movies or games.
The future of optical media
¨ In recent times both the CD and DVD are showing signs of becoming obsolete.
¨ Many computer systems now come with USB connectors only and no DVD or CD drive.
¨ The main method of transferring files between devices has become the flash memory.
Many people now store all their music in the following ways:
¨ on hard disk drive systems
¨ a computer/tablet
¨ their mobile phone
¨ a portable music player
¨ using the ‘cloud’ to store all their files so they can access their music from anywhere in
the world
¨ by ‘streaming’ their music from the internet.
Solid State Offline Storage
¨ Stores data by flashing it onto the chips
¨ Data stored by controlling the flow of electrons using transistors

USB flash memories


¨ MEMORY STICKS/FLASH MEMORIES (also known as pen drives) use solid-state
technology
¨ They usually connect to a computer through the USB port
¨ Their main advantage is that they are very small, lightweight devices which make them
suitable as a method for transferring files between computers.

- 38 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Uses of Memory sticks:


¨ They can also be used as small back-up devices for music or photo files
¨ Complex or expensive software, often uses memory sticks as a DONGLE.
o The dongle contains additional files which are needed to run the software.
o Without this dongle, the software won’t work properly.
o It therefore prevents illegal or unauthorised use of the software

Flash memory cards:


¨ Digital cameras use a slightly different form of solid-state memory, known as XD
(eXtreme Digital) or SD (Secure Digital) cards.
The technology is essentially the same as memory sticks.
¨ These memory cards allow photos to be transferred from camera to computer via the
USB port.
¨ Many printers and computers also have card slots allowing the device to read the
memory card directly.

Removable hard disk drives


¨ REMOVABLE HARD DISK DRIVES are essentially HDD but can be connected to the
computer using one of the USB ports.

- 39 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 7: High and Low-Level Languages


Programming languages
What is a program?
¨ A list of instructions that enable a computer to perform a specific task.
¨ Computer programs can be written in high-level languages or low-level languages

High-level languages
¨ High-level languages enable a programmer to focus on the problem to be solved and
require no knowledge of the hardware so much
¨ Many high-level programming languages are portable and can be used on different
types of computer.
¨ High-level languages are designed with programmers in mind; programming statements
are easier to understand than those written in a low-level language.

Benefits:
¨ no need to understand workings of a computer
¨ easier to understand because it is closer to English
¨ much easier to debug
¨ much easier to test
¨ portable; can run on different types of computer (not machine dependent)

Low-level languages
¨ Low-level languages relate to the specific architecture and hardware of a particular
type of computer.

Assembly languages
¨ to make use of special hardware
¨ to make use of special machine-dependent instructions
¨ to write code that doesn’t take up much space in primary memory
¨ to write code that performs a task very quickly.
Machine code
¨ Binary code that the processor understands and can execute
Benefits:
¨ can be written to run faster
¨ shorter code so it requires less storage
¨ in machine language no need for compilers or interpreters
¨ can address memory addresses directly

- 40 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Translators
¨ any source code written by the programmer needs to be translated into machine code in
order to be understood by the computer

Source code:
¨ The code that is written originally by the programmer before translation into machine
code

Types:
Compiler:
¨ Translates high-level language into machine code
¨ Translates (the source code) all in one go/all at once
¨ Produces an executable file (standalone file that doesn’t need a translator to run) if no
errors
¨ Produces an error report at the end if any
¨ One high-level language statement can be translated into several machine code
instructions.

Interpreter:
¨ Translates high-level language into machine code
¨ Translates (the source code) line by line/statement by statement
¨ Stops if it finds an error
¨ Will only continue when error is fixed
¨ Program will not run unless the interpreter is available
¨ One high-level language statement can be translated into several machine code
instructions.

Assembler
¨ Translates a low-level language program into machine code.
¨ An executable file of machine code is produced.
¨ One low-level language statement is usually translated into one machine code
instruction.
¨ Assembled programs can be used without the assembler.
¨

Errors
¨ A SYNTAX ERROR is where a program statement doesn’t obey the rules of the
programming language.
¨ A LOGIC ERROR is where the program doesn’t do what the programmer wanted it to
do.

- 41 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Using an Integrated/Interactive Development Environment (IDE)


¨ Most high-level programming languages offer the use of an IDE for program
development.
¨ This contains an editor with an interpreter and/or compiler together with debugging
tools, which can improve the speed of program development.

Features:
¨ pretty printing: colour codes of lines to help programmer understand the code
¨ automatic indentation
¨ automatic syntax check

- 42 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Section 8: Security and Ethics


Security and data integrity
Malicious Reasons:

Hacking
¨ The act of gaining illegal access to a computer system
Leads to:
¨ Identity theft
¨ Gaining personal information
¨ Data can be deleted, changed or corrupted
Prevention:
¨ Authentication techniques
¨ Firewalls

Cracking
¨ The act of illegally changing the source code of a program so that it can be exploited for
another use
Leads to:
¨ Gaining personal information
¨ Data can be corrupted
Prevention:
¨ Authentication techniques
¨ Activation codes
¨ Dongles
¨ Online registration

Viruses
¨ Program/program code that replicates itself
¨ For malicious purpose
Leads to:
¨ Cause computer to crash/stop functioning normally
¨ Delete/corrupt data
Prevention:
¨ Up-to-date antivirus
o Antivirus features:
§ Scans files for viruses
§ Can run a scheduled scan
§ Can quarantine a virus
§ Can delete a virus

- 43 -
Paper 1 Theory Summary
OL CS Gamal Orphy

¨ Don’t use software from unknown sources


¨ Don’t open emails from unknown sources

Phishing
¨ Sending of fake email
¨ That may contain a link
¨ To redirect the user to a fake website to steal confidential information
Leads to:
¨ Gaining personal information
¨ Identity theft
Prevention:
¨ The user should be cautious when opening emails
¨ Many mail servers have filters for phishing emails

Pharming
¨ Malicious code installed on users’ hard disk or on the web server
¨ The code redirects user to a fake website
¨ To steal confidential information
Leads to:
¨ Gaining personal information
¨ Identity theft
Prevention
¨ Make sure the web address is what it is claimed to be
¨ Some software called anti-spyware can delete this malicious code

Wardriving
¨ Act of using the wireless internet connection illegally
Leads to:
¨ Steal a user’s internet time
¨ Possible to steal personal information sent on WIFI

Spyware/key-logging software
¨ Software that gathers information by monitoring key presses on the keyboard
¨ The information is recorded in a log file
¨ The log file is sent back to the hacker/person who sent the spyware
Leads to:
¨ Gaining personal information
¨ Identity theft
Prevention:
¨ Use of anti-spyware
¨ Use of virtual on-screen keyboard to enter passwords with a mouse

- 44 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Cookies
¨ A COOKIE is a packet of information stored in a text file
¨ Sent by a web server to a web browser.
¨ Cookies are generated each time the user visits the website.
¨ Every time a user visits the website, cookies will have collected some key information
about the user.
¨ Cookies aren’t programs but are simply pieces of data.
¨ They only allow the detection of web pages viewed by a user on a particular website and
store user preferences, as described above.
¨ Detected by the website when it is visited again
used to store:
¨ To store personal information/data
¨ To store login details
¨ To save items in an online shopping basket
¨ To track/save internet surfing habits // to track website traffic
¨ To carry out targeted advertising
¨ To store payment details
¨ To customise a webpage // to store user preferences
¨ Store progress in online games/quizzes

Denial of service attacks


¨ a large number of useless requests are sent to the network/server all at once
¨ designed to flood a network/server with useless traffic/requests
¨ the network/server will come to a halt/stop trying to deal with all the traffic/requests
¨ prevents users from gaining access to a website/server
The attacker may be able to prevent a user from:
¨ accessing their emails
¨ accessing websites/web pages
¨ accessing online services (such as banking).
How does this cause the problem?
¨ When a user types in or clicks on a URL of a website, a request is sent to the internet
server which contains the website or web page.
¨ So, if it becomes overloaded by an attacker sending out thousands of requests, it won’t
be able to service the user’s legitimate request.
¨ This is effectively a denial of service.

- 45 -
Paper 1 Theory Summary
OL CS Gamal Orphy

An individual user or a website can guard against these attacks to some degree by:
¨ using an up-to-date malware/virus checker
¨ setting up a firewall to restrict traffic to and from the internet server or user’s computer
¨ applying email filters to manage or filter out unwanted traffic or spam emails.
Signs that a user can look out for to see if they are a victim of one of these attacks
include:
¨ slow network performance (opening files or accessing certain websites)
¨ unavailability or inability to access particular websites
¨ large amounts of spam mail reaching the user’s email account.

Spam
¨ Unwanted emails
¨ Sent to a large number of people
¨ Could be used for advertising or spreading viruses and malware
Leads to:
¨ Fills up the mailbox
¨ Could download viruses and malware to the computer if opened
Prevention:
¨ Mail servers have anti-spam filters

Accidental reasons:
Human error (Accidental deletion of a file, not saving data…)
¨ Use of back ups
¨ Save data on a regular basis
¨ Use of passwords on important files
Hardware malfunction
¨ Use of back ups
¨ Use of generators and UPS (Uninterruptable Power Supply) to prevent from power loss
¨ Save data on regular basis
Software fault
¨ Use of back ups
¨ Save data on regular basis
Incorrect computer operation (incorrect shutdown)
¨ Use of back ups
¨ Correct training procedure for users

- 46 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Firewalls and proxy servers


Firewall
¨ A FIREWALL can be either software or hardware.
¨ It sits between the user’s computer and an external network
Tasks carried out by a firewall include:
¨ examining the ‘traffic’ between the user’s computer and the internet
¨ checking whether incoming or outgoing data meets a given set of criteria
¨ if the data fails the criteria, the firewall will block the ‘traffic’ and give the user a warning
that there may be a security issue
¨ logging all incoming and outgoing ‘traffic’ to allow later interrogation by the user
¨ criteria can be set to prevent access to certain undesirable sites; the firewall can keep a
list of all undesirable IP addresses
¨ helping to prevent viruses or hackers entering the user’s computer
¨ warning the user if some software on their system is trying to access an external data
source
PROXY SERVERS
Functions of proxy servers include:
¨ allowing the internet ‘traffic’ to be filtered; they can block access to a website if
necessary (similar type or reaction as a firewall)
¨ by using the feature known as a CACHE, they can speed up access to information from a
website; when the website is first visited, the home page is stored on the proxy server;
when the user next visits the website, it now goes through the proxy server cache
instead, giving much faster access
¨ keeping the user’s IP address secret – this clearly improves security
¨ acting as a firewall
¨ acting as a buffer.
Role of the proxy servers in security:
¨ Prevents direct access to the webserver // Sits between user and webserver
¨ If an attack is launched it hits the proxy server instead // can be used to help prevent
Denial of Service attacks // help prevent hacking of webserver
¨ Used to direct invalid traffic away from the webserver
¨ Traffic is examined by the proxy server // Filters traffic
¨ If traffic is valid the data from the webserver will be obtained by the user
¨ If traffic is invalid the request to obtain data is declined
¨ Can block requests from certain IP addresses

- 47 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Encryption
¨ Scrambling the data to make it meaningless
¨ Uses encryption key to encrypt the data using encryption algorithm
¨ Uses decryption key to decrypt the data
¨ Data before encryption is called plain text
¨ Data after encryption is called cypher text

There are two types of encryption:


¨ symmetric
¨ asymmetric or public key.
Symmetric encryption
¨ SYMMETRIC ENCRYPTION is a secret key which can be a combination of characters.
¨ One key is needed to encrypt a message and the same key is needed to decrypt a
message.
Asymmetric encryption
¨ The encryption key is different than the decryption key
¨ public key (encryption key) is made available to everybody
¨ private key (decryption key) is only known by the computer user.
Steps taken by web browser and server to initial secure connection and encryption
¨ The user's browser sends a request so that it can connect with the required website
which is secured by SSL
¨ The web server responds by sending a copy of the SSL certificate to the users web
browser
¨ if the browser can authenticate the certificate, it sends back a message back to the web
server to allow communication to begin
¨ Once this message is received the web server acknowledges the web browser, and the
SSL-encrypted two-way data transfer begins
¨ The web browser uses a public key to encrypt the message
¨ The web browser send the message over the Internet
¨ The webserver decrypts the message using the private key

Security protocols
¨ Secure Sockets Layer (SSL)
¨ Transport Layer Security (TLS).
SECURE SOCKETS LAYER (SSL)
¨ is a type of protocol (a set of rules used by computers to communicate with each other
across a network).
¨ This encrypts the data.
¨ When a user logs onto a website, SSL encrypts the data – only the user’s computer and
the web server are able to make sense of what is being transmitted.

- 48 -
Paper 1 Theory Summary
OL CS Gamal Orphy

¨ A user will know if SSL is being applied when they see https or the small padlock in the
status bar at the top of the screen.

TRANSPORT LAYER SECURITY (TLS)


¨ TLS is a form of protocol that ensures the security and privacy of data between devices
and users when communicating over the internet.
¨ It is essentially designed to provide encryption, authentication and data integrity in a
more effective way than its predecessor SSL.
TLS is formed of two layers:
¨ handshake protocol: this permits the website and the client (user) to authenticate each
other and to make use of encryption algorithms
¨ record protocol: this part of the communication can be used with or without encryption
What are the main differences between SSL and TLS since they both
effectively do the same thing?
¨ It is possible to extend TLS by adding new authentication methods.
¨ TLS can make use of SESSION CACHING which improves the overall performance
compared to SSL
¨ TLS separates the handshaking process from the record protocol (layer) which holds all
the data.
¨ TLS has a longer encryption key than SSL

Hashing
Hashing can be used for checking data integrity (data sent without corruption)
¨ The sender sends the type of hashing algorithm used to the recipient
¨ The sender puts the data into the hashing algorithm to produce a sender’s version of
hash code
¨ The sender sends the data and the hash code
¨ The recipient puts the data into the hashing algorithm to produce recipient version of
hash code
¨ The recipient compares both sender and recipient hash codes
¨ If both hash codes are the same, then data is sent without corruption

Authentication
¨ AUTHENTICATION is used to verify the identity and that the data comes from a trusted
source.
¨ Username and password matching the username
¨ Biometrics, biological measurements that are compared with stored measurements

- 49 -
Paper 1 Theory Summary
OL CS Gamal Orphy

¨ Digital signature (to prove identity of a sender):


o Sender encrypts message using their private key (to produce the digital
signature)
o Sends the message with the digital signature
o The recipient decrypts digital signature with sender’s public key
o Compares both the message received with decrypted signature
o If matches data verified it is sent from the authentic sender

Explanation of how biometric system uses biometric device to control entry to the
office:
¨ Suitable biometric device, such as fingerprint scanner/retina/eye/iris scanner/face
recognition/voice recognition/palm scanner // description of use e.g., use fingerprint on
device
¨ Sensor (in biometric device) captures/takes data/readings (of user)
¨ Data/readings are converted from analogue to digital (using ADC)
¨ Data/reading sent to the microprocessor
¨ Data/readings compared to stored values/data
¨ if data/readings match user can enter
¨ if data/readings do not match user is declined entry // user asked to try again
¨ alert may be sent to security // alarm may sound
Improving security of a website
¨ Make the password require more characters
¨ Makes the password harder to crack/guess
¨ More possible combinations for the password
¨ Make the password require different types of characters
¨ Makes the password harder to crack/guess
¨ More possible combinations for the password
¨ Two-step verification
¨ Adds an additional level to hack
¨ Have to have the set device for the code to receive it
¨ Drop-down boxes // onscreen keyboard
¨ To prevent passwords being obtained using keylogger
¨ Request random characters
¨ Won’t reveal entire password
¨ Set number of password attempts
¨ Will lock account if attempting to guess multiple times

- 50 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Computer ethics
¨ Computer ethics is a set of principles set out to regulate the use of computers.
¨ Three factors are considered:
¨ Intellectual property rights – these covers, for example, copying of software without the
permission of the owner
¨ Privacy issues – these covers, for example, hacking or any illegal access to another
person’s personal data
¨ Effect of computers on society – this covers factors such as job losses, social impacts and
so on.

Plagiarism
¨ this is when a person takes another person’s idea/work and claims it as their own.
¨ It is essential that some acknowledgement is made so that the originator of the idea is
known to others.
¨ This can be done by a series of references at the end of a document or footnotes on
each page where a reference needs to be made.
Copyright
¨ Legal protection for a person and software developers
¨ against illegal use and distribution of their work

Free software, freeware and shareware


Free software or Open Source
¨ The source code is released with the program
¨ Users can change the source code to enhance the program
¨ Users have the freedom to run, copy, change or adapt free software
¨ Users can re-release the program under the same terms (called COPYLEFT)
¨ The software can be free of charge or requires a fee.
¨ A user of the software doesn’t need to seek permission to do any of the above actions
since it isn’t protected by any copyright restrictions
Freeware
¨ There is no charge for the software
¨ Freeware is subject to copyright laws and users are often requested to tick a box to say
they understand and agree to the terms and conditions governing the software
¨ Modification, re-distribution or reverse engineering of the software is prohibited

- 51 -
Paper 1 Theory Summary
OL CS Gamal Orphy

Difference between Freeware and Free Software:


¨ Freeware needs owner’s permission to share/copy/amend whereas free software can be
shared/copied/amended without permission
¨ Freeware the owner retains copyright / is subject to copyright whereas free software the
owner releases copyright/ is not subject to copyright
¨ Freeware is normally provided without a fee whereas free software a fee may be charged
¨ Freeware is distributed without the source code whereas free software is distributed with
the source code
¨ Freeware can be restricted in use e.g., non-commercial whereas free software can be
used without restriction
Shareware
¨ Shareware is commercial software which is made available on a trial basis.
¨ Users get a free trial or limited access for set time
¨ Users do not have access to the source code
¨ At the end of the free trial period, users will have to pay and register to continue using
the software
¨ The trial version of the software is missing some of the features found in the full version,
and these don’t become available until the fee is paid
¨ This type of software is fully protected by copyright laws and a user must make sure they
don’t use the source code in any of their own software
¨ Permission needs to be obtained before this software is copied and given to friends,
family or colleagues

- 52 -
Paper 1 Theory Summary

You might also like