More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
Python IDE Dashboard

OCR H446/02 – 2.3 Algorithms

2.3 Algorithms - Overview / Checklist
2.3.1 Algorithms
(a) Analysis and design of algorithms for a given situation.
(b) The suitability of different algorithms for a given task and data set, in terms of execution time and space.
(c) Measures and methods to determine the efficiency of different algorithms, Big O notation (constant, linear, polynomial, exponential and logarithmic complexity).
(d) Comparison of the complexity of algorithms.
(e) Algorithms for the main data structures, (stacks, queues, trees, linked lists, depth-first (post-order) and breadth-first traversal of trees).
(f) Standard algorithms (bubble sort, insertion sort, merge sort, quick sort, Dijkstra’s shortest path algorithm, A* algorithm, binary search and linear search).

Recommended Resources

2.3.1 Algorithms
Searching & Sorting Algorithms
Bubble Sort Algorithm – Visualisation Merge Sort Algorithm – Visualisation Quick Sort Algorithm Sorting Algorithms – Visualisation Searching & Sorting Algorithms – Practice Linear Search Functions Binary Search: Guess The Number Linear vs Binary Search: Domain Name Server Challenge Bubble Sort Algorithm – Visualisation Insertion Sort Algorithm – Visualisation Sorting Algorithms – Python Code Shuffling Algorithm (Python Challenge)

Algorithms & Data Structures
– Binary Trees
Breadth-First Traversal of a Binary Tree Binary Search Tree Implementation Prime Factor Tree Algorithm Morse Code using a Binary Tree Huffman Coding Algorithm – Graphs
Air-Flight Route Planner The Social Network Food Chain and Food Web London Underground Journey Planner

– Hash Tables
Airport Lookup Check Chemical Elements Quiz

– 2D and 3D Arrays
Cinema Booking Challenge Laser Maze Game My Weekly Timetable Four in a row Challenge Noughts & Crosses Challenge Battleship Challenge Drone Display Space Invaders 2D/3D Pixel Art

– Stack & Queues
Stacks and Queues using Python The Ice Cream Stack Bracket Validator (using a Stack) Reverse Polish Notation (using a Stack)


Big O Notation

Big O Notation

The question we will try to answer in this blog post is as follows: How can we measure the effectiveness/performance of an algorithm? First let’s consider this quote from Bill Gates (Founder of Microsoft): “Measuring programming progress by lines of … Continue reading


Big O Notation – Quiz

Before completing this quiz, we invite you to revisit the main Big O Notations used to describe the time complexity and space complexity of an algorithm.. The main Big O Notations this quiz will focus on are: Take the Quiz! … Continue reading


Short Path Algorithms

Dijkstra’s Shortest Path Algorithm

Dijkstra’s Shortest Path Algorithm is an algorithm used to find the shortest path between two nodes of a weighted graph. Before investigating this algorithm make sure you are familiar with the terminology used when describing Graphs in Computer Science. Let’s … Continue reading


A* Search Algorithm

The A* Search algorithm (pronounced “A star”) is an alternative to the Dijkstra’s Shortest Path algorithm. It is used to find the shortest path between two nodes of a weighted graph. The A* Search algorithm performs better than the Dijkstra’s … Continue reading


Short Path Algorithm Practice

Before completing this task, you will need to familiarise yourself with the following 2 algorithms used to find the shortest path between two nodes of a weighted graph: Dijkstra’s Short Path Algorithm A* Algorithm Dijkstra’s Short Path Algorithm For each … Continue reading


Air Flight Route Planner London Underground Journey Planner The Social Network

OCR H446/01 – 2.2 Problem solving and programming

