Logic Gates - 1 - Merged

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

GCSE IGCSE AS A Level O Level Pre U IB Log in Join now

CIE IGCSE Computer Science


Revision Notes

IGCSE Computer Science CIE Revision Notes 10. Boolean logic 10.1 Logic Gates Logic Gates

Logic Gates 1. Data Representation

Download PDF Test Yourself


2. Data transmission

3. Hardware
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 4. Software
An electrical signal entering the logic gate is represented by a 1 (TRUE)
No electrical signal is represented by a 0 (FALSE)
There are several types of logic gates, each performing a speci c logical operation
Logic gates can be combined to carry out meaningful functions such as performing calculations or 5. The internet and its uses
checking if data meets certain conditions
A table showing the symbol used to represent each logic gate
6. Automated and emerging technologi…
Download notes on Logic Gates
Gate Symbol Description
7. Algorithm design and problem-solving

8. Programming
The NOT gate takes a single binary input and outputs the
NOT
opposite of the input
9. Databases

10. Boolean logic


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

Logic Circuits

Truth Tables
The OR gate takes two inputs and produces one output
OR
If either of the inputs is positive (1) the output will be 1 10.2 Logic Expressions

A NAND gate is a combination of an AND gate followed by a


NAND NOT 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
di erent 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

Test yourself Next topic

Did this page help you? Yes No

Author: Becci Peters


Becci has been a passionate Computing teacher for over 9 years, teaching Computing across the UK helping to engage, interest and develop
con dence in the subject at all levels. Working as a Head of Department and then as an educational consultant, Becci has advised schools in
England, where her role was to support and coach teachers to improve Computing teaching for all. Becci is also a senior examiner for multiple
exam boards covering GCSE & A-level. She has worked as a lecturer at a university, lecturing trainee teachers for Computing.

Resources Members Company Quick Links


Home Log in About us GCSE Revision Notes
Join Contact us IGCSE Revision Notes
FAQ Jobs A Level Revision Notes
Support Terms Biology
Privacy Chemistry
Physics
Maths
2022 Advance Information

Missing something? Tell us

© Copyright 2015−2023 Save My Exams Ltd. All Rights Reserved.


IBO was not involved in the production of, and does not endorse, the resources created by Save My Exams.
GCSE IGCSE AS A Level O Level Pre U IB Log in Join now

CIE IGCSE Computer Science


Revision Notes

IGCSE Computer Science CIE Revision Notes 10. Boolean logic 10.1 Logic Gates Truth Tables

Truth Tables 1. Data Representation

Download PDF Test Yourself


2. Data transmission

3. Hardware
Truth Tables
NOT gate
4. Software
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 5. The internet and its uses

6. Automated and emerging technologi…

7. Algorithm design and problem-solving

8. Programming
Input Output

9. Databases
A Z

0 1
10. Boolean logic
1 0

10.1 Logic Gates


AND gate
An AND gate has two inputs Logic Gates

Logic Circuits

Truth Tables

10.2 Logic Expressions

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

Input Output

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

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

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 

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 di erent to
one another

Worked example
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)

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

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 nal output of the logic circuit (Z)
Column(s) in between the inputs and the nal output can be used to help work out the nal 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

0 0 0 1

0 0 1 1

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 nal output (Z) can be worked out by performing the OR logical operation on columns E and C

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


A B C E ((NOT A) AND B)
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 nal output. You can
still work out intermediary outputs to help you nd the nal output answers

Worked example

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 1

1 0 0

1 1 1

[4]

Test yourself Next topic

Did this page help you? Yes No

Author: Becci Peters


Becci has been a passionate Computing teacher for over 9 years, teaching Computing across the UK helping to engage, interest and develop
con dence in the subject at all levels. Working as a Head of Department and then as an educational consultant, Becci has advised schools in
England, where her role was to support and coach teachers to improve Computing teaching for all. Becci is also a senior examiner for multiple
exam boards covering GCSE & A-level. She has worked as a lecturer at a university, lecturing trainee teachers for Computing.

Resources Members Company Quick Links


Home Log in About us GCSE Revision Notes
Join Contact us IGCSE Revision Notes
FAQ Jobs A Level Revision Notes
Support Terms Biology
Privacy Chemistry
Physics
Maths
2022 Advance Information

