Teach Computing

Revision notes, activities, lesson plans, teaching ideas, and other resources for GCSE, A-Level, and IB Computer Science teachers and students.

What's New

Boolean logic worksheet pack

These three Boolean logic worksheets have exam style questions on logic sta...

Edexcel Computer Science (9-1)

by Ann Weidmann et al Amazon.com | Amazon.co.uk | Book Depository This bo...

Dijkstra's algorithm video

This video is probably the best explanation of Dijkstra's algorithm for IB ...

Input-Process-Output (IPO) Model

The Input-Process-Output model is a simple topic but some students sometime...

Hexadecimal

A comprehensive review of hexadecimal. The video covers not only how to u...

Subprograms, Local Variables & Structured Programming

Subprograms are known by several different names - methods, functions, proc...

Utility Software and Models

Some students find the difference between operating system software and ut...

Data Structures

This video explains different types of data structures - 1 dimensional ar...

Operating System (OS) - GCSE Computer Science

A detailed overview of operating systems, starting with the general tasks t...

3.3 Fundamentals of Data Representation

Lesson resources

Binary crossword
Binary crossword
Computer Science crosswords pack
Computer Science crosswords pack
Number systems worksheet
Number systems revision worksheet
Binary and Hexadecimal exam
Binary and Hexadecimal test
Binary shifts worksheet
Binary shifts worksheet
Data representation lesson activity
Spot the mistakes activity
Recommended AQA GCSE Computer Science textbooks
AQA GCSE Computer Science textbooks

3.3.1 Number bases

Image representation

B&W Pixelation

There are three versions of this excellent applet, designed for the University of Chicago's Introduction to Computer Science course to help students understand image representation in computers. In the first version, students simply enter binary digits to represent black or white pixels. In the second version students are introduced to the concept of a very basic file format, with the first two bytes representing the image dimensions. Students can also enter the data in binary or hexadecimal. The final version is even more complex, allowing students to specify the colour depth of the image, and requiring them to enter the appropriate number of bits for each pixel.

Overall this site is an excellent introduction to data storage and image representation, and makes a complex subject quite entertaining.


Updated: 2015-04-09
Introduction to binary

Introducing Binary

The new-look BBC Bitesize site have extensive notes on binary numbers, with clear diagrams and examples of how they work and how they can be added. Several videos brighten up the content and key concepts are related to real-life situations - such as CPU word size. Later pages of the notes cover conversion between different number bases. The site also features short multiple-choice quizes to test students' understanding of the key concepts.


Updated: 2015-04-15
HTML Color Picker

Color Picker

A simple HTML colour picker. This one shows a colour wheel plus both the hexadecimal colour values and the RGB (Red, Green, Blue) values. This should help students understand how hexadecimal is used to represent different colours.


Updated: 2015-04-15
Binary lesson resources

Lesson - Data representation - binary

This download contains all lesson resources necessary to teach students binary. It includes explanations of the system and lesson activities.

This lesson is one of the many excellent resources provided under CC-NC-SA by Mr Colley.


Updated: 2017-10-15
Hexadecimal lesson

Lesson - Data representation - hexadecimal

This download contains all lesson resources necessary to teach students base 16 (hexadecimal). It includes PowerPoint presentations that cover the number system and converting to denary and binary. There are also some nice hex table handouts for students who may be struggling to grasp the concepts. how sound is represented in binary.

This lesson is one of the many excellent resources provided under CC-NC-SA by Mr Colley. I've added PDF versions of the .pub versions found in the original download, for those who don't have Microsoft Publisher.


Updated: 2017-10-15
Counting in binary worksheet

Counting in binary

This handy PDF serves as a good summary sheet for students learning to count in binary. It covers decimal numbers from 0 to 63 (5 bits). It is good for GCSE and younger students, although it can be useful for older students too.

The sheet was created by Gary Kacmarcik at the excellent cse4k12 site and is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.


Updated: 2017-10-17
Hexadecimal worksheet

Counting in hex

Similar to the binary sheet, this handy document covers decimal numbers 0 to 63. It is useful for teaching students who are new to binary, or as a quick recap for those revising it. The sheet was created by Gary Kacmarcik at the excellent cse4k12 site and is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.


Updated: 2017-10-17
Binary lesson activities

Binary and Hexadecimal starter activities

Two lesson starter, plenary, or homework activities are the binary crossword and the matching quiz. They test students' ability to read binary and hexadecimal, and convert between these systems and denary.


