100% found this document useful (1 vote)
289 views

Binary Logic Gates: Prepared By: NSZ FSG, Uitm Pahang

The document discusses various types of binary logic gates. It begins by outlining the lesson which includes identifying AND, OR, inverter and other logic gates. It then discusses truth tables which describe the relationship between inputs and outputs of logic circuits. The document proceeds to explain the operations, truth tables and expressions of AND, OR, inverter, buffer and NAND gates. It also discusses how to construct these gates using transistors or integrated circuits. The document emphasizes that NAND and NOR gates are universal as any logic function can be achieved using them.

Uploaded by

Muhammad Azizi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
289 views

Binary Logic Gates: Prepared By: NSZ FSG, Uitm Pahang

The document discusses various types of binary logic gates. It begins by outlining the lesson which includes identifying AND, OR, inverter and other logic gates. It then discusses truth tables which describe the relationship between inputs and outputs of logic circuits. The document proceeds to explain the operations, truth tables and expressions of AND, OR, inverter, buffer and NAND gates. It also discusses how to construct these gates using transistors or integrated circuits. The document emphasizes that NAND and NOR gates are universal as any logic function can be achieved using them.

Uploaded by

Muhammad Azizi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 64

CHAPTER 2

Binary Logic Gates

Prepared by:
NSZ
FSG, UiTM Pahang
Lesson Outline
• AND Gate
• OR Gate
• Inverter and Buffer
• NAND
• NOR Gate
• Exclusive OR Gate
• Exclusive NOR Gate
• Practical TTL and CMOS Gates
2
Lesson Outcomes

At the end of this lesson, students should be able to:

 identify performance of three basic logic gates .


 describe the logic operation, the truth table,
timing diagram and Boolean expression for the
AND,OR, NOT, NOR, XOR and XNOR gates.
 construct the logic circuits diagram based on
the logic operation of Boolean expression.
 write the Boolean expression based on the logic
gates and combinational of logic gates circuits.
 identify the universal logic gates.

3
Introduction
Logic is applied to digital circuits used to implement logic function.
Logic function is an expression represents functions of the logic
gates
Logic gates are the basic building block in digital systems.
Logic gates operate with binary numbers
 All voltages used with logic gates will be either HIGH or LOW.
 These circuits will respond only to HIGH voltages (called 1s) or
LOW (ground) voltages (called 0s).
All digital systems are constructed by using only three basic logic
gates called:-
AND gate
OR gate
NOT/INVERTER gate

4
Boolean Constants and Variables
Boolean constants and variables
allows only two possible values— 0
and 1.
Boolean variables are often used to
represent the voltage level
(input/output).
 Logic 0 can be: false, off, low, no,
open switch.
 Logic 1 can be: true, on, high,
yes, closed switch
Boolean algebra is means for
expressing the relationship
between a logic circuits inputs and
outputs.
The three basic logic operations:
 OR, AND, and NOT.
These basic operations are called
logic operations. 5
Truth Table

 A truth table describes the relationship between the input


and output of a logic circuit.
 The number of entries corresponds to the number of inputs.

 A 2-input table would have 22 = 4 entries.


 A 3-input table would have 23 = 8 entries.
 A 4-input table would have 24 = 16 entries.

6
Truth Table

7
Basic Gates/Logic Gates

8
AND @ “all or nothing” Gate
The output is HIGH if both input A and B are HIGH
Operation : If any inputs is LOW, output is LOW

Boolean expression/logical expression : X = A.B


The + sign does not stand for ordinary
multiplication—it stands for the AND operation.
x is true (1) when A AND B are true (1)

Truth Table Gate symbol Timing diagram


9
AND Gate

 A truth table/ circuit symbol for a three input AND gate.

10
AND Gate
Making an AND Gate

These are ways to make an AND gate from transistor


switches or diodes.

11
AND Gate
Making an AND Gate
These are ways to make an AND gate from switches

12
AND Gate
IC7408 AND Gates

This is an example of convenient packaging of AND


gates in IC form.
AND gate in
integrated
circuit (7408 IC)

13
AND Gate
Boolean algebra of AND gate
The formal laws of Boolean algebra for the AND function
are:

14
OR @ “any or all” Gate

The output will HIGH if input A or B are HIGH


Operation : or B is HIGH or both are HIGH

Boolean expression/logical expression : X = A+B

The + sign does not stand for ordinary


addition—it stands for the OR operation
x is true (1) when A is true (1) OR B is true (1)

Truth Table Gate symbol


15
OR Gate

• Truth table/circuit symbol for a three input OR gate.

16
OR Gate
Making an OR Gate
These are ways to make an OR gate from transistor
switches or diodes

17
OR Gate
Making an OR Gate

These are ways to make an OR gate from switches

