100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary of OCR GCSE Computer Science $8.06   Add to cart

Summary

Summary of OCR GCSE Computer Science

 15 views  0 purchase
  • Course
  • Institution

Full notes covering all 8 units of OCR GCSE Computer Science, including: -Key processes, such as packet switching, networks, hardware, software etc. -Pros and cons of certain parts of the course- e.g., pros and cons of magnetic storage devices -Diagrams students need to recognise and label/draw ...

[Show more]

Preview 3 out of 19  pages

  • March 23, 2022
  • 19
  • 2021/2022
  • Summary
  • 3
avatar-seller
1



Computer Science Revision Notes
Specification Area Notes
 Data and Information Data can consist of facts or statistics out of the context and used for analysis. It
can be numbers, characters, symbols or images that are processed by a
computer.
Information can be a sentence of words, a sequence of number or a series of
images that have been put into a context, which is what gives the data meaning.
 Constants and Variables Variables are used in computer programming to store specific values within a program.
They are assigned both a data type and a value. Some values are stored permanently; the
data is constant. Other things are always changing; the data is variable.
Variables are data entities whose values can be altered.
Constants are data entities whose values cannot be altered.
 Understanding different A data type determined the actions that can be performed on data when it is
data types held within a program or field of a database or a spreadsheet.
The most common data types are called primitive data types.
The different primitive data types are explained below:
 Integer: An integer data type deals with whole numbers. A member of
the set of positive whole numbers, negative whole numbers and zero.
 Real: A real data type contains numeric data in a decimal
 Boolean: The Boolean data type represents values of true/false or
yes/no. The primitive data type of a Boolean is logical. There are
arithmetic tests that can be used to create Boolean values. They are <,
<=, ==, !=, >= and >
 String: A string is a data type that can contain a set of characters,
numbers and spaces.
 Character: A character type may contain a single letter, digit,
punctuation mark, symbol, formatting code, control code, or some other
specialised code.
 Data structures What is a data structure?
A data structure is a specialized format for organizing and storing data. General
data structure types include the array, the file, the record, the table, the tree,
and so on. Any data structure is designed to organize data to suit a specific
purpose so that it can be accessed and worked with in appropriate ways.

Examples of data structures:
 Array: An array is a series of memory locations which holds a series of
items of data. All data in an array must be of the same data type.
 List: A list is a series of memory location which can hold a series of items
of data. All data in an array can be of different data types.

Explain why using data structures make coding simpler:
A variable holds a single item of data. There may be a situation where lots of
variables are needed to hold similar and related data. In this situation, using a
data structure can simplify a program by storing all related data under one name.
This means that a program can be written to search through the data structure
much more quickly than having to write a new line of code for every variable.
This reduces the complexity and length of the program which makes it easier to
find and debug errors.

, 2


 Program Flow Control Program flow control can be defined simply as the order in which a program is
executed
Advantage of using it when designing programs
 It decreases the complexity of the task at hand, as everything is
completed in a logical manner and so the program should take less time
to code
 This logical structure also means that the code has increased clarity and
so faults can be recognised quicker and more easily
 It also means that many programmer can work on one program, as the
structure has already been planned and is fairly standards. This also
means in an increase in productivity.

Representing structure:
Flow charts can be used to plan programs and represent structure
The four main symbols used in making flow charts are shown below:


This shows the start of a process
Start and has only one output


This represents an operation carried
Process out. This blocks must have exactly
one input and one output.
This represents a question with only
two answers so it always makes a
Decision
Boolean choice. It has one input
and two outputs.

This is the opposite of the ‘start’
End
symbol. It only has one input


On the other hand, algorithms can also be used. An algorithm is a series of
instructions that solves a problem in a finite number of steps that always ends.

The basic building blocks of coded solution are sequencing, selection and
iteration. They are explained below:
 A sequence is a set of instructions acting in order, meaning that each
action follows the previous action.
 A selection control structure involves a choice. Usually, a program’s
execution path is determined by statements.
 An iteration control structure involves repeating actions. It involves a
statement that is executed in a loop until its criteria are met.

, 3


 Procedures and A procedure is a block of code that performs a task without returning a value.
functions A function is very similar to a procedure except that it returns a value. There are two
types of functions;

 User-defined functions are created by the user for a program.
 Built-in functions are part of the programming language. Built-in functions
are very useful and save a lot of effort in writing code to preform common
tasks.


Procedure and functions are subroutines that feature in all programming languages.
They are named blocks of code that can be used and re-used to perform specific
tasks. Their purpose is to allow the repetition of certain sections of a program or
calculation many times.

Reasons why programmers use functions and procedures:
 To make code easier to read
 To allow for code reuse/sharing
 To reduce programmer error
 To improve code maintenance/easier to update code.

A parameter is used in a subroutine to refer to one of the pieces of data provided as
input to the subroutine. It therefore allows the passing of values to the procedure or
function for use inside it.
A return value is the information that comes back from the actions performed from
the subroutine.
 Scope Scope is the area in the code where a variable can only be accessed and changed.
Trying to access a variable in other parts of the code that do not fall in this area will
not work. There are two types of scopes. Local scope which is within a function, and
global scope which is anywhere in the program. The different types of scopes mean
there are two different types of variables. These are local variables and global
variables.
The scope of a local variable is the procedure in which it is declared.
The scope of a global variable is the whole program.

 Error Handling Types of Errors:
There are three types of error that computer programmers encounter when writing
software. They are syntax errors, run-time errors and logic errors.
 Syntax error: They occur when the programmer fails to obey one of the
grammar rules of the programming language that they are using.
 Run-time error: They occur whenever the program instructs the computer
to carry out an operation that is either not designed to do or slow to do.
 Logic error: They occur when the program runs successfully but it does not
behave in the manner it was designed to.

Why are logical errors often the most difficult to find?
This is because the program appears to run normally and because it is not obvious
where the error has occurred.


Error Handling:

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller MBlake247. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $8.06. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76800 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$8.06
  • (0)
  Add to cart