You are on page 1of 31

7.

For the example, for a step tracking app:

- Input a 3-axis accelerometer senses my steps

- Process totals the steps for each day

- Output the total number of steps taken so far

- Storage the number of steps taken each day

7.2

- Check if alarm set

- Compare current time and real time

- Set flag when times match

What’s an algorithm?

“A specific sequence of steps that can be followed to complete a task”

A computer program is an implementation of an algorithm

An algorithm is not a computer program itself.

How to produce algorithm?

In the exam you need to be able to:

- Create

- Interpret

- Correct

- Refine

Flowcharts: A flowchart is a method of representing the sequences of steps in an algorithm in the form
of a diagram

Pseudocode: A text based alternative of representing the sequences of steps in an algorithm

Writing pseudocode allows us to lay down the logic of a problem in a “almost like a real code” way
without having to worry about the actual strict rule.

Note: Use all the commands in capital

Programming

1.Programming concepts

2. Data types
3. Variable constant

4. Input & Output

5. Procedures & Functions

6. Array (data structure)

1. Programming concepts

- data use – variable, constants and arrays

- sequence – order of steps in a task

- selection – choosing a path through a program

- iteration – repetition of a sequence of steps in a program

- operator use – arithmetic for calculations, logical and Boolean for decisions

2. Data types

Interger – A signed whole number

Real – A signed number with a decimal point

Char – A single character

String – A sequence of zero and more characters

Boolean – The logical values TRUE and FALSE

Date – A date consisting of day, month and year, sometimes including a time in hours, minutes and
seconds.

3. Variables & Constants

8.1 print(“Hello World.”)

DECLARE radius, length: REAL

CONSTANT PI = 3.142

Python

# Python does not require separate declarations

#...values are simply assigned as required

# Python does not differentiate between constants and variables

Cccdc number = int(input(“Please enter the number:”))

Cscdcdc if number >= 100:

Print(“Wonderful achievement!”)
Else:

Print(“You have to try harder!”)

What is a data structure?

- Data structures are the way we are able to store and retrieve data

List/Array

- An array is a data structure that stores a list of values of the same data type

- An array is a data structure with a fixed size for storing multiple values for the same data type

FOR I  1 to 300

INPUT Name (I)

Next I

To read values/names into an array Number at index I

DECLARE StuName STRING

FOR I  1 – 20

INPUT Name (I)

Next I

DECLARE Count: INTEGER

DECLARE Score: ARRAY [1:200] OF INTEGER

FOR Count  1 TO 200

INPUT Score[Count]

DECLARE Count: INTEGER

DECLARE Score: ARRAY [1:200] OF INTEGER

Count  1

WHILE Count  200

INPUT Score[Score]

Count  Count + 1

ENDWHILE

DECLARE Count: INTEGER


DECLARE Score: ARRAY [1:200] OF INTEGER

Count  1

REPEAT

INPUT Score[Count]

Count  Count + 1

UNTIL Count = 200

DECARE Name: ARRAY [1000] OF STRING

DECLARE Salary: ARRAY [1000] OF REAL

DECLARE index: INTEGER

FOR index  1 to 1000

OUTPUT “Enter name and salary”

INPUT EmpName [index]

INPUT EmpSalary [index]

NEXT

FOR index  1 TO 1000

PRINT EmpName [index]

NEXT

OUTPUT Employee[1], Employee[20]

MyList=[]

For counter in range(10):

MyList.append (int(input(“Enter next value”)))

Print(MyList)

MyTable=[]

For ColumnCounter in range(3):

Column=[]

For RowCounter in range(10):

Column.append(int(input(“Enter the next value”)))

MyTable.append(Column)

Print(MyTable)
Numbers = [2, 5, 3, 6, 2, 3, 6, 4]

DECLARE total: INTEGER

total  0

LengthofArray = len(8)

FOR counter 0 to lengthOfNumbers

Total  total + numbers (counter)

NEXT