2.2 Problem solving and programming - Overview / Checklist
2.2.1 Programming techniques
(a) Programming constructs: sequence, iteration, branching.
(b) Recursion, how it can be used and compares to an iterative approach.
(c) Global and local variables.
(d) Modularity, functions and procedures, parameter passing by value and by reference.
(e) Use of an IDE to develop/debug a program.
(f) Use of object oriented techniques.
2.2.2 Computational methods
(a) Features that make a problem solvable by computational methods.
(b) Problem recognition.
(c) Problem decomposition.
(d) Use of divide and conquer.
(e) Use of abstraction.
(f) Learners should apply their knowledge of:

    backtracking
    data mining
    heuristics
    performance modelling
    pipelining
    visualisation to solve problems.

Recommended Resources

OCR H446/02 – 2.1 Elements of computational thinking

2.1 Elements of computational thinking - Overview / Checklist
2.1.1 Thinking abstractly
(a) The nature of abstraction.
(b) The need for abstraction.
(c) The differences between an abstraction and reality.
(d) Devise an abstract model for a variety of situations.
2.1.2 Thinking ahead
(a) Identify the inputs and outputs for a given situation.
(b) Determine the preconditions for devising a solution to a problem.
(c) The nature, benefits and drawbacks of caching.
(d) The need for reusable program components.
2.1.3 Thinking procedurally
(a) Identify the components of a problem.
(b) Identify the components of a solution to a problem.
(c) Determine the order of the steps needed to solve a problem.
(d) Identify sub-procedures necessary to solve a problem.
2.1.4 Thinking logically
(a) Identify the points in a solution where a decision has to be taken.
(b) Determine the logical conditions that affect the outcome of a decision.
(c) Determine how decisions affect flow through a program.
2.1.5 Thinking concurrently
(a) Determine the parts of a problem that can be tackled at the same time.
(b) Outline the benefits and trade offs that might result from concurrent processing in a particular situation.

Recommended Resources

OCR H446/01 – 1.5 Legal, moral, cultural and ethical issues

1.5 Legal, moral, cultural and ethical issues - Overview / Checklist
1.5.1 Computing related legislation
(a) The Data Protection Act 1998.
(b) The Computer Misuse Act 1990.
(c) The Copyright Design and Patents Act 1988.
(d) The Regulation of Investigatory Powers Act 2000.
1.5.2 Moral and ethical Issues
The individual moral, social, ethical and cultural
opportunities and risks of digital technology:

    Computers in the workforce.
    Automated decision making.
    Artificial intelligence.
    Environmental effects.
    Censorship and the Internet.
    Monitor behaviour.
    Analyse personal information.
    Piracy and offensive communications.
    Layout, colour paradigms and character sets.

Recommended Resources

1.5.1 Computing related legislation

UK Legislation relevant to Computer Science

As a computer scientist, you need to be aware of the legislation that is relevant to the use of Computer Science related technologies. Whether you are designing a new website, creating a computer program or system or just using a … Continue reading


The Apple–FBI Encryption Dispute

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


Unveiling the World of Ethical Hacking

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


The MafiaBoy dDoS attack

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


The Hyperlink Patent Case and the Copyright, Designs and Patents Act

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


Mickey Mouse Enters the Public Domain

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


The Cadbury Ruling: Can Colours be Trademarks in the UK?

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


The Salami Hack & the Computer Misuse Act Legislation

This post is part of series of blog posts investigating different impacts of UK legislation relevant to Computer Science with a particular focus on: Data Protection Legislation Intellectual Property Protection (incl. Copyright and Trade Marks legislation) Computer Misuse Act (1990)


OCR H446/01 – 1.4 Data types, data structures and algorithms

