Computer Science

?
  • Created by: Lady_bug
  • Created on: 02-05-18 09:21

Input and Output devices

The devices which are used to give data and instructions to the computer are called Input devices.

The devices which are used to display the results or information are called Output devices.

1 of 29

Storage Devices

A storage device is any piece of hardware capable of storing data either temporarily or permanently.

There are two types of storage devices used with computers: a primary storage device, such as RAM, and a Secondary storage device, like a Hard Drive. Secondary storage can be removable, internal, or external storage.

Storage devices can sometimes be reffered as: digital media, storage or storage media.

RAM - random access memory

ROM - read only memory

2 of 29

Data units

Name                                                             Equal to  Size in Bytes

Bit   1 bit                                                               1/8

Byte   8 bits                                                          1

Kilobyte   1,024 bytes                                         1,024

Megabyte   1,024 kilobytes                               1,048,576

Gigabyte   1,024 megabytes                              1,073,741,824

Terrabyte   1,024 gigabytes                               1,099,511,627,776

3 of 29

Storage Units

Name   What can it store?

Byte   A single letter, like "A"

Kilobyte   A 14-line e-mail. A pretty lengthy paragraph of text

Megabyte   A good sized novel

Gigabyte   Roughly 300 MP3s or 40 minutes of video at DVD quality. A CD holds about three quarters of a gigabyte

Terrabyte   1,000 copies of the Encyclopedia Britannica  Statistically, the average person has spoken about this much by age 25!

4 of 29

Binary addition multiplying by 10

In the Denary system, an extra 0 multiplies everything by 10.

Work Right to Left and apply these simple rules:

1) 0 + 0 = 0                                                

2) 0 + 1 =   

3) 1 + 0 = 1

4) 1 + 1 = 0 Carry 1

5) 1 + 1 + 1 = 1  Carry 1

5 of 29

Binary addition example

6 of 29

CPU and Memory

The CPU and memory work together to run programs.

  • CPU - stands for central processing unit and executes programs using the fetch-decode-execute cycle.
  • Memory - stores program operations and data while a program is being executed. There are several types of memory, including: registers, cache, RAM and virtual memory.
  • Storage - stores programs and files long term, even when they are not in use. 
7 of 29

Negative numbers in binary

Integers can be encoded so that they can be positive or negative numbers. Integers that can be either positive or negative are signed numbers.

One way to represent negative numbers is through sign and magnitude. In this method, the bit at the far left of the bit pattern - the sign bit - indicates whether the number is positive or negative. The rest of the bits in the pattern store the size of the number (called its magnitude).

8 of 29

Flowcharts

