128
Convert the denary number 124 to Binary
64 32 16 8 4 2 1
128
0
Convert the denary number 124 to Binary
64
64
1
+
32
32
1
+
16
16
1
+
8
8
1
+
4
4
1
2
0
1
0
Answer: 01111100
Convert the Binary number 10011101 to Decimal
128
1
64
0
32
0
16
1
8
1
4
1
2
0
1
1
Convert the Binary number 10011101 to Decimal
128
1
128 +
64
0
0 +
32
0
0 +
16
1
16 +
8
1
8 +
4
1
4 +
2
0
0 +
1
1
1
Answer: 157
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Binary number 01010011 to Hex
8 4 2 1 8 4 2 1
0 1 1 1 1 1 0 0
Answer:
_
__
_
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Binary number 01010011 to Hex
8 4 2 1 8 4 2 1
0 1 1 1 1 1 0 0
0 + 4 + 2 + 1 8 + 4 + 0 + 0
Answer:
7
7C
12
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128 64 32 16 8 4 2 1
8 4 2 1 8 4 2 1
_
__
_
Answer:
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128 64 32 16 8 4 2 1
128 + 0 + 0 + 0 + 0 + 0 + 1 + 1
8 4 2 1 8 4 2 1
Answer:
_
__
_
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128
1
128 +
64
0
0 +
32
0
0 +
16
0
0 +
8
0
0 +
4
0
0 +
2
1
1 +
1
1
1
8 4 2 1 8 4 2 1
_
__
_
Answer:
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128
1
128 +
64
0
0 +
32
0
0 +
16
0
0 +
8
0
0 +
4
0
0 +
2
1
1 +
1
1
1
8 4 2 1 8 4 2 1
_
__
_
Answer:
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128
1
128 +
64
0
0 +
32
0
0 +
16
0
0 +
8
0
0 +
4
0
0 +
2
1
1 +
1
1
1
8 4 2 1 8 4 2 1
_
__
_
Answer:
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128
1
128 +
64
0
0 +
32
0
0 +
16
0
0 +
8
0
0 +
4
0
0 +
2
1
1 +
1
1
1
8 4 2 1 8 4 2 1
1 0 0 0 0 0 1 1
Answer:
_
__
_
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128
1
128 +
64
0
0 +
32
0
0 +
16
0
0 +
8
0
0 +
4
0
0 +
2
1
1 +
1
1
1
8 4 2 1 8 4 2 1
1 0 0 0 0 0 1 1
0 + 0 + 2 + 1
_ 3
_3
Answer:
8
9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
3
4
1
2
5
6
7
Convert the Decimal number 131 to Hex
128
1
128 +
64
0
0 +
32
0
0 +
16
0
0 +
8
0
0 +
4
0
0 +
2
1
1 +
1
1
1
8 4 2 1 8 4 2 1
1 0 0 0 0 0 1 1
8 + 0 + 0 + 0 0 + 0 + 2 + 1
8 3
83
Answer:
• Easier for us to read than binary FOR HUMANS
• Quicker/Easier to type FOR HUMANS
• Result is more compact.
7D VS 1111101
• A code that represents a character (like the ones on a keyboard) that can be converted to binary.
• Can only store 128 characters.
W Binary: 01010111
Hex: 57
Decimal:87
• RAM – Random Access Memory
– Used to store programs and data needed by the computer when it is running.
– Known as volatile memory as data is lost if power supply is interrupted
• Keeps data even after the computer is turned off.
• Used for more permanent/long term storage of data.
• ROM – Read Only Memory
– Known as read only as it cannot be altered
– The data and programs held in ROM are burned into the chips when they are manufactured
• CPU – Central Processing Unit
• Motherboard
• PSU- Power Supply Unit
• RAM-Random Access Memory
• GPU – Graphics Processing Unit
• Used to do complex calculations.
• Performance – Can be affected by the processor speed and number of cores.
• Cache – Stored locally on the CPU so is faster to access. Used to improve performance by reducing the amount of times it has to access the RAM.
Slow transfer
Compared to Working directly with cache
• A Single core CPU is limited to doing one task at a time
• It handles multiple tasks by switching between the open programs
• Only way to speed up a single core CPU is to increase the clock rate(how fast the CPU is running).
CPU
Core 1
• To get round this problem you can add extra cores to a
CPU.
• Each core can work on one task so in the example shown it can do two tasks at once.
CPU
Core 1 Core 2
• A computer running two programs can share the task between the two cores.
• An example is a computer running a Web Browser and
Word at the same time can run the web browser on
Core 1 and Word on Core 2.
Word
CPU
Web Browser
Core 1 Core 2
2Ghz
CPU
3Ghz
CPU
Core 1 Core 2 Core 1
Can process 2 tasks at once at 2Ghz Can process 1 task at a time at 3Ghz
2Ghz
CPU
3Ghz
CPU
Core 1 Core 2 Core 1
For a user running only 1 program the single core processor is better because it will run that single task faster than the dual core.
2Ghz
CPU
3Ghz
CPU
Core 1 Core 2 Core 1
For a user running 2 programs the dual core processor is better because it can run both tasks at once while the single core processor will have to split the time it has on each program making it effectively 1.5Ghz per task.
• Magnetic devices
Hard disk drives
Floppy disk drives
ZIP disks
Magnetic Tape
• Optical devices
CD-ROM drives
CD R/R+/RW
DVD drives
DVD R+/-/RW
• Solid state devices
USB drives
Flash media cards
• Magnetic Storage – Slow, Cheap, larger storage space, Larger failure rate, bulky.
• Solid State storage – Faster, No moving parts,
More expensive, Lower failure rate, Smaller storage space, more compact.
• Optical – Cheap, Slow, Limited storage space, easy to scratch
File stored on the
CD in binary.
The 1s are burnt in using a laser and the unburnt areas treated as 0s.
Laser reads the values burnt onto a disk by moving the head holding the laser back and forth.
It differentiates between the values by having the laser reflect back on areas that are not burnt.
It puts together all the values it finds to make up the whole file.
010110
111000
…
• A black and white image can be represented as binary.
• The while pixels can be represented as 1s.
• The Black pixels can be represented as 0s.
• A Variable is used to store data that can be changed throughout runtime.
• Examples being in a game the number of lives you have left or the number of bullets you have left in a gun.
• A constant stores a value that will stay the same throughout runtime once set.
• Examples being in a game the number of bullets a gun can hold or the score value needed to win a game.
• Function -A type of procedure in programming. It is a section of code that performs a specific task.
It can be named and reused in different parts of the program
• Procedure - A section of computer code that performs a specific task.
• Algorithm - A sequence of logical instructions for carrying out a task. In computing, algorithms are needed to design computer programs.
• Variable that refers to data provided as an input to things like functions.
• FUNCTION CheckAge(arr)
• The Function CheckAge has one parameter named “arr”.
• Definition - Two or more computers linked together.
• LAN – Local Area Network
• WAN – Wide Area Network
• Client –Sends out requests to a server/host and receives back a response.
• Server/Host – Stores information for clients to access/request.
• LAN – Local Area Network
– This is commonly defined as a network in one geographic location, e.g. building or campus.
– LANs are best defined by the fact that they use dedicated cabling and network infrastructures to connect their parts together.
• WAN – Wide Area Network
– These are networks that cover large or separate geographic areas, such as countries or even internationally.
– They are defined by their use of general purpose telecommunications networks to connect their parts together.
• PAN – Personal Area Network
– New, increasingly developing idea where the different electronic devices many people carry around with them can connect together.
– E.g. Palmtop computer linked to mobile telephone linked to MP3 player linked to digital camera.
BUS
• In a bus network all the workstations, servers and printers are joined to one cable - 'the bus'. At each end of the cable a terminator is fitted to stop signals reflecting back down the bus.
• Advantages
– easy to install
– cheap to install - it does not require much cabling
• Disadvantages
– if the main cable fails or gets damaged, the whole network will fail
– as more workstations are connected, the performance of the network will become slower because of data collisions
– every workstation on the network 'sees' all of the data on the network, which can be a security risk
• In a ring network, each device (eg workstation, server, printer) is connected in a ring so each one is connected to two other devices. Each data packet on the network travels in one direction. Each device receives each packet in turn until the destination device receives it.
Advantages this type of network can transfer data quickly (even if there are a large number of devices connected) as data only flows in one direction so there won't be any data collisions
Disadvantages if the main cable fails or any device is faulty, then the whole network will fail - a serious problem in a company where communication is vital
• In a star network, each device on the network has its own cable that connects to a switch or hub. This is the most popular way of setting up a
LAN. You may find a star network in a small network of five or six computers where speed is a priority
Advantages very reliable – if one cable or device fails, then all the others will continue to work high performing as no data collisions can occur
Disadvantages expensive to install as this type of network uses the most cable, and network cable is expensive extra hardware is required - hubs or switches which add to the cost if a hub or switch fails, all the devices connected to it will have no network connection
Client Sends request to view webpage
Handshake Server receives request to view webpage
Client Receives
Webpage
Server Sends the data on webpage.
• HTML - Hypertext mark-up language. The language used to write and display web page documents.
• XML - Extensible mark-up language (XML): a general-purpose specification for creating custom mark-up languages.
• CSS- Cascading style sheet - used to format the style of a web page.
• Input devices – Microphone, Webcam ,
Mouse, Keyboard
• Output Devices – Speakers/Headphones,
Monitor
1.
2.
3.
Microphone receives sound.
Sound converted to analogue signal
Values read at specific points and rounded.
4. 01011011001110011
Binary representation of the levels are stored.
• Integer- A whole number e.g. 62
• Boolean – True or False (1 or 0)
• Real number/Float – Decimal number e.g.
3.256
• Character – Single letter e.g. “r”
• String – A list/array of characters put together e.g. “rain”
• SELECT – Used to select Data from a table.
• INSERT – Used to insert data into a table.
• UPDATE – Used to edit data in a table.
• DELETE – Used to delete data in a table.
• WHERE – A condition command that works with the above statements. Will only do something when it meets the condition it is asking for.
• Table – A set of fields and records.
• Field – The column of a table.
• Record - One row of details about an entity.
• Foreign Key – A field that uniquely identifies a row of another table.
• Primary Key – Used to specify unique values for an entity.
• Relationship –links between tables
• Table – Used to store a collection of data in a structured format.
• Field – The column of a table.
• Foreign Key – A field that uniquely identifies a row of another table.
• Primary Key – Used to specify unique values for a specified field.
• Relationship –links between tables
• Validation –Used to set a condition to restrict the types of data can be input.
• Form - Used to enter data into a database.
• Queries - Used to search and filter a database
• Reports - Used to export data and present it in a way that is easy to read.
• Modules - Database software and languages contain modules - prewritten programs
• Flat File - A file that stores a database table with no structured relationships
• Relational - 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.
• Normalisation - Normalisation is the process of analysing how to make databases more efficient by using separate tables to reduce redundant data. When a database is normalised, data is broken down into smaller tables and relationships are used to link them.
• One to one - one person has one address.
• One to many - one cinema has many customers
• Many to many - many subjects can be taken by many students.
• Logical- When the program gives a result you didn’t expect.
The example above has a logical error because the while loop loops while the value is greater than and equal (>=) to 0. This will cause the program to loop one to many times. The solution is to change the operator to greater than (>) 0.
• Syntax – When the wrong syntax is used in the code. E.G. When the wrong brackets are used or you are missing a semicolon or quotes haven't been closed or when a statement hasn't been typed correctly
• Runtime – When an error occurs during the runtime of the program.
String value “EIGHT”
A string cannot be a number therefore it cannot be greater than
0
EIGHT > 0
• IDE – Integrated Development Environment
E.G. Netbeans which shows the user some syntax errors as they code.
• Syntax Colouring – Allows the user to see where they may have gone wrong in the code by having the code show colourings for variables and things inside quotes etc.
• Breakpoints – Allows the user to step through the code and see the values of the variables at that point of time they set a break point.
• Unit Testing- Creating modular tests that test select parts of a program.
• Advantages
– Helps developers find problems early and can save time as the application grows and new features are introduced.
– Enhances the language of the code by providing more readable functions.
– Drives architecture so that the application is testable throughout its lifecycle.
• Disadvantages
– Time consuming as you need to write more code.
– Adds complexity as you are writing more code.
– Tests may need to be continuously tweaked as the code evolves.
• Black box testing – Testing where the user does not know the code behind the program.
• Advantages
– Tester can be non-technical.
– Used to verify contradictions in actual system and the specifications.
– Clearly separates user's perspective from the developer's perspective through visibly defined roles.
• Disadvantages
– Limited coverage, as only a selected number of test scenarios is actually performed.
– May miss some areas of the program so some things will be untested
– The test cases are difficult to design
Internal behaviour of the code is unknown
• White box testing – Testing where the user knows the code behind the program.
• Advantages
– White box tests are easy to automate.
– Provides traceability of tests
– Can reveal hidden errors while also being able to easily fix these kind of errors.
• Disadvantages
– Missing functionality may be missed.
– Not realistic to test all aspects of the program so some areas may be missed
– Brings complexity to testing because it requires a high level of programming knowledge.
Internal behaviour of the code is known
• Advantages
– Don’t have to code it yourself(you may not have the expertise to do so)
– Time saving as less development time and testing
– May be updated without your input improving the efficiency of your code
• Disadvantages
– You may not know the code behind it
– May not be secure
– Could be buggy
– May not be well documented
start
Boil water
Example chart to show how coffee can be made.
Add coffee
This is a decision symbol, the flow can go one of two ways
Sugar?
no
Stir coffee yes
Add sugar end
These are used to show user input and output.
These are used for actions
Assigning a value is done using a arrow (<-)
Here index is being assigned the value of 1
While loop starts with a
“WHILE”
The while loop’s condition is if the index is greater than or equal to 5. So when the index value becomes 6 the loop will end.
The while loop ends with a “ENDWHILE”, but will only go past this point once the condition at the start of the loop has been met
An if statement is an conditional statement that is either true or false. It will only run once unless it is inside of a loop.
An if statement will start with an “IF”.
“THEN” means that if the if statement is met it will then do something
“ELSE” only happens if the condition in the if statement isn’t met.
“ENDIF” indicates the end of the if statement.
“OUTPUT” is to show what the code will print out for the user to see.
The text being surrounded by ‘ shows it is printing text.
“USERINPUT” is to show that this is the input the user will put into the program
• Three main types to consider:
– Systems software / operating systems
– Applications
– Utilities
Systems Software (Operating System)
• Software that actually controls the system resources
• Allocates memory, processor time, access to other hardware to programs
• Acts as interface between user and computer hardware
• Examples: Windows, Linux, Unix, Mac OS
• Firmware is a program embedded onto a hardware device. All hardware components in a computer have firmware.
• Firmware is usually coded into a hardware device when it is created in a factory. The user of the computer does not usually interact with the firmware directly.
• A typical example of firmware is the BIOS program written into the
ROM of a computer. The BIOS runs when a system starts up before the operating system starts.
• Programs to be used to create something
– Word Processors
– Spreadsheets
– Databases
– Presentation Software
– Graphics Software
• Sits on top of O/S
• Programs that do useful tasks
– File compression
– File conversion
– Web browser
– Indexing software
– Wide range of small utilities – clock, calculator, screen grabber, disk checker
• Proprietary software - Proprietary software (sometimes referred to as closed source software) is software that legally remains the property of the organisation, group, or individual who created it.
The organisation that owns the rights to the product usually does not release the source code, and may insist that only those who have purchased a special licence key can use it.
• Free software -Free software (also called freeware) is licensed at no cost, or for an optional fee. It is usually closed source.
• Open source software- Open source software is free and openly available to everyone. People who create open source products publish the code and allow others to use and modify it.
Communities of programmers often work together to develop the software and to support users. Open source products are usually tested in public by online contributors.
This is an example of a GUI – Graphical User Interface. It uses the metaphor of a desktop and folders to display how it stores files. It is the easiest type of interface for people to use, but requires much more resource from the computer to run it effectively.
This is an example of a CLI – Command Line Interpreter (or Interface). It uses only text and relies on the user knowing how to operate it by typing in commands. It uses little system resources but novice users will find it difficult to use.
This is an example of a menu
driven interface.
It tries to look like a GUI but it can only use text characters to do this – there are no actual graphics on this screen.
It is a ‘halfway house’ between CLIs and GUIs – it only uses a bit more resource than a CLI, and has nearly as much usability as a GUI.
Typically used for hardware based menus these days, e.g. in the BIOS of your computer.
• Physical security
• Electronic security
• Virus protection
• Backup
Data Protection Act
1. Must be kept Secure
2. Let subjects see the data stored on them
3. Must be kept Up-to-Date
4. Should be Relevant
5. Used for intended purpose
6. Obtained Lawfully
7. Accurate
8. Should not be kept For longer than necessary
Health and Saftey
• Make sure workstations are not cluttered/congested
• Provide adjustable / tilting screens
• Provide foot rests
• Pay for eye tests for regular IT users
• Provide anti-glare screen filters
• Provide adjustable chairs
• Make sure lighting is suitable for the room and computers
• Allow for regular breaks
Computer Misuse act;
• Hacking - Unauthorized user who attempts to or gains access to an information system
• Virus - A virus is a program written to cause mischief or damage to a computer system.
• The Computer Misuse Act (1990) was developed to cope with the problems of computer hackers and viruses .
• There are three principles to the act
Copyright
What if someone illegally uses products from a business? (e.g. downloads a movie someone has produced without paying for it).
1. Loss of sales?
2. Unemployment
3. Company have to pay legal expenses to prosecute.
4. Increased prices for consumers?
Why?
5. Fewer products produced due to smaller budgets.
What if a business uses something they have not got permission to use? (e.g. copying a design from one product in their own).
1. Loss of confidence by consumes
2. Could be prosecuted.
3. Brand name in disrepute.
4. Fine/Sued
5. Forced to withdraw product.
Documentation
Analysis
Design
Evaluation
Implementation
Testing
Requirements - also known as the analysis stage. This is the first step, when the team decide what the software needs to do. The main point is to think about what the user will want from the program. At this stage, it might be a good idea to ask other people what they want from the software. Who is going to use it? What information do they need to input? What information or data does it need to output?
Design - the team work out the details of the program by breaking it down into smaller chunks. This includes thinking about the visual appearance and the programming behind the software. The team will use pseudocode and diagrams to work out how the program should go.
Implementation - the program code is written. Good pseudocode allows the implementation stage to be relatively easy. The code is normally written in a high-level language.
Testing - this involves testing the program under various conditions to make sure it is going to work. You need to think about what devices it could be used on and what might cause the program to crash.
Evolution - the software is ready to be launched, but after it has been launched you will need to think about how the software evolves. Software needs to be maintained to ensure it works on new systems. Smartphone apps are constantly being maintained to make sure they work on the latest smartphones and computers
• Logic gates allow an electronic system to make a decision based on a number of its inputs.
• They are digital electronic devices.
• Each input and output of the gates must be one of two states:
– true or 1 or 'on'
– false or 0 or 'off'
• A NOT gate has just one input.
• The output of the circuit will be the opposite of the input.
• If 0 is input, then the output is 1.
• If 1 is input, then 0 is output.
• The Boolean expression is written as Q = NOT
A.
Input (A)
1
0
Output (B)
0
1
1
0
0
1
• An AND gate can be used on a gate with two inputs.
• AND tells us that both inputs have to be 1 in order for the output to be 1.
• The Boolean expression is written as Q = A
AND B.
Input(A) Input(B) Output(Q)
0
1
0
0
0
0
1 1
• The OR gate has two inputs.
• One or both inputs must be 1 to output 1, otherwise it outputs 0.
• The Boolean expression is written as Q = A OR
B.
0
1
Input(A)
0
1
1
0
Input(B)
0
1
1
1
Output(Q)
0
1
• The exclusive OR gate works the same as an
OR gate, but will output 1 only if one or the other (not both) inputs are 1.
• The Boolean expression is written as Q = A
XOR B.
0
1
Input(A)
0
1
1
0
Input(B)
0
1
1
1
Output(Q)
0
0
• BBC Bitesize Computer science revision
• http://www.bbc.co.uk/education/subjects/z34k7ty
• W3Schools SQL explanations
– http://www.w3schools.com/SQl/default.asp
• Past paper and mark scheme
– http://www.aqa.org.uk/subjects/ict-andcomputer-science/gcse/computer-science-
4512/past-papers-and-mark-schemes