18
OR Gate
IC 7432 OR Gates

This is an example of convenient packaging of OR gates


in IC form.
OR gate in integrated
circuit (7432 IC)

19
OR Gate
Boolean algebra of OR gate
The formal laws of Boolean algebra for the OR function
are:

20
OR Gate
Example of the use of an OR
gate in an alarm system.

21
Buffer
The buffer is a single-input which
has a gain of 1, mirroring the input at
the output.
Also known as noninverting buffer /
driver.
It serves no logical purpose (it does
not invert), but is used to supply
greater drive current at its output
than is normal for a regular gate.
Since regular digital ICs have limited
drive current capabilities, the
noninverting buffer/driver is important
when interfacing ICs with other
devices such as LEDs, lamps, and
others.
Buffer / drivers are available in both
noninverting and inverting.
22
Inverter
Inverter/NOT is complement or invert a digital signal.
Ia a HIGH level (1) input comes in it, it will produce
Operation : a LOW level (0) output or Vice versa.

Boolean expression/logical expression :


XAA '

Read as:
“X equals NOT A”
“X equals the inverse of A”
“X equals the complement of A”

A NOT circuit—commonly called an INVERTER.

Truth Table 23
Inverter
The INVERTER inverts (complements) the
input signal at all points on the waveform.

Whenever the input = 0, output = 1, and vice versa.

24
Inverter
Typical application of the NOT gate.

This circuit provides an expression that


is true when the button is not pressed.
25
Inverter
Making a Inverter
These are ways to make an inverter from collector
resistor, op-amp inverting amplifier

A transistor switch with An op-amp inverting


collector resistor can serve as amplifier with a gain of
an inverting buffer. one serve as an inverting
buffer.

26
Inverter

IC7404 Inverter

This is an example of convenient packaging of Inverter in


IC form.
NOT gate in integrated
circuit (7404 IC)

27
Inverter

Boolean algebra of INVERTER gate

The formal laws of Boolean algebra for the INVERTER


function are:

28
Example 2.1
Write the Boolean expression for the logic circuit shown and draw
the truth table for the logic in Fig. 3-33.

Answer:

Ans: Y  ABC  ABC  ABC 29


NAND @ not-AND Gate
The NAND gate is an inverted AND gate.
• An inversion “bubble” is placed at the output
of the AND gate,
The output is HIGH if one or the
Operation : other inputs is HIGH, but not both

Boolean expression/logical expression :


X  A.B

30
NAND Gate
Making a NAND Gate

These are ways to make a NAND Gate from transistor


NAND Gate from
transistor

31
NAND Gate

IC7400 NAND Gate


This is an example of convenient packaging of NAND
Gate in IC form. NAND gate in an
integrated circuit (IC
7400 Quad NAND
gate)

32
NAND Gate
Output waveform of a NAND gate for
the input waveforms shown here.

33
Universality of NAND Gate
• The NAND gate and the NOR gate can be said to be universal
gates since
• combinations of them can be used to accomplish any of the basic
operations.

It is possible, however, to implement any logic expression using only


NAND gates and no other type of gate, as shown. 34
NOR Gate @ inclusive-NOR
The NOR gate is an inverted OR gate.
• An inversion “bubble” is placed at the output
of the OR gate,
The output is LOW when input A
Operation :
or B is HIGH or both are HIGH
Boolean expression/logical expression :
XAB

35
NOR Gate
Making a NOR Gate

These are ways to make a NAND Gate from transistor


NOR Gate from transistor

36
NOR Gate

IC7402 NOR Gate


This is an example of convenient packaging of NOR Gate
in IC form. NOR gate in an
integrated circuit (IC 7402
Quad NAND gate)

37
NOR Gate
Output waveform of a NOR gate for
the input waveforms shown here.

38
NOR Gate

• The NOR gate can also be classed as a


"Universal" type gate.
• NOR gates can be used to produce any other type
of logic gate function like the NAND gate
 by connecting them together in various
combinations the three basic gate types of
 AND, OR and NOT function can be formed
using only NOR's, for example.

39
Universality of NOR Gate
How combinations of NANDs or NORs are
used to create the three logic functions.

2 – input OR Gate

NOR gates can be arranged to implement


any of the Boolean operations, as shown. 40
Example 2.2
Develop a logic circuit of NAND by using switches and lamps

41
Example 2.3
Develop a logic circuit of NOR by using switches and lamps

42
Summary Universal of NAND and NOR
NAND NOR OR

2 – input OR Gate

2 – input AND Gate

