Teach Any Computer Science Class
We have put together a full GCSE Computer Science curriculum that will give you all the teaching materials you need to teach any topic.
Whether you're a brand new Computer Science teacher, or you've been teaching ICT for years, our resources will save you hours and hours of lesson preparation every single week.
View the Lessons →Candidates should be able to:
 explain why data is represented in computer systems in binary form
 understand and produce simple logic diagrams using the operations NOT, AND and OR
 produce a truth table from a given logic diagram.
Why is data represented in computer systems in binary form?
Computer systems are based on logic circuits. This type of circuit only has two states. For example, a current can either be flowing/not flowing or a switch can be either on/off. These two states are easily and reliably detected and transmitted by computer systems.
In computer systems data is represented in binary form because binary numbers are made up of only 2 digits (0/1) which means the two states of a logic circuit can easily represent/store a binary number (i.e. 0 = OFF and 1 = ON).
In computer storage, data is also easily stored in binary form as long as the storage media can represent the 2 different digits:
 On magnetic media such as a hard drive these are represented by magnetising an area of the disk platter either North or South.
 On optical media such as a CD/DVD/Blu Ray disk, these are represented by an area of the disk surface either reflecting or not reflecting a laser beam.
Every possible type of data such as numbers, text, audio, images, video etc. has to be converted (digitised) into binary form before it can be stored or processed by a computer system.
Conversion between denary (decimal) and binary:
Denary to binary conversion  Binary to denary conversion 

What are logic diagrams and how are they produced?
A logic gate performs a logical operation on one or more logic inputs and produces a single logic output. The logic used in computer systems is called Boolean logic because there are only 2 possible values, TRUE or FALSE (represented in binary as 1 or 0).
A logic diagram is a diagram that represents one or more of logic gates linked together to form a logic circuit.
In logic diagrams, symbols are used to represent logic gates, letters are used to label the input(s) and output(s) and lines are used to show how logic gates are connected.
The 3 basic logic gates are called AND, OR and NOT gates.
The symbols for the 3 basic logic gates  

AND  OR  NOT 
This logic gate has 2 inputs and 1 output.
The output is TRUE only if one input AND the other input is TRUE. This logic gate can be written as a logic statement: O = A AND B 
This logic gate has 2 inputs and 1 output.
The output is TRUE if one input OR the other input isTRUE. This logic gate can be written as a logic statement: 
This logic gate has 1 input and 1 output.
The output is TRUE if the input is FALSE and visaversa. This logic gate can be written as a logic statement: O = NOT A 
Examples of Logic Diagrams
In this logic diagram, the output will be FALSE onlywhen inputs A and B are both TRUE.
This logic diagram can be written as a logic statement: O = NOT (A AND B) This gate combination is known as a NAND gate and can be represented by the symbol shown below. 
In this logic diagram, the output will be TRUE only when inputs A and B are both FALSE.
This logic diagram can be written as a logic statement: O = NOT (A OR B) This gate combination is known as a NOR gate and can be represented by the symbol shown below. 
In this logic diagram, the output will be TRUE onlywhen input A is FALSE and input B is TRUE.
This logic diagram can be written as a logic statement: O = (NOT A) AND B 
The logic diagram below is for a circuit made up of AND, OR and NOT gates. It has 2 inputs (A and B) and 2 outputs (S and C). This circuit is called a halfadder and is designed to add 2 binary numbers with a carry (C) if the sum (S) is greater than 1.
This logic diagram can be written as the following logic statements:
S = (A OR B) AND (NOT (A AND B))
C = (A AND B)
What is a truth table?
A truth table is a table that lists all the output(s) for every possible combination of input(s) in a logic diagram.
The truth tables for the 3 most common logic gates.
AND  OR  NOT  




How is a truth table produced from a logic diagram?
To produce a truth table from a logic diagram you need to work out the outputs for every possible combination of inputs. If a logic diagram has only 2 inputs then there will only be 4 input combinations (00, 01, 10 and 11). If there are 3 inputs then there will be 8 possible combinations and 4 inputs would give 16 combinations. Therefore n inputs gives 2n outputs.
Examples of truth tables produced from logic diagrams



The truth table for the halfadder circuit:
INPUTS  OUTPUTS  

A  B  D  E  S  C 
0  0  0  1  0  0 
0  1  1  1  1  0 
1  0  1  1  1  0 
1  1  1  0  0  1 
Logic gates are typically formed as integrated circuits on semiconductor chips.
The example shown is a 14 pin chip containing 4 NAND gates.
Extras
 Logic gate problems 1 – multichoice questions
 Logic gate problems 2 – multichoice questions
 Truth tables – multichoice questions
 Binary logic – gap fill exercise