1.4 Data types, data structures and algorithms - Overview / Checklist
1.4.1 Data Types
(a) Primitive data types, integer, real/floating point, character, string and Boolean.
(b) Represent positive integers in binary.
(c) Use of sign and magnitude and two’s complement to represent negative numbers in binary.
(d) Addition and subtraction of binary integers.
(e) Represent positive integers in hexadecimal.
(f) Convert positive integers between binary hexadecimal and denary.
(g) Representation and normalisation of floating point numbers in binary.
(h) Floating point arithmetic, positive and negative numbers, addition and subtraction.
(i) Bitwise manipulation and masks: shifts, combining with AND, OR, and XOR.
(j) How character sets (ASCII and UNICODE) are used to represent text
1.4.2 Data Structures
(a) Arrays (of up to 3 dimensions), records, lists, tuples.
(b) The following structures to store data: linked-list, graph (directed and undirected), stack, queue, tree, binary search tree, hash table.
(c) How to create, traverse, add data to and remove data from the data structures mentioned above. (NB this can be either using arrays and procedural programming or an object-oriented approach).
1.4.3 Boolean Algebra
(a) Define problems using Boolean logic.
(b) Manipulate Boolean expressions, including the use of Karnaugh maps to simplify Boolean expressions.
(c) Use the following rules to derive or simplify statements in Boolean algebra: De Morgan’s Laws, distribution, association, commutation, double negation.
(d) Using logic gate diagrams and truth tables.
(e) The logic associated with D type flip flops, half and full adders.

Recommended Resources

Further Reading…

OCR H446/01 – 1.3 Exchanging data

1.3 Exchanging data - Overview / Checklist
1.3.1 Compression, Encryption and Hashing
(a) Lossy vs Lossless compression.
(b) Run length encoding and dictionary coding for lossless compression.
(c) Symmetric and asymmetric encryption.
(d) Different uses of hashing
1.3.2 Databases
(a) Relational database, flat file, primary key, foreign key, secondary key, entity relationship modelling, normalisation and indexing.
(b) Methods of capturing, selecting, managing and exchanging data.
(c) Normalisation to 3NF.
(d) SQL – Interpret and modify.
(e) Referential integrity.
(f) Transaction processing, ACID (Atomicity, Consistency, Isolation, Durability), record locking and redundancy.
1.3.3 Networks
(a) Characteristics of networks and the importance of protocols and standards.
(b) The internet structure:

    The TCP/IP Stack.
    DNS
    Protocol layering.
    LANs and WANs.
    Packet and circuit switching.

(c) Network security and threats, use of firewalls, proxies and encryption.
(d) Network hardware.
(e) Client-server and peer to peer.

1.3.4 Web Technologies
(a) HTML, CSS and JavaScript.
(b) Search engine indexing.
(c) PageRank algorithm.
(d) Server and client side processing.

Recommended Resources

1.3.1 Compression, Encryption and Hashing
Symmetric and asymmetric encryption

Symmetric vs. Asymmetric Encryption