Numbers = [2, 5, 3, 6, 2, 3, 6, 4]

Total = 0

For I in range ((len(numbers))):

Total=total + number(i)

Print (total)

Names = [“John”, “Judy”, ]

Total = 0

For I in range ((len(numbers))):

Total=total + number(i)

Print (total)

INPUT Distance

INPUT Passengers

Extra = Distance – 1

CostofExtra = Extra * 2

Cost = 3 + CostofExtra

IF Passengers > 4 THEN

Surcharge = Cost/2

Cost = Cost + Surcharge

END IF

OUTPUT Cost
Success = False

While success == False

Teddy_bears = input(“Enter the number of teddy bears”)

Try: int(Teddy_bears)

Except: print(“Wrong data type! Try again”:)

Success = False

While success == False

Hours = input(“Enter the number of hours”)

Try:

Hourse = int(hours)

Success = True

Except: print(“Wrong data type! Try again”:)

PerTeddy = 2*TeddyBears

PerHour = 5*Hours

Print (“1. New Game”)

Print(2. Save Game”)

Print(3. Play Game”)

Choice = 0

While choice < 1 or choice > 3:

Choice = int(input(“Enter choice:”))

Normal inputs: Data should be accepted without causing errors

Abnormal inputs: Data should be rejected by the program – includes no input when one is expected

Boundary inputs: Data is the largest/smallest acceptable value as well as the corresponding
smallest/largest rejected value

Extreme data: Data that is the largest/smallest acceptable value

VALIDATION

Input validation: means checking that data input by the user meets specific criteria/rules before
processing

Type check: The input is of the correct data type – e.g., int, real, str.
Range check: The input is within a predetermined range – e.g., between 1 and 2

Presence check: All required data has been entered – e.g., reject blank inputs

Format check The input is in the correct format – e.g., DD/MM/YYYY

Length check: The input includes the correct/minimum/maximum numbers of characters – e.g.,
password

By using input validation, a programmer can:

- Make their program more robust and user-friendly

- Prevent further errors occurring later in the algorithm.

UNIT 1, 7, 8

Sound representation in data

Sample resolution

Changing bit rates, sound rates

Image representation

Bit map images

Image resolution

Calculating file size of an image in kilobytes, megabytes, gibibyte, mibibyte, kibibyte

Kilo  1000

Mega  1,000,000

Giga  1,000,000,000

Kibi  2^10 bytes

Mibi  2^20 bytes

Gibi  2^30 bytes

File compression

Lossy and lossless compression

One algorithm for lossless compression

RLE – run length encoding

Logical shift (right and left)

Adding binary number

Two complement
Negative representation

Define packet switching

Cyclic redundancy check

Data skewing

USB – Universal Serial Bus

Data packet

Parity bit

Pseudocode

Data transmission – Matching definition with key term

Data validation (6 techniques)

One dimension arrays

Verification check

Upper case (7 techniques)

DECLARE age: INTEGER


DELCARE height: INTEGER

IF age > 7 OR < 12 THEN

OUTPUT Valid age to go to the fairground ride

ELSE

OUTPUT Invalid age to go to the fairground ride

IF height > 110cm and < 150cm THEN


OUTPUT Valid height to go to the fairground ride

ELSE

OUTPUT Invalid height to go to the fairground ride

END IF

END IF

DECLARE password INTEGER

OUTPUT Please enter the password

REPEAT
INPUT password

IF LENGTH (password) < 8 OR > 12 THEN

IF LENGTH(password) > 12

THEN

OUTPUT “Password is too long, please re-enter”

ELSE

OUTPUT “Password is too short, please re-enter”

END IF

END IF

UNTIL LENGTH(password) <= 8 AND LENGTH(password) >= 12

VERIFICATION

Validation: ensures that only reasonable data is acceptable

Verification: ensures that data is not changed, either accidentally or purpose, as it is entered

Double entry verification is a process whereby important data has been entered twice, sometimes by
different people. The system compares both entries to check they are the same before accepting the
data