Updated: 2017-10-17
Base 2 calculator

Base 2 calculator

This interactive doesn't actually calculate - instead it lets students flip bits in a byte and see the result calculated automatically. It is most useful when first explaining binary concepts to students.


Updated: 2017-10-24
Binary cards interactive

Binary cards interactive

An online version of binary cards that can be switched on and off to produce a binary number. These are most useful when teaching younger children how binary numbers work.


Updated: 2017-10-24

3.3.2 Converting between number bases

Binary tetris

Binary Tetris

Binary Tetris is a flash game designed to help teach students the binary number system. Players must flip bits to achieve the required number, or add up the bits to calculate the number being represented. I'd recommend asking students to turn their sound off before starting this!


Updated: 2015-04-07
Binary game

Binary Fun

This simple game challenges players to flip the right bits to create the specified number. The current total is displayed as bits are changed, and there is a timer to complete against. Students may be surprised to learn this game was created using Scratch.


Updated: 2017-10-17
Hexadecimal game

Hexadecimal-binary matching game

This is a fun little matching pairs style game in which players must match decimal numbers with their hexadecimal equivalents. A good way of testing students' ability to quickly perform mental conversions. Click here to play.


Updated: 2017-11-05
Binary crosswords

Binary crossword activities

These two puzzles are a great way to test students' hexadecimal to binary conversion skills. They work much like a normal crossword, except that the clues are written in hexadecimal and the answers must be written in binary. Once complete, the crosswords make simple bitmap images if the 1s are shaded and the zeroes left blank. You can download puzzle 1 (answers) and puzzle 2 (answers).

These puzzles were created by Gary Kacmarcik at the Computer Science & Engineering for K-12 site - an excellent site which I recommend you visit. They are licensed under the Creative Commons Attribution-Share Alike 3.0 license.


Updated: 2015-04-15
Binary to hexadecimal conversion

Binary to hexadecimal

A worksheet that explains the "divide into groups of 4" method of converting binary numbers to hexadecimal numbers.

This was created by Gary Kacmarcik at the Computer Science & Engineering for K-12 site - an excellent site which I recommend you visit. They are licensed under the Creative Commons Attribution-Share Alike 3.0 license.


Updated: 2015-04-16
Binary to decimal

Binary-Decimal Conversions

This video contains lots of examples of converting binary numbers to decimal numbers, and vice versa. A good revision guide.


Updated: 2018-02-17

3.3.3 Units of information

3.3.4 Binary arithmetic

Binary addition

Binary Addition & Overflow

Another excellent video from ComputerPhile with their usual clear explanations and worked examples. This video recaps binary numbers and then explains how to perform binary addition. It also deals with the potential problem of overflow and how it can be handled.


Updated: 2015-04-29
Binary shifts

Binary shifts - arithmetic and logical

This worksheet contains practice questions for performing logical shifts and arthimetic shifts on binary numbers. You can download the worksheet and the answers.


Updated: 2017-12-15
Shifts

Video: Logical shifts and Arithmetic shifts

These two videos cover logical binary shifts and arithmetic binary shifts - which for obvious reasons are often confused by students. It is recommended to watch the videos in this order, as the arithmetic shifts video explains some of the shortcomings of logical shifts. There are plenty of examples to help you understand each type.


Updated: 2018-02-17

3.3.5 Character encoding

Unicode

Characters, Symbols and the Unicode Miracle

Characters, Symbols and the Unicode Miracle explains how ASCII arose from the need to communicate data in a compatible manner between computer systems, and the problems that arise with this apparently simple task. It then discusses the creation of the Unicode system.


Updated: 2015-04-29
Unicode character table

Unicode Table

Unicode table is a nice scrollable web page which lists all of the unicode characters. The title and a brief description of each section is presented while you scroll. This page is useful for helping students realise just how many different characters need to be represented by computer systems, and the problems this would cause with a standard like Unicode.


Updated: 2015-04-29
Lesson - text representation

Lesson - Data representation - text

This download contains all lesson resources necessary to teach students how ASCII is used to representation text in a computer system. The download includes several fun activities where students have to uncover 'secret' messages using their understanding of binary and ASCII. There are different worksheets for students of different levels.

This lesson is one of the many excellent resources provided under CC-NC-SA by Mr Colley.


Updated: 2017-10-15
Text representation worksheet

Text representation worksheets

