Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor,...

66
Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU

Transcript of Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor,...

Page 1: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Fundamentals of digital electronics

Prepared by - Anuradha Tandon

Assistant Professor,

Instrumentation & Control Engineering Branch,

IT, NU

Page 2: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Why go digital?

Analogue signal processing is achieved by using analogue components such as:

Resistors.Capacitors.Inductors.

The inherent tolerances associated with these components, temperature, voltage changes and mechanical vibrations can dramatically affect the effectiveness of the analogue circuitry.

Page 3: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Why Use Binary Logic Only?

Use of transistor as a switch

Controlling the transistor operation in either ON and OFF state

If use more than two logic levels, transistor needs to be operated in the active region where operating the transistor is difficult

Page 4: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Boolean Functions: Terminology

F(a,b,c) = a’bc + abc’ + ab + c

• Variable

– Represents a value (0 or 1), Three variables: a, b, and c

• Literal

– Appearance of a variable, in true or complemented form

– Nine literals: a’, b, c, a, b, c’, a, b, and c

• Product term

– Product of literals, Four product terms: a’bc, abc’, ab, c

• Sum‐of‐products (SOP)

– Above equation is in sum‐of‐products form.

– “F = (a+b)c + d” is not.

Page 5: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Boolean Logic Function

Can be represented in two forms:

Sum-of-Products (SOP)

F(A, B, C) = A’BC + BC’ + AB

Product-of-Sums (POS)

F(A, B, C) = (A + B’ + C’).(B’ + C).(A’ + B’)

Page 6: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

The Boolean function expressed in SOP form can implemented using two levels of basic logic gates:

1st level of AND gates to represent the AND terms and,

The 2nd level of OR gates to OR the AND terms

Boolean Logic Function cont.….

Page 7: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

For example the function

F(X,Y,Z) = XZ+Y’Z+X’YZ

can be represented using 2-input AND and OR gates as shown in the Fig. 1:

Boolean Logic Function cont.….

Fig. - 1

Page 8: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

The Boolean function expressed in POS form can implemented using two levels of basic logic gates:

1st level of OR gates to represent the OR terms and,

The 2nd level of AND gates to AND the OR terms

Boolean Logic Function cont.….

Page 9: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

For example the function

F(X,Y,Z)=(X+Z)(Y’+Z) (X’+Y+Z)

can be represented using 2-input AND and OR gates as shown in the Fig. 2:

Boolean Logic Function cont.….

Fig. - 2

Page 10: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

SOP or POS form of expression of Boolean logic function is called the standard form

The other way to represent the Boolean logic function is the canonical form

Boolean Logic Function cont.….

Page 11: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Canonical Form

The Boolean function is represented as either

Sum-of-Minterms (SOM) or

Product-of-Maxterms (POM)

Page 12: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Canonical Forms

It is useful to specify Boolean functions in

a form that:

– Allows comparison for equality.

– Has a correspondence to the truth tables

Canonical Forms in common usage:

– Sum of Minterms (SOM)

– Product of Maxterms (POM)

Page 13: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Minterms

product term is a term where literals are ANDed.

Example: x’y’, xz, xyz, …

Minterm : A product term in which all variables appear exactly once, in normal or complemented form

Example: F(x,y,z) has 8 minterms

x’y’z’, x’y’z, x’yz’, ...

Page 14: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Minterms cont.…… Function with n variables has 2n

minterms

A minterm equals 1 at exactly one input combination and is equal to 0 otherwise

Example: x’y’z’ = 1 only when x=0, y=0, z=0

A minterm is denoted as mi where i corresponds the input combination at which this minterm is equal to 1

Page 15: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

2 variable minterms

Two variables (X and Y) produce 2x2=4

combinations

XY (both normal)

XY’ (X normal, Y complemented)

X’Y (X complemented, Y normal)

X’Y’ (both complemented)

Page 16: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Maxterms

Maxterms are OR terms with every variable in true or complemented form.

X+Y (both normal)

X+Y’ (x normal, y complemented)

X’+Y (x complemented, y normal)

X’+Y’ (both complemented)

Page 17: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

2 Variable Minterms and Maxterms

The index above is important for describing which variables in the terms are true and which are complemented.

Page 18: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Expressing Functions using Minterms

Boolean function can be expressed algebraically from a give truth table

Forming sum of ALL the minterms that produce 1 in the function

Page 19: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Expressing Functions with Maxterms

Boolean function : Expressed algebraically from a give truth table

By forming logical product (AND) of ALL the maxterms that produce 0 in the function

Example: Consider the function defined by the truth table

F(X,Y,Z) = Π M(1,3,4,6)Applying DeMorgan

F’ = m + m + m + m = Σm(1 3 4 6)F = F’’ = [m1 + m3 + m4 + m6]’ = m1’.m3’.m4’.m6’ = M1.M3.M4.M6 = Π M(1,3,4,6)