A screen check or visual check is a manual check performed by the user who is entering the data

EX: email, SMS, Confirm password

Entering a telephone number: the number needs to be the one that is required as well as having the
necessary characteristics. DOUBLE ENTRY + SMS

Entering a pupil’s name: the name needs to be the one that is associated with the pupil

Entering a part number in the for XXX999, when X must be a letter and 9 must be a digit: a part number
could have the required format but not be for the part intended

IDENTIFYING ERRORS AND SUGGESTING FIXES

Syntax errors: are errors that break the grammatical rules of the programming language and prevent it
from being run or translated

Logic errors: are errors that produce unexpected output but won’t stop the program running

With just two states, electronic components are:

- Easier to manufacture

- Therefore cheaper production


Number system

Hexadecimal – easier to use

Valitdation and verification (describe with examples)

Piece of algorithm and purpose

Page 33 – Pseudocode command

Sound file: Sample rate x Duration x Resolution

Compression reduces the size of a file so it takes up less space, helping to maximize the amount of data
we can store in our storage

Homework:

def km2miles(num):

return f"{num} km is converted to {num* 0.6} miles"

def miles2km(num): return f"{num} miles is converted to {num* 0.6} km"

success = False while success == True:

try: option = int(input("""Choose an option to convert: 1. Km to miles 2. Miles to km Your option: """))

num = int(input("Enter distance in numbers: "))

if option == 1: print(miles2km(num)) success = True elif option==2:

print(km2miles(num))

success = True

else:

raise ValueError

except ValueError:

print("Please choose option 1 or 2 and only numbers are allowed!"

DECLARE Testscores: ARRAY[0-9] OF INTEGER


FOR Counter  0 to 9

OUTPUT “Enter the next text score”

INPUT TestScores[Counter]

NEXT Counter

TestScores = []
=[47,56,12,…]

DECLARE Testscores: ARRAY[0:9, 0:1] OF INTEGER

FOR CounterX0 TO 9

OUTPUT “Student”, CounterX + 1

OUTPUT “Enter low score followed by high score”

FOR CounterY  0 TO 1

OUTPUT “Input score”

INPUT “TestScores(CounterX,CounterY”)

NEXT CounterY

NEXT CounterX

MyList=[]

For counter in range(10):

MyList.append(int(input(“Enter next value”)))

Print(MyList)

DECLARE Testscores: ARRAY[0:9, 0:1] OF INTEGER

FOR CounterX0 TO 9

OUTPUT “Value”, CounterX + 1

OUTPUT “Enter low score followed by high score”

FOR CounterY  0 TO 1

OUTPUT “Input score”

INPUT “TestScores(CounterX,CounterY”)

NEXT CounterY

NEXT CounterX

Standard methods of a solution

- Totalling

- Counting

- Finding maximum, minimum and average values


v.bulentk@gmail.com

- Searching using a linear search

- Sorting using a bubble sort

Totalling

Totalling refers to maintaining a total that the value is added to

Counting: Keeping count of the number of times a particular action is performed

Maximum, minimum and average

Being able to to find the largest and smallest values in a data set is another common technique used in
algorithms

Following on from the totaling method we looked at earlier, it is also very common to calculate the
average (mean) of a set of values

- Variable declared outside of subroutines (procedures and functions) are global variables

- Global variables exist in memory for the entire time the program is running

- Global variables are accessible from any subroutine, but this is considered bad practice and should be
avoided

Benefits of global variables:

- Memory usage is consistent and known in advance

- No additional execution time for reserving and returning memory

Drawbacks:

- Conflicts with variables that share the same name in other parts of the program makes writing
programs in teams and testing more difficult.

- Memory inefficient because the variables exist (and take up space In memory) while the program is in
use

It’s is better to pass in copies of global variables to use as parameters when calling subroutines

TOTAL = TOTAL + value

Routines: Ready complied and tested programs that can be run when needed

- They are typically grouped together into software libraries

Some programming in the Windows operating system can call Dynamic Link Libraries (DLL)

Benefits:
- Quick and easy to use and hook into your own code

- Pre-tested, so you can be relatively sure they are already free from errors

- Pre – complied, so they are typically optimized to run quickly

Drawbacks:

- Adding functionally or making specific tweaks can be difficult – or impossible

- Sometimes you are black-boxed from the actual implementation.

- You have to trust the developers will continue to maintain the library

MOD: returns the remainder of an integer division

DIV: Returns the quotient(the whole number part) of an integer division

Round: Return a value rounded to a specified number of decimal places

Random: Returns a random number

MOD: Value = 10 % 3

DIV: Value = 10//3

ROUND: Value = divmod(10,3)

RANDOM = Value = round(3.143278 , 2)

Import random

Value = random()

Value 1  1

Value 2  3

Value 3  6.97

A = int(integer(“Please enter the value”))


B = int(integer(“Please enter the value”))

Print(A%B)

Print(A//B)

import random:

print(random(randint.(100 , 300))

import random
a = random.randint(100,300)

b = random.randint (100,300)

print (a%b)

print (a//b)

import = int(random.random() * 200 + 100)

print(c, “is a random number between 100 and 300”)

LINEAR SEARCH

Starting from the beginning of a data set, each item is needed to checked in turn to see if it is the one
being searched for

A linear search:

- Doesn’t require data to be in order

- Works on any type of storage device.

- Is efficient for small data sets

- Is very efficient for large data sets

FUNCTION linearSearch(items, item_to_find) RETURNS STRING

DECLARE index: INTEGER


DECLARE found: BOOLEAN

Index  0

Found  False

WHILE (found = FALSE) AND (Not end of data set) DO

IF items[index] = item_to_find

THEN

Found  True

ELSE

Index  False

ENDIF

ENDWHILE

IF found  True

THEN
RETURN “Item found at position”, index

ELSE

RETURN “Item not found”, index

ENDIF
ENDFUNCTION

Bubble sort

- Sorts and unordered list of items

- Compares each item with the next and swaps them if they are put in order – in effect bubbling the
largest (or smallest) item up to the end of the list

- Finishes when no more swaps need to be made

- The most inefficient of sorting algorithms but very easy to implement

- Popular choice for very small data sets

FUNCTION bubbleSort(items)

DECLARE n: INTEGER
DECLARE swapped: BOOLEAN

N  items, length

Swapped  True

WHILE n > 0 AND swapped DO

Swapped  False

Nn–1

FOR index  0 TO n – 1

IF items[index] > items[index+1]

THEN

Swap(items[index], items[index+1]

Swapped  True

ENDIF

NEXT index

ENDWHILE

RETURN index

ENDFUNCTION
TRACE TABLE

Trading execution: A vital skill for understanding program flow and testing the accuracy of an algorithm
for logic

It involves examining a printed extract of program code and running thorough the program

- Take each line at a time and write the current state of each variable in a trace table

- Note down any output the program produces

- Each variable present in the program should have its own column in the trace table

- A new row should be added

MAINTAINABILITY

To make your code as easy to read and maintain as possible, make sure you use:

Comments to divide the program into sections and explains:

- The program’s purpose

- Sections of code – typically, selections, iterations and procedures.

- Any unusual approaches taken

- While space to make program sections easier to see

- Indentation for every selection and iteration branch

- Descriptive variable names, explaining each variable’s purpose with a comment when it is declared

- Procedures and/or functions to:

- Structure code

- Eliminate duplicate code

- Constants – declared at the top of the program

The use of basic file handling operations:

OPENFILE <File identifier> FOR <File mode>

READ for data

DECLARE LineOfText: STRING

OPENFILE FileA.txt FOR READ


OPENFILE FileB.txt FOR WRITE
READFILE FileA.txt, LineOfText

WRITEFILE FileB.txt, LineOfText

CLOSEFILE FileA.txt
CLOSEFILE FileB.txt

The stages of writing data to a file are:

- Open the file for creating/overwriting or appending to a file

- Write the data to the file

- Close the file

The stages of reading data from a file are:

- Open the file for reading data

- Set a Boolean variable to false to indicate the end of file has not been reached

- While the end_of_file flag is false and the search item has not been found

- Read the data from the file

- If the data matches what is being searched for, assign the data to variables or output

- Check if the end of the file has been reached and if it has, set the Boolean variable to true

- Close the file

Hybrid paper:

- Library routines and why use them

- Programming concepts:

- Sequence

- Selection

- Iteration

- Totalling

- Counting

- Writing pseudocode algorithms for a giving scenario using iteration and selection

- Local and global variables

- Arrays

- Describing purposes of an algorithm

- Test data (normal, erroneous and extreme)

- Validation and verification with examples

- Creating trace table from a given algorithm


- Binary and hexadecimal number systems

- Image representation and file size calculations in kB

- Check digit (calculations from a giving algorithms)

- Types of error that check digit can detect

TEST PAPER, FLASHCARDS, VIDEO, PRESENTATION, VIDEO

Boolean Expression: D = (NOT A) OR B

Boolean Expression E = (A OR B) OR C

DESIGNING A LOGIC CIRCUIT

A wind turbine safety system monitors:

- the speed of the turbine (S)

- the temperature of the bearing

- the velocity of the wind

Shutdown conditions:

- S <=1000 rpm and T > 80 degrees

- S >1000 rpm and W >120kph

- T <=80 degrees and W > 120kph

Description Parameter Value


Turbine speed S [0,1]
Bearing temperature T [0,1]
Wind velocity W [0,1]
Steps:

1. Define logic statements from the problem


2. Generate a simple logic circuit for each logic statement
3. Combine the simple circuits into a system circuit
4. Create a truth table for the system circuit

S = 0 AND T = 1

S = 1 AND W = 1

T = 0 AND W = 1

3.1 Computer architecture

THE ROLE OF THE CENTRAL PROCESSING UNIT (CPU)

HDD  Magnetic  North pole(1) and South pole(0)


SSD  Switch  ON(1) and OFF(0)

Optical  Pits(1) and Land(0)

CPU: An electronic device that takes input, processes data and delivers output.

What is a microprocessor?

As with many areas of computer science, processing involves different terms that mean very similar
thing.

- Microprocessor

They are interchangeable.

CPUs/microprocessors are typically installed as an intergrated circuit.

The role of the CPU:

- take in data and instructions

- processes them and produces output

The terms CPU and microprocessor essentially mean the same thing

Control unit:

- Coordinates all CPU activities

- Directs flow of data between the CPU and other devices.

- Coordinates and communicates with all parts of the CPU (orange lines).

Program counter (PC):

- Holds the address of the next instruction to be executed.

- It could be the next instruction in a sequence of instruction s or the address to jump to if the current
instructions us a command to jump or branch – this would be copied from the current instruction
counter

Memory address register (MAR):

- Hold the address of the memory location that data or an instruction us to be fetched from OR written
to

- Sends

Memory data register (MDR):


- Used to temporarily store data that is read from or written to memory.

- All data to and from memory must travel down the data bus and pass through the MDR.
Opcode  What to do?

Operand  What to do with?

Current instruction register (CIR)

- Holds the current instruction being executed

- If the MDR is holding an instruction, it is copied to the current instruction register

Arithmetic logic unit (ALU):

- Arithmetic operations on fixed and floating-point numbers:

+ ADD

+ SUBTRACT

+ MULTIPLY

+ DIVIDE

- Right and left bitwise shift operations:

- Boolean logic operations:

+ Comparison

+ AND

+ OR

+ NOT

+ XOR

Accumulator (ACC):

- One of several general – purpose registers in modern CPUs:

- Often stores data or control information

- The results of calculations carried out by the ALU can be temporarily stored here

Buses:

Address bus: Carries memory addresses that identify where data is being read from or written to.

Data bus: Carries the binary 1s and 0s that make up the actual information being transmitted around the
CPU/computer.

- Control bus: Carries commands and control signals to and from every other components of the
CPU/computer

The CPU consists of the following components:


- Arithmetic logic unit (ALU): Perform calculations and logical decisions

- Control unit (CU): Sends signals to control how data moves around the CPU

- Buses: A collection of wires through which data and instruction transmitted from one component to
another

- Address bus: Unidirectional – carries the addresses that data needs to be written to or read from

- Data bus: Bidirectional – carries actual data or instructions

- Control bus: Bidirectional – carries command and control signals telling components when they should
be receiving reads, writes, etc.

- Registers: Tiny, super-fast pieces or on-board memory inside the CPU, each with a very specific
purpose.

+ Program counter –

Key characteristics:

- Central processing unit (CPU)

- Control unit

Fetch stage: The program counter is checked for the memory address of the next instruction to be
executed.

The memory address register(MAR) fetches the instruction from the main memory (RAM) and brings it
into the memory data register

1a. data, address, control

1b.

Data: carries actual data or instructions

Control bus: carries command and control signals telling components when they should be receiving
reads, writes, etc.

Address bus: carries the addresses that data needs to be written to or read from.

1c.

- Increasing bus width (data and address buses) increases the performance and speed of a computer
system

- Increasing clock speed will potentially increase the speed of a computer.

- Wider control bus would have little, if any, effect on performance

1. fetches

2. current instruction register


3. PC

4. MAR

5. address bus
6. MDR

7. decoded

8. executed

9. control signals

10. control bus

11. ALU

12. ACC

FETCH – DECODE – EXECUTE CYCLE

The purpose of the CPU is to fetch, decode and execute instructions – it does this billions of times a
second.

Fetch:

1. The program counter is checked for the address of the next instructions to be executed
2. The contents of the program counter are copied into the memory address register
3. The program counter is incremented
4. The control unit sends a memory read request to main memory down the control bus
5. The address is sent down the address bus from the memory address register to main memory
6. The contents of main memory are sent down the data bus into the memory data register
7. The contents of the memory data register are copied into the current instruction register

Decode:

8. The instruction in the current instruction register is inspected and decoded to work out what
needs to be done.

Execute:

9. The instruction is carried out – this could be:


a. Going back to main memory and fetching data
b. Performing a calculation
c. Storing information back in main memory

PRIMARY STORAGE, RAM AND ROM

Primary storage: RAM, ROM, registers and cache

Secondary storage: Holds the operating system, programs and data when they are not in use

Tertiary: used for backing up and achieving large amount of data


Primary storage:

Volatile – all except ROM

Relatively small capacity

Faster access

Secondary:

Non-volatile

Much larger capacity

Slower access

READ-ONLY MEMORY (ROM)

- Small piece of read-only memory located on the motherboard

- Non-volatile

- Contains startup instruction for the computer (bootstrap)

RANDOM ACCESS MEMORY (RAM)

- Temporary storage of instructions and data

- Holds information being executed by the processor

- Volatile

- Much faster than the hard disk

+ When a computer system first receives power, there are no instructions in the CPU

+ The system needs to load the operating system so it can start functioning

+ However the operating system is stored on permanent secondary storage – the hard drive

+ The solution to this problem is ROM

+ A set of intitial startup instructions called the bootstrap is placed on the ROM during manufacture

+ ROM is non-volatile, which means that the data its contains is retained when the computer is powered
off

+ The first instruction in the bootstrap tells the computer to perform a power on self-test (POST)

+ The POST signals all connected

+ As the computer is now aware of the hard drive, it can load the operating system into RAM

+ The process of booting up the operating system can now begin

Primary storage: Any storage that can be directly access by the CPU – this includes:
- Random access memory (RAM)
- Read-only memory (ROM)

- Registers and cache

This type of storage holds the data and instructions that the CPU needs to access while the computer is
running. The CPU can access data from primary storage much faster than secondary storage

RAM:

- Holds program and data currently in use by the CPU

- Volatile – contents are lost when the computer is powered off

- Read and write

- Larger than ROM

Types of data:

- Currently running data

- Currently running software

- Currently running instructions

- Currently running parts of OS

ROM:

- Holds startup instructions for the computer, known as the bootstrap

- In embedded systems, programs may be stored in ROM

- Non-volatile – contents are retained when the computer is powered off

- Read-only

- Smaller than RAM

Q1. RAM - Holds program and data currently in use by the CPU

Q2.

RAM is non-volatile, ROM is volatile.

RAM is larger than ROM

RAM can read and write, ROM can only read

RAM holds data and instructions, ROM holds bootstrap.

RAM used to store data, files, programs, part of OS currently in use, an increase in the amount of ROM
has no effect on computer performance

RAM: Holds program and data currently in use by the CP


ROM: used by a PC to store the contents of an application when the computer is running

RAM: used by both OS and applications software, when phone switched on, it pulls OS and app data
from solid state memory to allow it to function; user’s data

UNIT 1: Sound representation, image representation, file size calculations in gibibyte, units conversion,
data compression, run-length encoding, binary shift, two complements

UNIT 3: everything from unit 3

UNIT 2: everything, identify key-terms with descriptions from unit 2, data packets

UNIT 10: Logic circuits, truth table, trace table, identify errors in algorithms, functions of CPU
components, fetch-decode-execute.

Virtual memory:

- Exists only on hard disk

- Virtual memory is needed when there is not enough physical RAM available to store open programs

- Virtual memory is held on the hard disk

- Programs are transferred out to virtual memory from RAM when they are not currently being executed

- Programs are transferred back to RAM from virtual memory when they are needed

Cloud storage:

- With the ever-increasing bandwidth capabilities of fibre, optic and wireless 4G and 5G, we are
increasingly turning to cloud storage.

- The concept of storing and retrieving data virtually via the internet instead of a local storage device.

Advantages:

- data can be accessed at any time from any device

- providing it has internet access

- data can easily be shared without physical transfer

- easy collaboration with shared documents

- storage considered to be limitless from the user’s perspective

Disadvantages:

- can be expensive

- slow to access if connectivity is low

- no internet connection means no access

All files kept in cloud storage are still stored on physical storage media in a remote location
Cloud storage warehouses often have thousands of servers containing hard drives

2a. Cloud storage: The concept of storing and retrieving data virtually via the internet instead of a local
storage device.

2b.

- Virtual memory is needed when there is not enough physical RAM available to store open programs

- Virtual memory is held on the hard disk

- Programs are transferred out to virtual memory from RAM when they are not currently being executed

- Programs are transferred back to RAM from virtual memory when they are needed

3a.

RAM:

- temporary memory device

- volatile memory

- can be written to and read from

- used to store data, files, programs, part of OS currently in use

ROM:

- permanent memory device

- non-volatile memory

- data stored cannot be altered

- always used to store BIOS and other data needed to start up.

3b.

RAM:

5b.

- 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

5c. The longevity of the technology (although this is becoming less of an issue). Most solid state storage
devices are conservatively rated at only 20GB of write operations per day over a three-year period

EMBEDDED SYSTEMS

98 percents of processors are manufactured as components of embedded systems.


Other examples include:

- Hospital instruments

- Car engine management systems

- Digital clocks

Properties of embedded systems compared to general-purpose computers include:

- Low power consumption

- Small size

- Rugged operating system

- Low cost per unit

These benefits come at the cost of limited processing resources, making them more difficult to program
and interact with.

Embedded system are dedicated to a specific task – this means design egineers can optimise the system
to:

- Reduce the size and cosr

Embedded system: A computer system with a dedicated system within a larger mechanical system

Properties of embedded systems compared to general-purpose computers include:

- Low power consumption

- Small size

- Rugged operating system

- Low cost per unit

Examples of embedded systems:

- Traffic lights

- Domestic appliances

- Factory equipment

- Factory equipment

- Engine management systems

- Hospital equipment

THE COMMON CHARACTERISTICS OF CPUS

Factors affecting speed


Power of the engine

Tyres

Weather conditions

Aerodynamics

Clock:

- The speed measured in herts(Hz), number of cycles per second

- Modern processors operate at billions of cycles per second – or gigahertz

Cache size:

- Temporary storage of data and instructions being read to and written from

- Located on or near the CPU

- Stores copies of recent data and instructions

- Much quicker to access than RAM

Number of cores:

- In very simple term, a core is a complete copy of a CPU

- A quad core processor would have four separate processing units, each with its own:

+ Registers

+ ALU

+ Accumulator

+ Control unit

- CPUs with multiple cores have more power to run multiple programs at the same time.

- Doubling the number of cores doesn’t simply double the overall speed

- CPU cores communicate with each other, which takes time.

- Many program are not designed to make use of multiple cores.

Exercise 3.2

1a. Clock:

- The speed measured in herts(Hz), number of cycles per second

- Modern processors operate at billions of cycles per second – or gigahertz

Cache size:
- Temporary storage of data and instructions being read to and written from

- Located on or near the CPU

- Stores copies of recent data and instructions

- Much quicker to access than RAM

Number of cores:

- In very simple term, a core is a complete copy of a CPU

- A quad core processor would have four separate processing units, each with its own:

+ Registers

+ ALU

+ Accumulator

+ Control unit

- CPUs with multiple cores have more power to run multiple programs at the same time.

- Doubling the number of cores doesn’t simply double the overall speed

- CPU cores communicate with each other, which takes time.

- Many program are not designed to make use of multiple cores.

Increasing the width of the address bus and width of the data bus

Increasing clock speed but care needed to avoid over-clocking

Use of larger cache memories (uses static RAM) which have faster data access time than normal RAM
(which is dynamic)

Using dual core or quad core processors; but doubling number of cores doesn’t double processor
performance since the CPU needs to communicate with each core which uses up time.

1b. Every type of processor has its own specific lists of commands that it can understand, called an
instruction set.

Instructions are a set of operations which are decoded in sequence

Each operation is made up of an opcode (which indorms the CPU about what operation needs to be
done) and an operand (data which needs to be acted on/register)

Limited number of opcodes exist and this is known as an instruction set

Instruction sets are low level language instructions which instruct the microprocessor how to carry out
the sequence

2a. location of the vehicle, destination


- Destination addess input

- Other factors (e.g. avoiding toll roads) are input

- Data from satellites, which gives the location of three or four satellites together with very accurate
timings

- Sat Nav computers uses satellite data to calculate the position of a car on the stored maps

- This combination allows accurate tracking of the vehicle on stored roads

Output: Map, route, instructions.

- Use of satellite or cellular network used to download the latest amp updates/software updates

- If the Sat Nav is a portable unit, it can be connected to a computer via network

How to guide a group discussion on art:

- Allow everyone plenty of time to look

- Start to question people about what they are looking at

- Ask people to explain why the artist might have done something

- Ask them to try to connect with what they see

- Encourage people to extend their responses

Examples of follow-up activities to do with your art club:

- design a postcard

- produce a leaflet advertising the exhibition

- write a story about a character in a painting

- role-play an interview with an artist.

a. Aid to Scouting

b. On Brownea Island

c. Chile

d. Rosebuds

e. two thirds

f. Indonesia

g. one word one promise

h. A flame was lit at Baden-Powell’s grave in Nyeri


i. Chelmford

j. France

k. Troop Beverly Hills

l.

- Help young people achieve their full potential as they grow up

- The boys had the chance to enjoy the outdoors

- Help young people play useful roles in society applies equally to girls and boys

- Encourage their members to learn survival skills

You might also like