Computing OCR revision notes

  • Created by: Stanier
  • Created on: 21-05-17 10:29

CPU

The purpose of the CPU is to process information. Carries out instructions on the data it is given. The CPU follows three steps in order to process data: it is known as the Fetch-Decode-Executecycle.

Fetch: Copy memory address from the program counter to the MAR.  Copy instructions stored in the MAR address to the MDR.  Increase the program counterto point to the address of the next instruction ready for the next cycle.

Decode: The instruction in the MDR is decoded by the CU. The CPU may then prepare for the next step e.g. loading values into the MAR or the MDR.

Execute: The instruction is then performed. This could be load data from the memory.

1 of 13

CPU (Part 2)

The CPU has three main jobs:

      1.       Manages + monitors hardware on the computer to ensure the data goes to correct hardware.

      2.       Manages input and output signals.

      3.       Manages Fetch-decode-execute cycle.

        The performance of the CPU depend upon the clock speed(number of instructions a single processor core can carry out per second(measured in Hz)). It  also depends upon the amount of cores(the more cores, the more instructions can be carried out).

2 of 13

Memory

RAM holds a copy of data and instructions (program) being used. The CPU processes data faster than the RAM can supply it.

Cache is a few Mb of memory that sits inside of the CPU data access speed is equal to the CPU’s speed.

Efficient programs enable the CPU to store further instructions. Less efficient programs need to fetch instructions they need from the RAM one at a time.

Data is lost in the RAM after it has switched off. Data is saved to the ROM.

Virtual memory (Hard Disk) is used when the RAM is completely full and acts as Ram. Programs are transferred out to virtual memory from the RAM when they are not currently being executed. Programs are transferred back to the RAM from virtual memory when they are needed.

3 of 13

Cloud Storage

Cloud storage is defined as ‘the storage of data online in the cloud,’ where data is stored in and accessible from multiple distributed and connected resources that comprise a cloud.

Advantages:

Data is secure. Data can be accessed from anywhere in the world if there is an internet connection. No need to buy expensive storage devices. Users can collaborate with each other from around the world.

Disadvantages:

Needs an internet connection. Download and upload speeds are affected by the internet connection. Could be targeted by online hackers. less control if data is held by someone else. Storing some data online may breach the Data Protection Act.

4 of 13

Secondary Storage

There is optical storage, magnetic storage and solid state storage. Secondary storage is needed to store data that needs to be retained when power is turned off. This is non-volatile memory.

Optical disks-binary data stored as variations of height on the surface, in the forms of patterns or dots. When light is shined from an optical drive the light that hits a pit (a dent) reflects differently to a land (a flat spot), allowing the drive to detect the differences and read the data.

Magnetic storage devices-use read and write heads that contain electromagnets. A small part of the storage surface is either magnetised (1) or demagnetised (0) and the heads control this and read what state they are in.

Solid State-a form of flash memory that is non mechanical, meaning that there are no moving parts. They consist of circuits with complex logic gates that retain data which can then be changed.

5 of 13

Secondary Storage (part 2)

When choosing a suitable storage device things that need to be considered are:

  • Capacity- Magnetic storage has a larger capacity
  • Speed- Solid state storage is very fast
  • Portability- Optical and solid state storage are very portable
  • Durability- Solid state storage is more durable
  • Reliability-Solid state is reliable as it is non-mechanical
  • Cost-Optical and Magnetic storage is cheaper to buy.
6 of 13

Compression

Compression techniques are used to reduce the file size. There are two types of compression:

Lossy compression:

Permanently removes some data. Recreates the file using the remaining data and uses algorithms to guess the removed content. Uncompressed data is not the same as the original. Smaller file sizes but some loss of quality. Similarly coloured pixels are made the same.

Lossless Compression:

Finds groups of repeating data and records the data only once along with the number of times it was repeated. When data is uncompressed it is restored exactly as it was in the original form. Finds patterns in the original text. Encodes each pattern in a dictionary.

7 of 13

Compression (part 2)

Lossy advantages and disadvantages:

Smalller file sizes and download speeds are increased.

However it permanently removes some data. Uncompressed data is not the same as the original. there is some loss of quality. Data allowances are reduced.

Lossless advantages and disadvantages:

When data is decompressed it is restored exactly as it was in the original form. Encodes each pattern in a dictionary. Download speeds are increased. Smaller file size.

Reduces the image size. Larger file sizes than lossy compression.

8 of 13

Images

Bitmap images are made up of PICture ELement or PIXELS. A pixel is the smallest identifiable area of an image. Each pixel is a single colour and is given a binary value which represents that colour e.g. 11000000 might equal Red. A pixel’s colour can be changed by changing this value. More bits per pixel = more colour combinations

1bit = 2 Colours

2bits = 4 Colours

3bits = 8 Colours

4bits = 16 Colours

Image resolution- Resolution is the concentration of pixels within a specific area. The area is defined by the image width and height in pixels e.g. 2387x9768

9 of 13

Sound

Analogue sounds are continuous. Digital sounds are discrete. Sound is digitilised by repeatedly measuring and recording the sound wave. Microphones convert Analogue to Digital. Speakers convert Digital to Analogue.

The number of bits (audio bit depth) used to record each measurement is known as the resolution. More bits used per sample means the height of the sound wave is more accurately measured, this increases the file size. The greater the frequency, the greater the accuracy and file size.

Lossy compression removes the sounds in the frequency ranges that we can't easily hear. It leaves out some data, this can affect the sound quality. Lossless compression leaves out repeated data and makes a note of how many times it is repeated as 5x5 uses less space than 5+5+5+5+5.

.WAV-uncompressed .FLAC & .M4A-lossless compression .MP3-lossy compression

10 of 13

Arrays

Data structures allow us to store more than one item of data together under one identifier (name) which can then be used to access the individual items of data if needed. A list is a dynamic data structure whereas an array is static. This means the array cannot be added to but can be changed.

list=["Train", "Taxi", "Foot", "Car", "Bike"]

print(list)

position=list.index("Foot")

print(position)

input()

Computer will print the number 2

11 of 13

Variables

Computers store values in variables.

In order for the computer to understand our inputs, it needs to know what type of data our input is.

If a variable is to hold a word, we must tell the computer that the variable is to contain a string.

If a variable is to hold a whole number, we must tell the computer that the variable is to contain an integer – so it can do calculations.

If we don’t do this the program will not work.

12 of 13

Data Types

INTEGER- stores positive or negative whole numbers     e.g 17

REAL-Stores numbers that contain decimal places/values     e.g 5.67

CHARACTER-Stores asingle character which can be a letter, number or symbol   e.g £

STRING-Stores alphanumeric combinations and text  e.g Hello

BOOLEAN-Stores True or False only. This is sometimes taught as 1 or 0 where 1 is true and 0 is false   e.g True

13 of 13

Comments

S.Sage

Report

thanks! Great help

Similar Computing resources:

See all Computing resources »See all Computer systems resources »