# 1.4 Data types, data structures and algorithms

# 1.4.1 Data Types

### 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*

### 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*

### Binary conversion activities

These two worksheets help students with decimal to binary conversion and vice versa. The activities were created by Gary Kacmarcik at the Computer Science & Engineering for K-12 site and are licensed under the Creative Commons Attribution-Share Alike 3.0 license.

*Updated: 2015-04-15*

### 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*

### 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*

### 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*

### 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*

### 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 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*

### 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 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 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*

### 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*

# 1.4.2 Data Structures

# 1.4.3 Boolean Algebra

### Logic Simplification Examples Using Boolean Rules

This is an excellent video which goes clearly through the individual steps of simplifying Boolean expressions. The video starts with a clear list of simplification rules and explains why they work. There are then two examples, complete with logic circuit diagrams, which are worked through line by line until they are fully simplified. This is probably the clearest explanation of Boolean simplification I have seen. (The video is a lot better than the screenshot makes it look!)

*Updated: 2015-11-24*

### Boolean logic worksheets

These sheets from cse4k12 are excellent activities to help students understand Boolean logic and Boolean conditions. The sheets present students with a series of 2D shapes with different properties. Students must identify and use different Boolean conditions (e.g. isTriangle, isShaded) to select particular groups of shapes.

PDF and SVG versions of the documents are supplied, and they are licenced under CC-SA, so you can make alterations if you wish (e.g. adding colour)

The site also has several related worksheets, such as Boolean logic to Venn diagram handouts and truth tables for logic gates.

*Updated: 2017-10-17*