Decisions (yes, no) are represented by a diamond. Processes (something that happens) are represented by a rectangle. Inputs and outputs are represented by a parallelagram. An arrow represents the data flow, indicating the direction of data flow. (http://www.bbc.co.uk/staticarchive/62ce29a5d4c8efa085e806c6893cda0d47036f09.gif)

These are the different parts of flowcharts and their uses.

These are some examples of the uses:

  • Aircraft control
  • Central heating
  • Automatic washing machines
  • Booking systems for airlines
9 of 29

Networks

These are the different types of network topologies.

10 of 29

HTML

Hyper Text Markup Language (HTML) is a basic programming language for building web pages. It uses a set of predefined tags that the web browser then interprets and renders/displays.

HTML is typically written (or generated) in two ways:

  1. using a plain text editor, eg Notepad, Notepad++, TextPad etc
  2. using a What You See IWhat You Get (WYSIWYG) editor, eg Dreamweaver, iWeb, SeaMonkey Composer etc

Different types of browser

Not all browsers render (display) web pages in the same way. Common browsers include:

  • Internet Explorer
  • Firefox
  • Safari
  • Opera
  • Chrome
11 of 29

HTML tags

HTML files should always start with the following line of code:

<!DOCTYPE html>

This lets the browser software know the version of HTML it is about to find in the file. It should come before the opening <html> tag. Tags are then used to define different sections of HTML code and add content.

12 of 29

HTML tags 2

There are four critical tags that are used to create webpages.

<html>...</html>

The opening and closing tags of an HTML file. Tells the browser the rest of the document contains HTML tags.

<head>...</head>

These tags include all information about the page itself as well as links to JavaScript and CSS files. 

<title>...</title>

This states the title of the web page. The title will appear as text on browser window tabs.

<body>...</body>

This states where the actual content of the page begins and ends. Here the content is entered.

13 of 29

HTML tags 3

<p>...</p>

States where new paragraphs of text begin and end.

<h1>...</h1>

Creates headings, such as the main title shown on the page. There are six different sizes that can be used, with h1 being the largest and h6 the smallest.

Here is an example of a hyperlink that would take you to the BBC hompage.

<a href="www.bbc.co.uk">BBC Homepage</a>

14 of 29

HTML tags 4

<img src="IMAGE LINK" alt="DESCRIPTION">

This tag is used to include images on a webpage. It acts as a link to an image stored as part of the website. The tag must include a link to the image and alt text. The alt text is used to:

  • appear on screen where the image should be if the actual image will not display
  • allow screen readers to describe images to users with visual impairment
  • allow search engines to index webpage content (can return images when the text in an alt tag is searched for in a search engine)

Here is an example of a complete image tag:

<img src="summerholiday.jpg" alt="Family Holiday">

Sometimes web developers will include the size that the image should be. They can do this by adding the height and weight attributes.

<img src="summerholiday.jpg" alt="Family Holiday" height="24" weight="24">

15 of 29

CSS and JavaScript

CSS files - used for styling

JavaScript files - used to add interactive content. JavaScript is a scripting language that can be used to create, delete and manipulate HTML elements.

Here is an example of a link to a CSS file, these links are placed within the head section of HTML files:

<link rel="stylesheet" type="text/css" href="theme.css">

Here is an example of a link to a JavaScript file:

<script src="homepagescript.js"></script>

16 of 29

Databases

Databases are very powerful tools used in all areas of computing. It is a key computing skill to be able to organise data, create databases and control data using query languages.

One of the main benefits of computer databases is that they make it easy to store information so it is quick and easy to find. 

17 of 29

Data terms

Big data

Big data describes extremely large sets of data. It includes data gathered from many different sources that is then analysed. Big data is often used for making predictions based on patterns that can be seen in the data.

Data mining

Data mining is a term used to describe analysing large amounts of data to predict future events and trends. As there is so much data now available, people who are able to analyse and understand data are going to be well placed to shape the development of technology.

18 of 29

Data terms 2

Open data

Many organisations now share large sets of data freely. Organisations like the government, local councils, and world organisations (like the United Nations) make data freely available. This means that anyone can look at and analyse the data. Journalists often use open data sets to form the basis of news articles.

Open data projects are used to collaborate and share data around the world. For example, the Skynet project allows amateur and professional astronomers around the world to share information about the stars, planets, satellites and meteors.

Data security

We put a lot of trust in companies when we give them our personal details. They have a legal obligation to ensure that our data is kept in a secure centralised database. Data encryption is a necessity for any database containing personal data.

19 of 29

Data security

20 of 29

Parts of a database

Adatabase  is organised using a set of key components. These include:

  • Entities - each recorded item
  • Attributes - details about the entity
  • Field - columns used to capture attributes
  • Rrecord - one row of details about an entity
  • Table - a set of fields and records
  • Primary key - unique number for an entity

Queries can be used to find a certain entity and reports represent information from the database.

21 of 29

Database validation

Validation checks ensure that data entered into the computer is sensible. Data is checked in accordance with a set of rules. The computer's software can validate data while it is being entered into the computer. The main purpose of data validation is to spot an error. This can be done quickly and easily as the process is automated.

Types of validation checks:

  • Field size
  • Format
  • Input mask
  • Required
22 of 29

Relational databases and key field

Relational databases allow data to be stored in a clear, organised manner across multiple tables. Links, known as relationships, are formed to allow the data to be shared across the tables.

A database should always contain a key field. The key field is a unique identifier for each field.

The following are examples of key fields:

  • Car registration number
  • National Insurance number
  • Your school's examination centre number
  • Your own examination candidate number
23 of 29

Spreadsheets

A spreadsheet file is made up of one workbook and multiple worksheets. Worksheets appear as tabs at the bottom of a workbook. They can be reordered and renamed. Every cell in a spreadsheet or worksheet has a unique cell reference, which consists of a letter and a number. The letter refers to the column and the number refers to the row.

24 of 29

Cell referencing

When replicating a formula down a column or across a row, the spreadsheet automatically alters the row or column in the copied formula relative to where it is being copied from. This is called a relative referenceSometimes we don't want this to happen. In these cases we would use an absolute reference (shown by $).

25 of 29

Formatting spreadsheets

A spreadsheet can look messy and need some formatting applied to make it more presentable and easier to read.

Examples of formatting:

  • Centring 
  • Bold
  • Underline
  • Resizing
  • Title
  • Subtitle
  • Block fill (colour)
  • Text fill (colour)
26 of 29

Python coding and data types

Algorithms are designed to solve problems. Programming languages are used to implement algorithms. They create the programmes (using software) that communicate instructions to a computer. Python is one of those programming languages.

Thses are the programming data types:

  • String - a string of text or numbers  that cannot be used in calculations
  • Integer - whole numbers that can be used in calculations
  • Float - decimal numbers that can be used in calculations

All Python inputs are automaticly strings unless otherwise stated when programming.

27 of 29

IF and WHILE loops

Iteration - repetition of a programme

 In programming, condition-controlled loops are implemented using WHILE statments. Pythonuses the statement while.

Using IF and ELSE gives two possible choices (paths) that a program can follow. However, sometimes more than two choices are wanted. To do this, the statement ELIF is used.

28 of 29

Coding operators

> is more than

< is less than

>= is more than or equals to

<= is less than or equals to

== is equals to

= is add

- is subtract

* is multiply

/ is divide

29 of 29

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Hardware resources »