0% found this document useful (0 votes)
2 views

logic gates

The document provides an overview of logic gates, including their functions and symbols, as well as how they can be combined to form logic circuits. It explains various types of gates such as NOT, AND, OR, NAND, NOR, and XOR, along with their truth tables. Additionally, it covers the creation and interpretation of truth tables for logic circuits with multiple inputs.

Uploaded by

Jeanic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

logic gates

The document provides an overview of logic gates, including their functions and symbols, as well as how they can be combined to form logic circuits. It explains various types of gates such as NOT, AND, OR, NAND, NOR, and XOR, along with their truth tables. Additionally, it covers the creation and interpretation of truth tables for logic circuits with multiple inputs.

Uploaded by

Jeanic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Head to www.savemyexams.

com for more awesome resources

CIE IGCSE Computer Science Your notes

10.1 Logic Gates


Contents
Logic Gates
Logic Circuits
Truth Tables

Page 1 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Logic Gates
Your notes
Logic Gates
A logic gate is a building block of a digital circuit. Logic gates perform a logical operation on one or
more binary inputs to produce a binary output
An electrical signal entering the logic gate is represented by a 1
No electrical signal is represented by a 0
There are several types of logic gates, each performing a specific logical operation
Logic gates can be combined to carry out meaningful functions such as performing calculations or
checking if data meets certain conditions
A table showing the symbol used to represent each logic gate

Gate Symbol Description

The NOT gate takes a single binary input and outputs the
NOT
opposite of the input

The AND gate takes two inputs and produces one output
Only two positive inputs (1 and 1) will result in a positive output of
AND
1
If either of the inputs is a 0 the output will be a 0

The OR gate takes two inputs and produces one output


OR
If either of the inputs is positive (1) the output will be 1

Page 2 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Your notes
A NAND gate is a combination of an AND gate followed by a NOT
NAND gate. If both inputs are a 1 it will output a 0. Any other
combination of inputs will result in an output of 1

A NOR gate is a combination of an OR gate followed by a NOT


NOR gate. If both inputs are 0 it will output a 1. Any other combination
of inputs will result in an output of 0

An XOR gate (exclusive OR) will output a 1 if the inputs are


XOR
different to one another (a 1 and a 0)

Exam Tip
You will need to either draw a diagram of a logic circuit using these symbols, or you will have to
interpret an existing diagram. This is why it is important to remember the symbol of each gate and
the logic rules for each one

Page 3 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Logic Circuits
Your notes
Logic Circuits
Logic gates can be combined to produce different outputs
The combination of two or more logic gates forms a logic circuit
A logic diagram is a visual representation of combinations of logic gates within a logic circuit
An example of Logic Circuit

In this diagram, the inputs are represented by A and B


P is the output of the OR gate on the left and becomes the input of the NOT gate. This is called an
intermediary output
Q is the final output of the logic circuit

Exam Tip
You may be asked to draw a logic circuit from a logic statement or a boolean expression. Circuits
must be drawn without simplification
Logic circuits will be limited to a maximum of three inputs and one output

An example of Logic Circuit

Page 4 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Your notes

This logic circuit contains three inputs (A, B and C)


It contains a NAND gate, a NOT gate, a NOR gate and finally an OR gate
X is the final output
This logic circuit can be represented as a logic expression as
X=((NOT(A NAND B)) OR (B NOR C))

Page 5 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Worked example
Your notes
A sprinkler system switches on if it is not daytime (input A) and the temperature is greater than 40 (input
B)
Draw a logic circuit to represent the problem statement above
[2]

Exam Tip
You may need to draw a logic circuit from a problem statement (as in the example above), from a
truth table or from a boolean expression

Page 6 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Truth Tables
Your notes
Truth Tables
NOT gate
A NOT gate has one input and will invert it to produce an opposite output. This is shown in the truth
table below
A is the input
Z is the output

Input Output

A Z

0 1

1 0

AND gate
An AND gate has two inputs

Page 7 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Your notes

Input Output

A B Z

0 0 0

0 1 0

1 0 0

1 1 1

The AND gate truth table shows the only combination of inputs which will result in a positive output is 1
and 1
OR gate
An OR gate has two inputs

Page 8 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Input Output
Your notes

A B Z

0 0 0

0 1 1

1 0 1

1 1 1

The truth table shows an OR gate produces an output of 1 if any of the inputs are a 1
NOR gate
A NOR gate has two inputs

Input Output

A B Z

0 0 1

0 1 0

1 0 0

1 1 0

Page 9 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

The truth table shows a NOR gate works oppositely to an OR gate - the only input combination which
results in a 1 is two 0s
Your notes
NAND gate
A NAND gate has two inputs

Input Output

A B Z

0 0 1

0 1 1

1 0 1

1 1 0

The truth table shows a NAND gate works in the opposite way to an AND gate - the only input
combination which does not result in a 1 is two positive inputs (1 +1)
XOR gate
An XOR gate has two inputs

Page 10 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Your notes

Input Output

A B Z

0 0 0

0 1 1

1 0 1

1 1 0

The truth table shows how an XOR gate works. It will only output a 1 if the two inputs are different to one
another

Page 11 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Worked example
Your notes
A truth table for a two input (A and B) logic gate

A B X

0 0 0

0 1 1

1 0 1

1 1 1

Identify what logic gate the truth table is representing


[1]
OR [1]
What symbol is used to represent this logic gate?
[1]

[1]

Truth tables can also be used to help work out the possible outputs of a logic circuit containing more
than one gate

Exam Tip
You will only be asked to create truth tables for logic circuits with three inputs. The number of rows
you should have in a three input truth table is 8 (not including the headings)

Page 12 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

When creating a truth table for multiple inputs, begin by entering the possible input combinations into
the leftmost columns
A truth table for a three input (A, B and C) logic gate Your notes
A B C Z

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1


The column on the right contains the final output of the logic circuit (Z)
Column(s) in between the inputs and the final output can be used to help work out the final output by
containing intermediary outputs
Intermediary outputs are the output of gates found within the logic circuit
In the logic circuit diagram below, D and E are intermediary outputs

The fourth column labelled D represents the output of NOT A


A B C D (NOT A) E Z

Page 13 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

0 0 0 1

0 0 1 1 Your notes
0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 0

The next intermediary output is E which is the equivalent of ((NOT A) AND B) this notation is called a logic
expression
The E intermediary output can be worked out by performing the AND logical operation on columns B
and D

A B C D (NOT A) E ((NOT A) AND B) Z

0 0 0 1 0

0 0 1 1 0

0 1 0 1 1

0 1 1 1 1

1 0 0 0 0

1 0 1 0 0

1 1 0 0 0

1 1 1 0 0

The final output (Z) can be worked out by performing the OR logical operation on columns E and C

Page 14 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

D (NOT Z (((NOT A) AND B) OR


A B C E ((NOT A) AND B) Your notes
A) C)

0 0 0 1 0 0

0 0 1 1 0 1

0 1 0 1 1 1

0 1 1 1 1 1

1 0 0 0 0 0

1 0 1 0 0 1

1 1 0 0 0 0

1 1 1 0 0 1

Exam Tip
In the exam it is likely truth tables will just contain columns for the inputs and the final output. You
can still work out intermediary outputs to help you find the final output answers

Page 15 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to www.savemyexams.com for more awesome resources

Worked example
Your notes

Complete the Truth table for the logic circuit above

A B Q

0 0

0 1

1 0

1 1

[4]

A B Q

0 0 1

0 1 0

1 0 0

1 1 1

[4]

Page 16 of 16

© 2015-2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers

You might also like