Missing something? Tell us

© Copyright 2015−2023 Save My Exams Ltd. All Rights Reserved.


IBO was not involved in the production of, and does not endorse, the resources created by Save My Exams.
GCSE IGCSE AS A Level O Level Pre U IB Log in Join now

CIE IGCSE Computer Science


Revision Notes

IGCSE Computer Science CIE Revision Notes 10. Boolean logic 10.1 Logic Gates Logic Circuits

Logic Circuits 1. Data Representation

Download PDF Test Yourself


2. Data transmission

2.1 Types and Methods of Data Tran…


Logic Circuits
Logic gates can be combined to produce di erent outputs
The combination of two or more logic gates forms a logic circuit 2.2 Methods of Error Detection
A logic diagram is a visual representation of combinations of logic gates within a logic circuit
An example of Logic Circuit
2.3 Encryption

3. Hardware

4. Software

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 5. The internet and its uses
intermediary output
Q is the nal output of the logic circuit

6. Automated and emerging technologi…

7. Algorithm design and problem-solving


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

9. Databases

An example of Logic Circuit


10. Boolean logic

10.1 Logic Gates

Logic Gates

Logic Circuits

Truth Tables

10.2 Logic Expressions

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


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

Worked example
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

Test yourself Next topic

Did this page help you? Yes No

Author: Becci Peters


Becci has been a passionate Computing teacher for over 9 years, teaching Computing across the UK helping to engage, interest and develop
con dence in the subject at all levels. Working as a Head of Department and then as an educational consultant, Becci has advised schools in
England, where her role was to support and coach teachers to improve Computing teaching for all. Becci is also a senior examiner for multiple
exam boards covering GCSE & A-level. She has worked as a lecturer at a university, lecturing trainee teachers for Computing.

Resources Members Company Quick Links


Home Log in About us GCSE Revision Notes
Join Contact us IGCSE Revision Notes
FAQ Jobs A Level Revision Notes
Support Terms Biology
Privacy Chemistry
Physics
Maths
2022 Advance Information

Missing something? Tell us

© Copyright 2015−2023 Save My Exams Ltd. All Rights Reserved.


IBO was not involved in the production of, and does not endorse, the resources created by Save My Exams.
GCSE IGCSE AS A Level O Level Pre U IB Log in Join now

CIE IGCSE Computer Science


Revision Notes

IGCSE Computer Science CIE Revision Notes 10. Boolean logic 10.2 Logic Expressions Logic Expressions

Logic Expressions 1. Data Representation

Download PDF Test Yourself


2. Data transmission

3. Hardware
Logic Expressions
A logic expression is a way of expressing a logic gate or logic circuit as an equation
The output appears on the left of the equals sign with the inputs and logic gates on the right 4. Software

Gate Symbol Truth Table Logic Expression


5. The internet and its uses

A Z 6. Automated and emerging technologi…


NOT Z=NOT A
0 1

1 0 7. Algorithm design and problem-solving

A B Z
8. Programming
0 0 0
AND Z=A AND B
0 1 0 9. Databases
1 0 0

1 1 1 10. Boolean logic

A B Z
10.1 Logic Gates
0 0 0
OR Z=A OR B
0 1 1
10.2 Logic Expressions
1 0 1
Logic Expressions
1 1 1

A B Z

0 0 1
NAND Z=A NAND B
0 1 1

1 0 1

1 1 0

A B Z

0 0 1
NOR Z=A NOR B
0 1 0

1 0 0

1 1 0

A B Z

0 0 0
XOR Z=A XOR B
0 1 1

1 0 1

1 1 0

Logic circuits containing multiple gates can also be expressed as logic expressions/statements
An example logic circuit containing two inputs

The logic circuit above can be expressed as the logic expression Q= NOT(A OR B)

An example logic circuit containing two inputs

The logic circuit above can be expressed as the logic expression Q= (NOT A) AND B 

An example logic circuit containing three inputs

The logic circuit above can be expressed as the logic expression P = ((NOT A) OR B) NAND C

An example logic circuit containing three inputs

This logic circuit above can be expressed as X = NOT (A NAND B) OR (B NOR C)