43
XOR @ “any but not all” Gate
The exclusive -OR gate is sometimes referred to as the “odd
but not even gate”.
an Exclusive-OR gate ONLY goes "HIGH" when its two input
terminals are at "DIFFERENT" logic levels with respect to each
other and they can both be at logic level "1" or both at logic level
"0"
It produces a HIGH output only when an odd
Operation :
number of HIGH input are present.
Boolean expression/logical expression :
X  A  B  B.A  A.B

44
Gate Symbol Truth Table
XOR Gate
Boolean expression, symbol, and truth table for a three
input XOR gate.

45
Example 2.4
Develop Boolean expression, logic diagram and truth table for 4
input XOR gate

46
XOR Gate

Logic circuit that


performs the XOR
function

we can expand the Ex-OR function to:


Q = (A ⊕ B) = ( A  B).( A.B) which means we can realize
this new expression using the following individual gate.

47
Exclusive OR Gate with NAND

XOR gate in an integrated


circuit (IC 7486 Exclusive
OR)

48
XNOR Gate
Using NOR gate with added invert bubble on the output
side.

When both inputs A and B are HIGH or LOW,


Operation : the output will be HIGH

Boolean expression/logical expression : X  A  B  A.B  A.B

Gate Symbol
Truth Table
49
XNOR Gate

Truth Table

50
Converting gates using inverters

51
Converting gates using inverters

52
Evaluating Logic Circuit Outputs

 Rules for evaluating a Boolean expression:


 Performs all inversions of single terms.
 Perform all operations within parenthesis
 Performs AND operation before an OR operation
unless parenthesis indicate otherwise.
 If an expression has a bar over it, perform operations
inside the expression, and then invert the result.

53
Evaluating Logic Circuit Outputs
• The best way to analyze a circuit made up of multiple
logic gates is to use a truth table.
• It allows you to analyze one gate or logic combination
at a time.
• It allows you to easily double-check your work.
• When you are done, you have a table of tremendous
benefit in troubleshooting the logic circuit.

54
Evaluating Logic Circuit Outputs
• The first step after listing all input combinations
is to create a column in the truth table for each
intermediate signal (node).

Node u has been filled as the complement of A


55
Evaluating Logic Circuit Outputs
• The next step is to fill in the values for column v.

v =AB — Node v should be HIGH


when A (node u) is HIGH AND B is HIGH
56
Evaluating Logic Circuit Outputs
• The third step is to predict the values at node w
which is the logical product of BC.

This column is HIGH whenever B is HIGH AND C is HIGH


57
Evaluating Logic Circuit Outputs
• The final step is to logically combine columns v
and w to predict the output x.

Since x = v + w, the x output will be HIGH when v OR w is HIGH


58
Evaluating Logic Circuit Outputs
• Example.

Table of logic state


at each node of the
circuit shown.

59
Practical TTL and CMOS Logic Gates

• The types of logic devices are classified in “families’,


of which the most important are TTL and CMOS. The
main families are:
 TTL (Transistor-Transistor Logic), made of bipolar
transistors.
 CMOS (Complementary Metal Oxide
Semiconductor) made from MOSFETs.
 ECL (Emitter Coupled Logic) for extremely high
speeds.
 NMOS, PMOS for VLSI (very large scale integrated
circuits).

60
TTL Logic Gates
• The transistor-transistor-logic (TTL) is a class of digital circuits
built from bipolar junction transistor (BJT) and resistors.
• TTL family was developed in the use of transistor switches for
logical operations and defines the values as
 0V to 0.8V = Logic 0

 2V to 5V = Logic 1
• TTL is the largest family of digital ICs, but the CMOS family is
growing rapidly.
• They are inexpensive,

• but draw a lot of power and must be supplied with +5 volts.


Individual gates may draw 3 to 4 mA.
• The low power Schottky versions of TTL chips draw only 20% of
the power, but are more expensive.
• Part numbers for these chips have LS in the middle of them. 61
CMOS Logic Gates

• CMOS ~ Complementary Metal Oxide Semiconductor.


• CMOS chips are much lower in power requirements
(drawing about 1mA) and
• CMOS operate with a wide range of supply voltages
(typically 3 to 18 volts).
• The CMOS model number will have a C in the middle
of it, e.g., the 74C04 is the CMOS equivalent to the
TTL 7404 (TTL).
• A high drawback is extreme sensitivity to static
electricity – they must be carefully protected from static
discharges.
62
Component Designations
• Integrated circuits in the TTL logic family have part
numbers which are four to five digit numbers.
• With the introduction of other types of construction of
devices, letter were added to center of the numbers to
remind the user that basic TTL chips are not being
used.
• The device numbers begin with a prefix which tells
about its series followed by another number which
identifies the individual device.
•7400 the TTL designation
•74C00 the CMOS equivalent
•74LS00 the low-power Schottky implementation
~END~ 63
The struggle you’re in today is developing
The strength you need for tomorrow.

You might also like