Gary Kacmarcik at the excellent cse4k12 site has created a set of sheets for a lesson activity on text representation. The first sheet is an ASCII table and the other two sheets ask students to encode a text message and decode a message respectively. Note that students are expected to encode and decode using hexadecimal rather than binary (although they could easily be asked to use binary instead).


Updated: 2017-10-17

3.3.6 Representing images

Bitmap lesson plan

Bitmaps Activity

These activities involve students converting between bitmap images and numeric representations of them in binary and hexadecimal. This is a great way to see how relatively complex information can still be represented as binary. You can download the worksheet with guidance and an additional blank worksheet.

The activities were created by Gary Kacmarcik at the Computer Science & Engineering for K-12 site, which contains an excellent range of activities. They are licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.


Updated: 2015-04-15
Image representation

Image Representation - Flash activity

This Flash activity lets students draw a simple bitmap image and represents it using a simple run-length encoding (RLE) algorithm in real time. Students can also important text representations of the compressed data and the application will draw the corresponding image. The web page is not in English but the application is still perfectly usable.


Updated: 2015-04-15
Image representation

CS Field Guide - Data representation

CS Field Guide is an absolutely fantastic resource filled with material that is well written, clear,and accessible. Each section comes with highlighted key points, extension points, and even interactives to help understand the concepts. The interactives are excellent as teaching resources (many of them are linked here), while the notes themselves make excellent revision resources - particularly for GCSE.

This section covers all aspects of data representation - numbers, text, images, and instructions.


Updated: 2017-10-24
Pixel viewer

Pixel colour code viewer

This pixel viewer can help students understand how images are created and represented. Zooming right into the image reveals the RGB values of each pixel, shown in decimal.


Updated: 2017-10-24
Bit comparer

Image bit depth comparison

This is a great little resource for demonstrating the effect of bit depth on images. The same image is displayed at various colour depths from 24 bit to 2 bit. It is also possible to upload your own images and have them displayed in the same way.


Updated: 2017-10-24
Caesar cipher

Caesar cipher

A simple interactive that implements a basic Caesar cipher. One great use for this is to highlight just how weak Caesar ciphers are. By giving students examples of ciphertext and asking them to use this tool to break them, they should realise just how easy it is to perform a brute force attack.


Updated: 2017-10-24
RGB Colour matcher

RGB Colour matcher

A colour matching tool that asks users to play with the RGB sliders to match a specified colour. This is a great way to help students understand how red, green, and blue are mixed to produce colours. What makes this colour matcher stand out is that it also represents the colour values in binary (24 bit) at the bottom. This makes it a useful companion for tools like Pixelization (see elsewhere on this page).


Updated: 2017-10-24

3.3.7 Representing sound

Computer science sound representation

Lesson - Data representation - sound

This download contains all lesson resources necessary to teach students how sound is represented in binary. It includes PowerPoint presentations, worksheets, and sample sounds for students to play.

This lesson is one of the many excellent resources provided under CC-NC-SA by Mr Colley.


Updated: 2017-10-15

3.3.8 Data compression

Image, audio, and text compression

Image, audio, and text compression

This very comprehensive page from the Computer Science Field Guide has extensive but clear notes on lossless and lossy compression. The page is well written and designed for a high school audience, with easy to understand examples, video, and even interactive sections. There are also extension "Extra for Experts" sections. The page covers image compression, audio compression, and text compression.


Updated: 2015-04-16
Run Length Encoding

Run Length Compression (RLE) interactive

This activity shows how a computer would represent a simple image when using Run Length Compression (RLE). Students can alter the image to see how the compression data would change. This is a good resource for helping students understand how lossless compression does not always result in significant size reduction.


Updated: 2017-10-24
JPEG Comparison

JPEG Compression comparison

A simple interactive that compares a highly compressed JPEG image with a less compressed image. A slide lets you view different parts of the image. JPEG banding is particularly visible in the sky but less so in other areas - the reasons for this make for interesting classroom discussions.


Updated: 2017-10-24
Compression

Compression: Crash Course Computer Science

This video explains compression techniques in the context of images. It is recommended that students have an understanding of how image data is stored (e.g. bit depths) before watching this video. The video is very comprehensive and so it may take a couple of viewings to fully understand the details of the examples being presented, but it is worth it.


Updated: 2018-02-17
Compression

Lossy and Lossless (RLE) Compression

These videos from Computer Science Tutor make great revision sources. This particular videos covers the theory behind the two types of compression - lossless and lossy.


Updated: 2018-02-17