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

LOGIC GATES

&
LOGIC CIRCUITS
In this chapter you will learn about:

◈ Logic gates

◈ Truth tables

◈ Logic circuits

◈ Boolean algebra.

2
Logic Gates
■ Logic gates are the basic building blocks of any
digital system.

■ It is an electronic circuit having one or more than


one input and only one output.

■ The relationship between the input and the output


is based on a certain logic. 3
Truth Tables
■ A truth table is a way of showing all the possible states of a logic
gate.

■ Each state is shown on a different row of the table.

■ For logic circuits, the number of inputs can be more than 2; for
example three inputs give a possible 23 (8) binary combinations.

■ And for four inputs, the number of possible binary combinations is


24 (16).
4
NOT gate
■ The NOT gate changes every binary signal into its
opposite.

■ If the signal is 1, it makes it 0

■ If the signal is 0, it makes it 1.

■ It changes True into False.

5
Gate Symbol
■ The line coming into the gate from the left is the input.

■ The line coming out on the right is the output.

■ A NOT gate has 1 input and 1 output.

6
Description:
■ If the signal going in is 1, then the signal coming out is 0.

■ If the signal going in is 0, then the signal coming out is 1.

7
Truth Table

Input Output
(A) (A)
1 0
0 1

8
Boolean Algebra
■ A = NOT A (Logic notation)

■ A = A (Boolean notation)

■ If A is True then A is False.

■ If A is False then A is True.

9
AND Gate
■ The AND gate is a circuit that takes two Binary signals and
turns them into one signal.

■ The inputs can be 1 or 0.

■ If both inputs are 1, the output is 1.

■ In all other cases, the output is 0.

10
Gate Symbol
■ Two inputs are A and B.

11
Possible States:
■ The four possible inputs for AND gate are –

– A is 0, B is 0

– A is 0, B is 1

– A is 1, B is 0

– A is 1, B is 1

The AND gate will only output 1 if both the inputs are 1.
12
Truth Table
Input Input Output
(A) (B) (X)
0 0 0
0 1 0
1 0 0
1 1 1

13
Boolean Algebra
■ X = A AND B (Logic notation)

■ X = A.B (Boolean notation)

■ If A and B is True then X is True.

■ Otherwise X is False.

14
OR Gate
■ The OR gate is a circuit that takes two Binary signals and
turns them into one signal.

■ The inputs can be 1 or 0.

■ If both inputs are 1, the output is 1.

■ If one input is 1, and other is 0, the output is 1.

■ If both inputs are 0, the output is 0.


15
Gate Symbol
■ Two inputs are A and B.

16
Possible States:
■ The four possible inputs for OR gate are –

– A is 0, B is 0

– A is 0, B is 1

– A is 1, B is 0

– A is 1, B is 1

The OR gate will only output 1 if at least one of the inputs is


1. 17
Truth Table
Input Input Output
(A) (B) (X)
0 0 0
0 1 1
1 0 1
1 1 1

18
Boolean Algebra
■ X = A OR B (Logic notation)

■ X = A+B (Boolean notation)

■ If A and B is False then X is False.

■ Otherwise X is True.

19
Logic Circuits
■ Logic gates can be connected together into a logic circuit.

■ The output of a gate can be connected to the input of


another gate.

■ Logic gates can be joined together in different ways to


create different circuits.

■ Each circuit will transform its binary input signals in a


different way. 20
Example 1
(A AND B) OR C (A.B)+C

■ In this example there are brackets so this is what we


evaluate first.

A AND B

■ The inputs for OR gate are C and output of A AND B

21
Example 2
(A AND B) AND C (A.B).C

■ In this example there are brackets so this is what we


evaluate first.

A AND B

■ The inputs for AND gate are C and output of A AND B

22
Draw the Truth Table

■ First fill in all the initial inputs.

■ There are 3 inputs which means 23 = 8 values.

23
24
Calculate Outputs
■ First fill in the values for D.

■ D is the output of the AND gate.

■ A and B are inputs to this gate.

■ D is 1 if A and B are 1.

■ Otherwise D is 0

25
26
■ E is the final output of the circuit.

■ C and D are inputs to the OR gate and E is the output.

■ E is 1 if either C or D is 1

27
Draw the Truth Table of the following circuit.

28
Truth Table

29
Write the Boolean and logical notation.

Logic Notation

(A AND B) OR (A AND C)

Boolean Notation

(A.B) + (A.C)
30
SUMMARY

31
Logic Gates
■ Computer carries out all operations by the combination of
signals that pass through standard blocks of built-in circuits.

■ Logic gate is an elementary building block of digital


electronic circuits that operates one or more input signals to
produce standard output.

■ The common use of logic gate elements is to act as switch.

■ In computer logic gates are use to implement Boolean


functions. 32
Types Of Logic Gates

33
34
35

You might also like