Digital Electronic
Digital Electronic
Class:
Year 1 MEE in: Energy, Production and Plant Engineering
Contacts
12/02/2024 1
Unit 6: Logic gates and Boolean expression
Logic gates are electronic circuits (devices) that can be used to implement the most
elementary logic expressions, also known as Boolean expressions
The logic gate is the most basic building block of combinational logic.
They perform basic logical functions that are fundamental to digital circuits
These gates take one or more binary inputs (0 or 1) and produce a single binary output
based on the logic of the gate.
In a circuit, logic gates will make decisions based on a combination of digital signals
coming from its inputs.
Logic gates are electronic circuits and it will respond only to HIGH voltages (called 1s)
or LOW (ground) voltages (called 0s).
There are three basic logic gates, namely the OR gate, the AND gate and the NOT gate.
Other logic gates that are derived from these basic gates are the NAND, NOR, XOR, and
XNOR.
2
Boolean algebra
Boolean algebra is a branch of algebra in which the values of the variables are
only true or false, typically denoted as 1 or 0, respectively and operations are
based on logic gates.
It deals with operations and rules for manipulating these values.
This algebraic system is fundamental in digital electronics and computer science
for representing and manipulating binary logic.
gate is a HIGH only when all inputs are HIGH. (c) Truth table with 3 variables
Boolean expression for a 4-input AND gate
Solution: A . B . C .D = Y or ABCD=Y
4
OR operations
• The OR operation in Boolean algebra is similar to addition in ordinary algebra and
performs the digital addition.
It is defined as the output of an OR gate is FALSE only if, both the inputs are
FALSE otherwise it is true.
The OR gate is called the “any or all” gate.
Boolean expression for this OR function is given as Y = A OR B = A + B
5
NOT operations
The NOT operation in Boolean algebra is also defined as complementation or inversion i.e.
negation as performed by the NOT gate.
This operation converts the logical 1 to logical 0 and vice versa. The symbol used for this
operation is a bar or prime over the function or the variable. i.e.
Its logical equation is
6
6.4.NAND operations
The NAND operation in Boolean algebra is equivalent to AND operation and
NOT operations.
The complement of AND function is called NAND function.
The graphical symbol of NAND gate comprised of a AND gate followed by a
small circle as NOT gate
The output of NAND gate is FALSE if both A and B are TRUE, otherwise it is
TRUE
The output of the NAND gate can be represented as :
9
Exclusive-OR Gate (XOR)
Is a digital logic gate with two or more inputs and one output that performs
exclusive disjunction.
The output of an XOR gate is true only when exactly one of its inputs is true.
If both of an XOR gate's inputs are false, or if both of its inputs are true, then the
output of the XOR gate is false.
Mathematically it can be described as:
10
Exclusive-NOR Gate (XOR)
The Exclusive-NOR (XNOR) gate is a logic gate that outputs true
(1) only when both of its inputs are the same. If the inputs are
different, it outputs false (0). The XNOR gate is essentially the
inverse of the XOR gate.
Mathematically it can be described as:
11
From the basic operations, the truth table of the complex
expression can be built.
Example : a) b) c)
Answer : c)
a) b)
12
6.6. Boolean algebra, Boolean minimization
Boolean Algebra is the mathematics used to analyze digital
gates and circuits.
The Laws of Boolean can use to both reduce and simplify a
complex Boolean expression in an attempt to reduce the number
of logic gates required.
Boolean algebra is governed by certain rules and laws. These
rules can be used for the minimization of logical operations.
It is the convenient and systematic method of expressing and
analyzing the operation of digital circuits.
The Axioms or postulates of Boolean algebra are a set of
logical expressions that we accept without proof and upon which
we can build a set of useful theorems.
13
Description of the Laws and properties of Boolean Algebra
Annulment Law – A term AND´ed with a “0” equals 0 or OR´ed with a “1”
will equal 1
– A . 0 = 0 The variable AND’ed with 0 is always equal to 0
– A + 1 = 1 The variable OR’ed with 1 is always equal to 1
Identity Law – A term OR´ed with a “0” or AND´ed with a “1” will
always equal that term
– A + 0 = A The variable OR’ed with 0 is always equal to the variable
– A . 1 = A The variable AND’ed with 1 is always equal to the variable
• From the above table it is clear that the columns 7 & 8 are equal.
Therefore,
Therefore,
16
• Implementation of gates using NAND gate
17
• Implementation of gates using NOR gate
18
Distributive Law – This law permits the multiplying or factoring out
of an expression.
– A(B + C) = A.B + A.C (OR Distributive Law)
– A + (B.C) = (A + B).(A + C) (AND Distributive Law)
19
Example 1 Using the above laws, simplify the following expression:
M= (A + B)(A + C)
M=
(A + B).(A + C)
c)
20
Example 2 NAND Implementation
21
Formulation and Design of Simple Logic Circuits
Two simple methods for designing simple digital circuit are found in standard form of
Boolean expression called the Sum-Of-Products (or SOP) form and Product-Of-Sums
(or POS) forms.
Example :
22
• Product terms that include all of the input variables (or their
inverses) are called minterms.
• For minterms, the binary numbers are formed by
representing each non complemented variable by 1 and the
complemented variable by 0.
• A sum-of-products expression is formed from a product of
all the input variables (or their inverses) for each row of
the truth table for which the result is logic 1.
• The output is the logical “sum” of these minterms
23
b. Product of sums (POS)
POS Boolean expressions can be generated from truth tables
by determining which rows of the table have an output of 0,
writing one sum term for each row, and finally multiplying all
the sum terms. This creates a Boolean expression representing
the truth table as a whole.
These “sum” terms that include all of the input variables
(or their inverses) are called maxterms.
For maxterms, the non-complemented variables are taken as
0’s and the complemented variables are taken as 1’s.
For POS expression, the output variable is the logical product
of maxterms.
Example:
24
The following table shows a 3-variable logical function with
the eight minterms & maxterms and their symbolic
designation.
25
Canonical SOP or POS expression
A Boolean functions expressed as a sum of minterms or a product maxterms, are said to be in
canonical form.
Example:
26
Boolean minimization
A Karnaugh map or a K-map refers to a pictorial method that is utilized to minimise
various Boolean expressions without using the Boolean algebra theorems along with
the equation manipulations. A Karnaugh map can be a special version of the truth
table.
The Karnaugh map provides a simple and straight-forward method of minimizing
Boolean expressions.
Cells number of table are formed based on this formula:
where n is a number of variables.
Examples :
i. 2 input variables
27
Boolean minimization
A Karnaugh map for 3 and 4 variables
Examples :
ii. 3 input variables:
28
Boolean minimization
A Karnaugh map for 3 and 4 variables
Examples :
ii. 4 input variables:
29
Steps to solve expression using K-map-
30
31
SOP FORM: K-map of 3 variables- Z= ∑A,B,C(1,3,6,7)
34
• In this diagram,
there are three input
signals A, B & C
which is fed to three
AND gates.
35
Solution • Then the output of these three
gates are given to the input of
an OR gate.
• So the output of that OR gate
can be written as:
( A+AB) + (B+BC) + (C+AB),
which is the output of the given
combinational circuit.
Example2
a)
b)
NAND
NOT
36
Conversion from the Boolean expression to logic circuits
To convert a Boolean expression to logic circuit, first start with
the output and work towards input.
Step I : Draw the logic diagram corresponding to the given
Boolean expression .
Step II: Draw the logic diagram of each element of the given
expression.
Step III: Determine the number of input signals in the expression.
Step IV: Draw the complete logic circuit of the given Boolean
expression.
38
Combinational Logic circuits
• Combinational logic is about combining logic gates together to
process two or more signals in order to produce output signal (s)
according to the logical function of each logic gate.
• In a Combinational Logic Circuit, the output is dependent at all
times on the combination of its inputs.
40
All three of these logic circuit representations are shown below :
41
Half Adder
An adder is a digital circuit that performs addition of numbers. The half
adder adds two binary digits called as augend and addend and produces
two outputs as sum and carry; XOR is applied to both inputs to produce
sum and AND gate is applied to both inputs to produce carry out.
Truth Table
Block diagram Circuit Diagram
45
Decoder
Decoding –is the conversion of an n-bit input code to an m-
bit output code with
such that each valid code word produces a unique output
code. The circuits that perform decoding are called
decoders.
It performs operations which are exactly opposite to those of
an encoder.
The decoder is a circuit used to change the code into a set
of signals
Block diagram
Examples of Decoders
• Code converters
• Relay actuator
46
Example : 2 to 4 Line Decoder
• The block diagram of 2 to 4 line decoder is shown in the
following fig. A and B are the two inputs where D through D
are the four outputs.
Block diagram
47
Multiplexers
• Multiplexer is a special type of
combinational circuit. There are n-data
inputs, one output and m select inputs with
2m = n.
• It is a digital circuit which selects one of
the n data inputs and routes it to the
output
• Depending on the digital code applied at the selected inputs,
one out of n data sources is selected and transmitted to the
single output Y.
• E is called the strobe or enable input which is useful for the
cascading. It is generally an active low terminal that means it
will perform the required operation when it is low.
48
Block diagram
Multiplexers Block Diagram
come in multiple
variations
51
Applications of De multiplexer
De multiplexers are used to connect a single source to multiple destinations.
These applications include the following:
i. Communication System
Mux and demux both are used in communication system to carry out the
process of data transmission. A De-multiplexer receives the output signals
from the multiplexer and at the receiver end it converts them back to the
original form.
ii. Arithmetic Logic Unit
The output of the ALU is fed as an input to the De-multiplexer, and the
output of the demultiplexer is connected to a multiple register. The output of
the ALU can be stored in multiple registers.
iii. Serial to Parallel Converter
This converter is used to reconstruct parallel data. In this technique, serial
data is given as an input to the De-multiplexer at a regular interval, and a
counter is attached to the demultiplexer at the control input to detect the data
signal at the output of the demultiplexer. When all data signals are stored, the
output of the demux can be read out in parallel.
52
Flip-flop
• The flip-flop is the basic unit of digital memory
• A flip-flop can remember one bit of data.
• Sets of flip-flops are called registers, and can hold bytes of
data.
• Sets of registers are called memories, and can hold many
thousands of bits, or more.
• It is a Sequential Circuits / an electronic circuit which
has two stable states and thereby is capable of
serving as one bit of memory , bit 1 or bit 0.
• They are 1 (HIGH) or 0
(LOW).
• Whenever we refer to
the state of flip flop, we
refer to the state of its
normal output (Q)
53
Flip flops Counters
• Flip-Flop means a digital circuit of two stable states at an output:
• 1 means, rise on top. It means Flip, and 0 means fall to ground. It means flop.
• Stable state can change only after a clock input applies.
• A particular combination of Q and Q’represents a stable state. An FF is also
called a bistable digital circuit.
• One of the stable state is Q = 1 and Q’ = 0, and other stable state is Q= 0 and Q’
= 1.
• An FF has one or two inputs and clock edge. The logic states at these inputs
and the previous Q determine what shall be the current outputs.
• Flip flops are of different types depending on how their inputs and clock pulses
cause transition between states.
• Flip-flops are fundamental building blocks of digital electronics systems
used in computers, communications, and many other types of systems.
There are four types:
iii. JK flip-flop
i. Clocked RS (“Set-Reset") flip-flop
iv. T (“Toggle") flip-flop
ii. D ("data" or "delay") flip-flop
54
Sequential Circuits
A sequential circuit is a circuit made up by combining logic gates such that
the required logic at the output(s) depends not only on the current input logic
conditions but also on the past inputs, Outputs and sequences. Sequential
action means
• To remember what steps are to be done next ,
• To recall which step has just been finished . A sequential circuit consists of
a feedback path , and employs some memory elements.
Sequential Circuits Block Diagram
55
Programmable Logic device
• Programmable logic refers to a general class of devices which
can be configured to perform a variety of logic functions.
• The process of entering the information into these devices is
known as programming.
• Four commonly used PLDs considered:
The devices range from simple, programmable read-only
memory(PROM), devices which can implement simple
combinatorial logic, to PAL's, programmable array logic (PAL),
to FPGA's, field programmable gate arrays. All these devices
share the feature that they are programmed to perform
specific functions.
• Other PLDs include erasable programmable logic devices
(EPLDs) including erasable programmable ROMs, generic
array logic (GAL) devices, and programmable logic
sequencers (PLSs).
56
What is Programmable Logic?
In the world of digital electronic systems, there are three basic
kinds of devices: memory, microprocessors, and logic.
• Memory devices store random information such as the
contents of a spreadsheet or database.
• Microprocessors execute software instructions to perform a
wide variety of tasks such as running a word processing
program or video game.
• Logic devices provide specific functions, including device-
to-device interfacing, data communication, signal processing,
data display, timing and control operations, and almost every
other function a system must perform.
57
The PLD Advantage
Fixed logic devices and programmable logic devices (PLDs) both have their
advantages.
Fixed logic devices, for example, are often more appropriate for large volume
applications because they can be mass-produced more economically. For
certain applications where the very highest performance is required, fixed
logic devices may also be the best choice.
However, programmable logic devices offer a number of important
advantages over fixed logic devices, including:
• PLDs offer customers much more flexibility during the design cycle
• PLDs do not require long lead times for prototypes or production parts -
the
• PLDs are already on a distributor's shelf and ready for shipment.
• PLDs do not require customers to pay for large NRE costs and purchase
expensive mask sets
• PLDs allow customers to order just the number of parts they need, when
they need them, allowing them to control inventory.
• PLDs can be reprogrammed even after a piece of equipment is shipped to a
customer. 58
• Some PLDs are made to perform only combinational logic
functions; others can perform both combinational and
sequential logic functions.
• Four commonly used PLDs considered here are :
• The read-only memory (ROM) devices and their subgroups,
• The programmable logic array (PLA) devices
• The programmable array logic (PAL) devices and their
subgroups, and
• programmable gate arrays (PGAs) and subgroups.
• Other PLDs include erasable programmable logic devices
(EPLDs) including erasable programmable ROMs, generic
array logic (GAL) devices, and programmable logic
sequencers (PLSs).
59
Read-only memory (ROM)
• Read Only Memory (ROM) is a memory device, which stores the binary information
permanently. It can retain stored information even after power is removed
• The data that is required to be stored inside ROM is written during manufacturing
phase.
• ROM consists of two basic components : Decoder and OR gates.
• In ROM, the input to decoder will be in binary form and output will be its decimal
equivalent. All the OR Gates present in the ROM will take decoders output as their
input.
Types of Read Only Memory (ROM)
ROM is differentiated on the basis of methods used to write data on ROM chips and the
number of times they can be written. It can be classified into following types :
i. Mask Read-Only Memory (MROM)
ii. Programmable Read-Only Memory (PROM)
iii. Erasable Programmable Read-Only Memory (EPROM)
iv. Electrically Erasable Programmable Read-Only Memory (EEPROM)
v. Flash Read-Only Memory (Flash ROM)
60
A programmable logic array (PLA)
• A programmable logic array (PLA) is a kind of programmable logic device used to
implement combinational logic circuits.
• The PLA has a set of programmable AND gate planes, which link to a set of
programmable OR gate planes, which can then be conditionally complemented to
produce an output.
• This layout allows for a large number of logic functions to be synthesized in the sum
of products (and sometimes product of sums) canonical forms.
Applications of PLAs
• A micro- processor chip uses many PLAs because of easy of design change and
check.
• In particular, PLAs are used in its control logic, which is complex and requires many
changes, even during its design.
• Also, PLAs are used for code conversions, microprogram address conversions,
decision tables, bus priority resolvers, and memory overlay
61
Field-Programmable Gate Array (FPGA):
• A field-programmable gate array (FPGA) is an integrated circuit designed to
be configured by a customer or a designer after manufacturing – hence the
term "field-programmable”.
• It is a VLSI (Very Large-Scale Integration) circuit whose function is defined
by a user's program rather than by the manufacturer of the device. Depending
on the particular device, the program is either 'burned' in permanently or semi-
permanently as part of a board assembly process, or is loaded from an external
memory each time the device is powered up.
• Applications of FPGA:
FPGAs have gained rapid growth over the past decade because they are
useful for a wide range of applications. Specific application of an FPGA
includes digital signal processing, bioinformatics, device controllers, software-
defined radio, random logic, ASIC prototyping, medical imaging, computer
hardware emulation, integrating multiple SPLDs, voice recognition ,
cryptography, filtering and communication encoding and many more.
Thank You
12/02/2024 63