Cryptography is the art of encoding and decoding secret messages. Cryptographic techniques have been used for thousands of years, well before the introduction of computers, and the techniques have evolved since. (e.g. See how the Caesar Cipher was used by … Continue reading


Cryptography Challenges


Hashing Algorithms

Hashing Algorithms for Integrity Validation

Imagine working for the British Secret Services during World War 2 or during the cold war. As part of your role, you would be expected to exchange secret messages with your allies. Your messages would most likely be encrypted using … Continue reading


Hashing Algorithms for Storing Sensitive Data

More and more online systems such as e-commerce websites, online banking apps, or social networks need to access some sensitive data about you including your password, your credit card details and more recently, some biometric data (e.g. for fingerprint authentication … Continue reading


Hashing Algorithms for Memory Addressing

In this blog post, we will investigate the use of hashing algorithms to quickly locate a record in a large database. Let’s consider the database of members of a social network such as Instagram, Twitter or Facebook. Every time the … Continue reading


Luhn Algorithm UPC Barcode Check Digit Algorithm


Lossy and Lossless Compress

Lossless Compression: Huffman Coding Algorithm

The Huffman Coding algorithm is used to implement lossless compression. For the purpose of this blog post, we will investigate how this algorithm can be implemented to encode/compress textual information. The principle of this algorithm is to replace each character … Continue reading

Lossless Compression Algorithms

In this blog post, we will focus on two fundamental lossless compression techniques: dictionary encoding and run-length encoding. By implementing these methods in Python … Continue reading

Lossless Compression Poem Decoding Challenge

OCR H446/01 – 1.2 Software and software development

1.2 Software and software development - Overview / Checklist
1.2.1 Systems Software
(a) The need for, function and purpose of operating systems.
(b) Memory Management (paging, segmentation and virtual memory).
(c) Interrupts, the role of interrupts and Interrupt Service Routines (ISR), role within the Fetch-Decode-Execute Cycle.
(d) Scheduling: round robin, first come first served, multi-level feedback queues, shortest job first and shortest remaining time.
(e) Distributed, embedded, multi-tasking, multi-user and Real Time operating systems.
(f) BIOS.
(g) Device drivers.
(h) Virtual machines, any instance where software is used to take on the function of a machine, including executing intermediate code or running an operating system within another.
1.2.2 Applications Generation
(a) The nature of applications, justifying suitable applications for a specific purpose.
(b) Utilities.
(c) Open source vs closed source.
(d) Translators: Interpreters, compilers and assemblers.
(e) Stages of compilation (lexical analysis, syntax analysis, code generation and optimisation).
(f) Linkers and loaders and use of libraries.
1.2.3 Software Development
(a) Understand the waterfall lifecycle, agile methodologies, extreme programming, the spiral model and rapid application development.
(b) The relative merits and drawbacks of different methodologies and when they might be used.
(c) Writing and following algorithms.
1.2.4 Types of Programming Language
(a) Need for and characteristics of a variety of programming paradigms.
(b) Procedural languages.
(c) Assembly language (including following and writing simple programs with the Little Man Computer instruction set).
(d) Modes of addressing memory (immediate, direct, indirect and indexed).
(e) Object-oriented languages with an understanding of classes, objects, methods, attributes, inheritance, encapsulation and polymorphism.

Recommended Resources

1.2.4 Types of Programming Language

Assembly Language

Assembly language is a low-level programming language. Each assembly language is specific to a particular computer architecture. Assembly language uses mnemonics to represent low-level machine instructions or opcodes. Many operations require one or more operands in order to form a … Continue reading


Understanding Memory Address Modes

There are many ways to locate data and instructions in primary memory and these methods are called “memory address modes”. Memory address modes determine the method used within the program to access data either from the Cache or the RAM. … Continue reading


Object-Oriented Programming Concepts

Object-Oriented Programming (OOP) is a programming approach based on objects and classes. The object-oriented paradigm allows us to organise software as a collection of objects that consist of both data/attributes and behaviours. This programming concept appeared in the 1980s and … Continue reading


LMC Challenges
LMC Simulator LMC Mini Challenges LMC Burglar Alarm LMC 5-4-3-2-1 LMC Max Function LMC Countdown Timer LMC Higher or Lower Game LMC Finding the factors of… LMC Step Count Algorithm LMC Fibonacci Sequence LMC Triangular Numbers LMC Trace Table LMC Multiplication LMC Factorial


Procedural Programming
Procedural Programming Drag and Drop Sequencing, Selection and Iteration Quiz Procedural Programming Crossword Procedural Programming – Code Spotlight Procedural Programming Concepts – Q&A Procedural Programming Terminology


Prolog Challenges
Solving a Murder Mystery Using Prolog Sorting Hat Challenge (Prolog) Family Tree Challenge (Prolog) Food Web Challenge (Prolog)


OOP Challenges
OOP Quiz! OOP Terminology OOP Crossword Inheritance Q&A Encapsulation Q&A Classes & Objects Multimedia Library (OOP) My MP3 Playlist (OOP) Shopping Basket Class

Further Reading…

OCR H446/01 – 1.1 The characteristics of contemporary processors, input, output and storage devices

1.1 The characteristics of contemporary processors, input, output and storage devices - Overview / Checklist
1.1.1 Structure and function of the processor
(a) The Arithmetic and Logic Unit; ALU, Control Unit and Registers (Program Counter; PC, Accumulator; ACC, Memory Address Register; MAR, Memory Data Register; MDR, Current Instruction Register; CIR). Buses: data, address and control: how this relates to assembly language programs.
(b) The Fetch-Decode-Execute Cycle; including its effects on registers.
(c) The factors affecting the performance of the CPU: clock speed, number of cores, cache.
(d) The use of pipelining in a processor to improve efficiency.
(e) Von Neumann, Harvard and contemporary processor architecture
1.1.2 Types of processor
(a) The differences between and uses of CISC and RISC processors.
(b) GPUs and their uses (including those not related to graphics).
(c) Multicore and Parallel systems.
1.1.3 Input, output and storage
(a) How different input, output and storage devices can be applied to the solution of different problems.
(b) The uses of magnetic, flash and optical storage devices.
(c) RAM and ROM.
(d) Virtual storage.

Recommended Resources

1.1.1 Structure and function of the processor

From transistors to micro-processors

Vacuum Tubes and Transistors: Many consider the transistor to be one of the most important inventions of all time. Though the precursors of the transistor were invented in 1907 (at the time they were not transistors yet, they were vacuum … Continue reading


The Von Neumann Processor Architecture

John Von Neumann (1903-1957) was a Hungarian-American mathematician, physicist and computer scientist and a founding figure in computer science, with significant contributions to computing hardware design. The Von Neumann architecture refers to a processor architecture which has access to a … Continue reading


The FDE Cycle… In your own words

Before completing this task, you will need to revisit the main characteristics of the Von Neumann Processor Architecture. You task is to write a description in your books or on the space provided below to describe, in your own words, … Continue reading


LMC Simulator

LMC simulators are based on the Little Man Computer (LMC) model of a computer, created by Dr. Stuart Madnick in 1965. The LMC simulator is generally used to for educational purposes, because it models a simple Von Neumann architecture computer … Continue reading


CPU Design using Logic Gates

Let’s embark on an exciting journey to dissect and understand a small, fully functional CPU made entirely of logic gates. This design serves as a proof of concept, illustrating how the main components of a CPU work together to execute a program stored in memory using the Fetch-Decode-Execute cycle. … Continue reading


Further Reading…

UK Legislation relevant to Computer Science

As a computer scientist, you need to be aware of the legislation that is relevant to the use of Computer Science related technologies.

Whether you are designing a new website, creating a computer program or system or just using a computer in your work, you have to make sure you are always acting lawfully.

In the UK, there are three main acts that are very relevant to the use of computer science technologies:

  1. The Copyright, Designs & Patents Act
  2. The Data Protection Act
  3. The Computer Misuse Act

Let’s find out more about this legislation.

The Copyright, Designs & Patents ActThe Data Protection ActThe Computer Misuse Act

The Copyright, Designs & Patents Act

This act provides a legal means of ensuring that content creators can protect the work they have produced.

When anyone creates something, they automatically own it. This could include:

  • a picture, drawing or photograph
  • an animation, a film or a video clip
  • a sound file, podcast or music
  • a piece of text incl. an article, news report, blog post or a book
  • a video game or a computer program (e.g. source code)

When using copyrighted material, it is illegal to…

  • Make copies
  • Publish
  • Distribute
  • Sell copies

…unless you have been given permission by the copyright owner.

The Data Protection Act

The purpose of this act is to ensure our personal data is being used and dealt with sensibly.

Example of personal data:

  • Name and address
  • Date of birth
  • Employment records
  • Medical records
  • Religion/faith

This act stipulates that personal information stored on a computer system must be kept securely.

Personal data shall be processed fairly and lawfully in accordance with the rights of data subjects.

When an organisation stores personal data about individuals on a computer system, they must only store data that is relevant/necessary, accurate and up-to-date.

Personal data kept by an organisation on a computer system shall not be kept for longer than is necessary and should be deleted if it is no longer needed.

When personal data is shared with a third party, it has to be done fairly and lawfully, securely and with the permission of the data subject.

The Computer Misuse Act

The purpose of this act is to discourage people from accessing computer systems without permission (hacking) whether to intend to commit further illegal activities or not.

This acts make it illegal to access data on a computer when that material will be used to commit further illegal activity, such as fraud or blackmail.

It is also illegal to access and change the contents of someone’s files without their permission. It is therefore illegal to install a virus or other malware on someone’s computer as this is done without their consent.

UK Legislation: Drag and Drop Task

Complete the following activity to test your understanding of the three main UK legislation relevant to Computer Science.
UK Legislation – Drag and DropOpen in New Window

Types of Software

A computer system is made of both hardware and software.

The hardware components of a computer systems are the physical components of the system and include the motherboard, the CPU, RAM and ROM and all input, output and output devices.

Software consists of the computer programs that run on hardware. They fall into three main categories:

Operating Systems


The Operating System is an essential software needed to operate a computer. The Operating System is responsible for:

  • Process Management & Multitasking: The operating system allocates CPU time to the different jobs being processed by the CPU and may allow for multitasking, enabling the end-user to work on different applications at the same time.
  • Memory Management: The Operating System allows the user to load files and applications into the primary memory (RAM) and to remove these from RAM when they are no longer needed.
  • File Management: The Operating System lets the user organise their files in a folder structure. Users can create, rename, delete or move folders, subfolders and files that will be stored by the Operating System on the secondary storage devices.
  • Providing a User Interface to allow the user to interact with the computer. On a laptop or desktop computer most Operating systems (e.g. Windows, MacOs, Linux etc.) provide a Graphical User Interface (GUI) enabling the user to open apps in separate windows, use the mouse pointer to click on menus and icons. Similar Graphical User Interfaces are also available on smartphones running an iOS or Android Operating Systems.
  • User Management: Maintaining User Accounts and Access Levels: The operating system enables users to authenticate themselves often using a username or password or, on more recent smartphones, a fingerprint scanner or facial recognition software. Once logged in, the identified user will be given access to their own files, folders and settings based on their access-level
  • Peripheral Management: Managing the hardware including input, output and storage devices: The Operating System is the only software that will communicate with the different hardware components to decide what to display on screen, where to save or retrieve a file on secondary storage, what information to send to the printer, etc…

Drivers

To enable the Operating System to communicate with a wide range of hardware peripherals from many different manufacturers it is sometimes required to install drivers which are used to teach the OS how to communicate with a specific peripheral. (e.g. When connecting a new printer or game controller, you may have to install the required driver first).

Utility Software

Utility software is specific software that performs tasks to help with maintaining the computer system, to optimise the resources and keep the system secure.

There is a wide range of utility software including:

  • File Management software to help you organise your files using folders and sub-folders, move, rename or delete files and folders.
  • Disk cleanup software to help you free up space on your hard disk, and hence improve system performance. Disk cleanup software scans your disk to locate temporary files, Internet cache files, and other unnecessary program files that you can safely delete to free up space.
  • Defragmentation software is used to reorganise/optimise how files are stored on a hard-disk drive resulting in reduced read/write time when accessing files.
  • Backup software can be used to perform regular automated backup of all your files. Taking a backup of your files can be useful in case you have lost a file or your files are corrupted.
  • File compression software is used to create compressed files or group of files to save space on your secondary storage or to save time when transferring these files across the Internet.
  • Anti-virus and Anti-malware software that scan the content of your hard-disk drive to identify and quarantine potentially infected files and other malware such as trojan horses, worms, spyware or ransomware.
  • Firewall Software can be used to scan all incoming and outgoing traffic from/to your computer and block malicious requests and potential hacking attempts.
  • Encryption software is used to encrypt sensitive information before either storing it (e.g. Password Management Software) or before sending it across the network/ the Internet

Application Software

Application software is the main software that you will want to use when on your computer, tablet or smart phone. It incudes software such as:

  • Word Processing Software,
  • Spreadsheet Software,
  • Presentation Software,
  • Graphic & Photo Editing Software,
  • Video Editing Software,
  • Web Browsers.

Most of the Apps you use on your smartphone are also examples of application software.


Types of Software – Drag and DropOpen in New Window