Exam Tip
You may be required to write a logic expression/statement from a truth table or a logic circuit. You
may also have to do the opposite - draw a logic circuit and complete a truth table for a logic
expression

Worked example
Consider the logic statement: X = (((A AND B) OR (C AND NOT B)) XOR NOT C) 
a. Draw a logic circuit to represent the given logic statement. 
[6]

One mark per correct logic gate, with the correct input

Test yourself

Did this page help you? Yes No

Author: Becci Peters


Becci has been a passionate Computing teacher for over 9 years, teaching Computing across the UK helping to engage, interest and develop
con dence in the subject at all levels. Working as a Head of Department and then as an educational consultant, Becci has advised schools in
England, where her role was to support and coach teachers to improve Computing teaching for all. Becci is also a senior examiner for multiple
exam boards covering GCSE & A-level. She has worked as a lecturer at a university, lecturing trainee teachers for Computing.

Resources Members Company Quick Links


Home Log in About us GCSE Revision Notes
Join Contact us IGCSE Revision Notes
FAQ Jobs A Level Revision Notes
Support Terms Biology
Privacy Chemistry
Physics
Maths
2022 Advance Information

Missing something? Tell us

© Copyright 2015−2023 Save My Exams Ltd. All Rights Reserved.


IBO was not involved in the production of, and does not endorse, the resources created by Save My Exams.
BITS OF
1 - Theory of Computer Science / Logic Gates

BYTES.CO
EXAM QUESTIONS - LOGIC GATES
IGCSE / GCSE Computer Science

Home
EXAMPLE QUESTION 1
1 - Theory of Computer
Science

2 - Practical Problem
Solving and Programming

Pre-Release Material

1 - Computer Systems
(2023)

Search  

REVEAL ANSWERS –
2

Question 2 requires you to match logic gate symbols to their name by drawing a straight line to link them.

Answers

EXAMPLE QUESTION 2

REVEAL ANSWERS –
10

(a) Question 10 (a) requires you to ll in the truth table for a NOR gate.  Remember that a NOR gate is essentially the opposite of an or
gate. X will only be 1 if Neither of the inputs are 1 and both of them are not 1.

Answers

(b) Question 10 (b) asks you to write a logic statement for the given diagram

For this question 1 mark would be awarded for each correct part of the answer.

Answer
The whole answer should look something like this:

X = (A AND B) AND (C OR NOT B)

1 mark for each of the following sections

(A AND  B) = 1 mark
AND = 1 mark
(C OR NOT B) = 1 mark

EXAMPLE QUESTION 3

REVEAL ANSWERS –
10

Below are the answers for the diagram and truth table that you are required to produce for question 10.  Remember that for 10(a) a mark
is awarded for each correct gate with the correct inputs. This means that marks can be awarded even if the diagram is not perfect.
Answers

EXAMPLE QUESTION 4

REVEAL ANSWERS –
5

(a) Question 5 (a) provides you with a logic statement and asks you to draw a diagram. Remember to take your time here to fully
understand the statement.  1 mark is awarded for each correct gate.

Answer

(b) Question 5 (b) asks for you to draw an XOR gate and then explain the function of it. When drawing gates remember to take your time
and make sure that it is clear, you do not want the examiner to get confused by what gate you are trying to draw!

Answers

EXAMPLE QUESTION 5

REVEAL ANSWERS –
7

Question 7 provides you with a logic statement and asks you to draw a diagram.  This is quite a long logic statement with three bracketed
sections.  The question is worth 7 marks so you should make sure to spend some time planning this diagram.

Answers:

EXAMPLE QUESTION 6

REVEAL ANSWERS –
3

(a) Question 3 (a) provides you with a logic diagram and asks you to complete a truth table. This diagram contains an XOR gate a NOR
and a NAND so be sure to take your time when completing the table.

Answers:

(b) Part B asks you to explain the di erence between an AND and a OR gate. The question is worth 3 marks. Each of the following points
are worth 1 mark (Max 3)

Answers

output of AND is 1 if both inputs are 1


output of AND is 0 if either or both inputs are 0
output of OR is 1 if either input is 1
output of OR is 0 if both inputs are 0
Correct example of AND truth table
Correct example of OR truth table

Est. 2015 - Copyright © 2020

You might also like