Page 20: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Sum of Minterms v/s Product of MaxtermsA function can be expressed algebraically as:

• The sum of minterms

• The product of maxterms

• Given the truth table, writing F as

• Σmi – for all minterms that produce 1 in the table,

or

• ΠMi – for all maxterms that produce 0 in the table

Minterms and Maxterms are complement of each other.

Page 21: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Example: minterm & maxterm

Page 22: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Example cont.….

Page 23: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

SOP and POS Conversion

SOP POS

F = AB + CD

= (AB+C)(AB+D)

= (A+C)(B+C)(AB+D)

= ( A+C)(B+C)(A+D)(B+D)

POS SOP

F =(A’+B)(A’+C)(C+D)

=( A’+BC)(C+D)

= A’C+A’D+BCC+BCD

= A C+A D+BC+BCD

= A’C+A’D+BC

Page 24: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Simplification of Boolean Functions

An implementation of a Boolean Function requires the use of logic gates.

A smaller number of gates, with each gate (other then Inverter) having less number of inputs, may reduce the cost of the implementation.

There are 2 methods for simplification of Boolean functions.

Page 25: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Algebraic method by using Identities & Theorem

Graphical method by using Karnaugh Map method

–The K‐map method is easy and straightforward

–A graphical method of simplifying logic equations or truth tables

-Also called a K map

Simplification of Boolean Functions cont.….

Page 26: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Karnaugh Map

A K‐map for a function of n variables consists of 2n cells, and,

in every row and column, two adjacent cells should differ in the value of only one of the logic variables

Theoretically can be used for any number of input variables, but practically limited to 5 or 6 variables.

Page 27: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Gray Code

Gray code is a binary value encoding in which adjacent values only differ by one bit

Page 28: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Truth Table Adjacencies

Page 29: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

K – map Method

The truth table values are placed in the K map

Adjacent K map square differ in only one variable both horizontally and vertically.

The pattern from top to bottom and left to right must be in the form

A SOP expression can be obtained by Oring all squares that contain a 1.

A’B’, A’B, AB, AB’

00, 01, 11, 01

Page 30: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Filling of K - map

Page 31: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 32: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

K - map

In a K‐map, physical adjacency does imply gray code adjacency

F =A’B’ + A’B = A’ F = A’B + AB = B

Page 33: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 34: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 35: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 36: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 37: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 38: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 39: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 40: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 41: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 42: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 43: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 44: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 45: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 46: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 47: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 48: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 49: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 50: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 51: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 52: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Combinational Circuits

Combinational circuit

– Output depends on present input

– Examples: F (A,B,C), FA, HA, Multiplier, Decoder, Multiplexor, Adder, Priority Encoder

Y = F (a,b)

Propagation delay

Y(t+tpd)=F(a(t), b(t))

Page 53: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Decoder Reception counter : When you reach a

Academic Institute

– Receptionist Ask: Which Dept. to Go ?

– Receptionist Redirect you to some building according to your Answer.

Decoder : knows what to do with this: Decode

• N input: 2N output

• Memory Addressing

– Address to a particular location

Page 54: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Decoder

2‐input decoder: four possible input binary numbers

So has four outputs, one for each possible input binary number

Page 55: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Decoder

Page 56: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
Page 57: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Implementation of Boolean Function Using Decoder

Using a n‐to‐2n decoder and OR gates any functions of n variables can be implemented.

• Example:

S(x,y,z)= Σ(1,2,4,7) , C(x,y,z)=Σ(3,5,6,7)

• Functions S and C can be implemented using a 3‐to‐8 decoder and two 4‐input OR gates

Page 58: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Implementation of S and C

Page 59: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Multiplexer Mux: Another popular combinational building block

– Routes one of its N data inputs to its one output, based on binary value of select inputs 4 input mux needs 2 select inputs to indicate

which input to route through • 8 input mux 3 select inputs • N inputs log2(N) selects

– Like a rail yard switch

Page 60: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

MUX Internal Design

Page 61: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

MUX Internal Design cont.….

Page 62: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Implementation of Logic Function Using MUX

Page 63: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Sequential Circuits

Output depends not just on present inputs

But also on past sequence of inputs (State)

• Stores bits, also known as having “state”

• Simple example: a circuit that counts up in binary

Page 64: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Sequential Circuits

Page 65: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

Example Needing Bit Storage

Flight attendant call button

– Press call: light turns on

• Stays on after button released

– Press cancel: light turns off

– Logic gate circuit to implement this?

Page 66: Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.

First Attempt at Bit Storage

We need some sort of feedback

– Does the right S Q circuit on do what we want?

• No: Once Q becomes 1 (when S=1), Q stays forever – no value of S can bring back to 0