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.
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
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
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!
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 = 1
3) 1 + 0 = 1
4) 1 + 1 = 0 Carry 1
5) 1 + 1 + 1 = 1 Carry 1
Binary addition example
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.
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).
Flowcharts
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
Networks
These are the different types of network topologies.
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:
- using a plain text editor, eg Notepad, Notepad++, TextPad etc
- using a What You See Is What 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
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.
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.
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>
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">
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>
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.
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.
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.
Data security
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.
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
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
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.
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 reference. Sometimes we don't want this to happen. In these cases we would use an absolute reference (shown by $).
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)
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.
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.
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
Related discussions on The Student Room
- Electrical Engineering vs Computer engineering »
- GCSE Computer Science - Struggling with Networks »
- Best Comp Sci route »
- hannah's GYG - trying to stop the procrastination »
- What is it like Studying a Cyber-security degree? (or similar degree) »
- Hello .. I am looking for computer science program BSc/BEng 2024 entry »
- Job shadowing/apprenticeship »
- computer science vs software engineering »
- English or Mathematics »
- Opinions on the best option modules »
Comments
No comments have yet been made