0% found this document useful (0 votes)
2 views

Digital Logic Circuit

Uploaded by

Ivan Rey
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Digital Logic Circuit

Uploaded by

Ivan Rey
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

Digital

Logic Circuits
IT - 104
Discrete Mathematics
Application: Digital Logic Circuits

In the 1930s, Claude Shannon, an MIT Graduate student,


noticed an analogy between the operations of switching
devices, such as telephone circuits, and the operations of
logical connectives

Used this analogy to solve problems of circuit design for


his thesis
Application: Digital Logic Circuits

This shows the appearance of


two positions of a simple switch

When the switch is closed,


current can flow from one
terminal to the other

If the switch is part of the


circuit, the light bulb turns on
if, and only if, current flow
through it.

This happens only when the


switch is closed
Application: Digital Logic Circuits

Current flows and the light bulb turns on if,


and only if, both switches P and Q are
closed.
The switches in this circuit are said to be in
series

Current flows and the light bulb turns on if,


and only if, at least one of the switches P or Q
is closed.

The switches in this circuit are said to be in


parallel
Application: Digital Logic Circuits
Application: Digital Logic Circuits

1940s and Switches were replaced by electronic devices, with the


1950s physical states of closed and open corresponding to
electronic states such as high and low voltage
This later led to the development of modern digital systems such as
electronic computers, electronic telephone switching systems, etc

The basic electronic components of a digital system are called digital


logic circuits

Logic Indicates the important role of logic in the design of such circuits
Digital Indicates that the circuits process discrete, or separate, signals as
opposed to continuous ones
Application: Digital Logic Circuits

Statistician, John Tukey, introduced the terminology bits


(binary digits) in 1946

Bits (1, 0) used to denote True (1) and False (0)


Black Boxes and Gates

 Combinations of signal bits (1’s and 0’s) can be transformed into other
combinations of signal bits (1’s and 0’s) by means of various circuits

 A variety of different technologies are used in circuit construction,


computer engineers and digital system designers find it useful to think of
certain basic circuits as black boxes
The inside of a black box
contains the detailed
implementation of the circuit
and is often ignored while
attention is focused on the
relation between the input
and the output signals.
Black Boxes and Gates

 The operation of a black box is completely specified by constructing an


input/output table that lists all its possible input signals together
with their corresponding output signals.

For example, the black box pictured has three input signals. Since
each of these signals can take the value 1 or 0, there are eight
possible combinations of input signals.
Black Boxes and Gates

One possible correspondence of


input to output signals is as follows:
Black Boxes and Gates

 An efficient method for designing more complicated circuits is to build


them by connecting less complicated black box circuits.

 Three such circuits are known as NOT-gate, AND-gate, and OR-gate.

NOT-gate is a circuit with one input signal and one output signal. If the
or inverterinput signal is 1, the output signal is 0.
Conversely, if the input signal is 0, then the output signal is 1.
Black Boxes and Gates

AND-gate is a circuit with two input signals and one output signal.
If both input signals are 1, then the output signal is 1.
Otherwise, the output signal is 0.

OR-gate also has two input signals and one output signal.
If both input signals are 0, then the output signal is 0.
Otherwise, the output signal is 1.
Black Boxes and Gates
Black Boxes and Gates

Rules for a Combinational Circuit


1. Never combine two input wires.
2. A single input wire can be split partway and used as input
for two separate gates.
3. An output wire can be used as input.
4. No output of a gate can eventually feed back into that
gate.
Determining the Output for a Given Circuit
If you are given a set of input signals for a circuit, you can find
its output by tracing through the circuit gate by gate.

Ex. Input Signals: P = 0 and Q = 1. Find R.


Determining the Output for a Given Circuit

Ex. Input Signals: P = 1, Q = 0, and R = 1. Find S.


Determining the Output for a Given Circuit

Ex. Input Signals: P = 1, and Q = 1. Find R.


Determining the Output for a Given Circuit

Ex. Input Signals: P = 1, Q = 0, R = 0. Find S.


Constructing the Input/Output Table for a Circuit

Construct the input/output table for the following circuit


Constructing the Input/Output Table for a Circuit

S
The Boolean Expression Corresponding to a Circuit

 In logic, variables such as p, q and r represent statements, and a


statement can have one of only two truth values: T (true) or F
(false).
 A statement form is an expression, such as p ∧ (∼q ∨ r ), composed
of statement variables and logical connectives.

 An expression composed of Boolean variables and the connectives


∼,∧, and ∨ is called a Boolean expression

 Given a circuit consisting of combined NOT-gate, AND-gate, and OR-


gate, a corresponding Boolean expression can be obtained by tracing
the actions of the gates on the input variables.
Finding a Boolean Expression for a Circuit

Find the Boolean expressions that correspond to the circuits shown


below. A dot indicates a soldering of two wires; wires that cross without a
dot are assumed not to touch.
Finding a Boolean Expression for a Circuit

Find the Boolean expressions that correspond to the circuits shown


below. A dot indicates a soldering of two wires; wires that cross without a
dot are assumed not to touch.

Solutio
n:

The final expression obtained, (P ∨ Q)∧ ∼(P ∧ Q), is the expression for
exclusive or: P or Q but not both.
Finding a Boolean Expression for a Circuit

Find the Boolean expressions that correspond to the circuits shown


below. A dot indicates a soldering of two wires; wires that cross without a
dot are assumed not to touch.
Finding a Boolean Expression for a Circuit

Find the Boolean expressions that correspond to the circuits shown


below. A dot indicates a soldering of two wires; wires that cross without a
dot are assumed not to touch.

Solutio
n:

Observe that the output of the circuit For this reason, the circuit can be said to
is 1 for exactly one combination of “recognize” one particular combination of
inputs (P = 1, Q = 1, and R = 0) and inputs. The output column of the input/output
is 0 for all other combinations of table has a 1 in exactly one row and 0’s in all
inputs. other rows.
Finding a Boolean Expression for a Circuit

A recognizer is a circuit
that outputs a 1 for
exactly one particular
combination of input
signals and outputs 0’s
for all other combinations
The Circuit Corresponding to a Boolean Expression

a. (∼P ∧ Q) ∨ ∼Q
Solutio
n:
1. Write the input variables in a column on the left side of the diagram.
Then go from the right side of the diagram to the left, working from
the outermost part of the expression to the innermost part.
2. Since the last operation executed when evaluating (∼P ∧ Q)∨ ∼Q is ∨,
put an OR-gate at the extreme right of the diagram.
3. One input to this gate is ∼P ∧ Q, so draw an AND-gate to the left of
the OR-gate and show its output coming into the OR-gate.
The Circuit Corresponding to a Boolean Expression

a. (∼P ∧ Q) ∨ ∼Q
Solutio
n:
4. Since one input to the AND-gate is ∼P, draw a line from P to a NOT-
gate and from there to the AND-gate.
5. Since the other input to the AND-gate is Q, draw a line from Q directly
to the AND-gate.
6. The other input to the OR-gate is ∼Q, so draw a line from Q to a NOT-
gate and from the NOT-gate to the OR-gate.
The Circuit Corresponding to a Boolean Expression

a. (∼P ∧ Q) ∨ ∼Q
Solutio
n:
The Circuit Corresponding to a Boolean Expression

b. ((P ∧ Q) ∧ (R ∧ S)) ∧ T
Solutio
n:
1. To start constructing this circuit, put one AND-gate at the extreme
right for the ∧ between ((P ∧ Q) ∧ (R ∧ S)) and T .
2. To the left of that put the AND-gate corresponding to the ∧ between P
∧ Q and R ∧ S.
3. To the left of that put the AND-gates corresponding to the ∧’s
between P and Q and between R and S.
The Circuit Corresponding to a Boolean Expression

b. ((P ∧ Q) ∧ (R ∧ S)) ∧ T
Solutio
n:
The Circuit Corresponding to a Boolean Expression

b. ((P ∧ Q) ∧ (R ∧ S)) ∧ T
Solutio
n:
It follows from Theorem 2.1.1 that all the ways of adding parentheses to
P ∧ Q ∧ R ∧ S ∧ T are logically equivalent.
Thus, for example,
((P ∧ Q) ∧ (R ∧ S)) ∧ T ≡ (P ∧ (Q ∧ R)) ∧ (S ∧ T )

It also follows that the circuit which corresponds to (P ∧ (Q ∧ R)) ∧ (S ∧


T ), has the same input/output table as the circuit in the other figure
which corresponds to ((P ∧ Q) ∧ (R ∧ S)) ∧ T .
The Circuit Corresponding to a Boolean Expression

b. ((P ∧ Q) ∧ (R ∧ S)) ∧ T
Solutio Each of the circuits in the
n: previous figures is, therefore,
an implementation of the
expression P ∧ Q ∧ R ∧ S ∧ T
.

Such a circuit is called a


multiple-input AND-gate
and is represented by the
diagram shown in the circuit
below.

Multiple-input OR-gates
are constructed similarly.
The Circuit Corresponding to a Boolean Expression

b. ((P ∧ Q) ∧ (R ∧ S)) ∧ T
Solutio
n:
Such a circuit is called a multiple-input AND-gate and is represented
by the diagram shown in the circuit below.

Multiple-input OR-gates are constructed similarly.


Designing a Circuit for a Given Input/Output Table
• First construct a Boolean expression
with this table as its truth table.

• To do this, identify each row for which


the output is 1.

• For each such row, construct an and


expression that produces a 1 (or true)
for the exact combination of input
values for that row and a 0 (or false)
for all other combinations of input
values.
Designing a Circuit for a Given Input/Output Table
• For example, the expression for the
first row is P ∧ Q ∧ R because P ∧ Q
∧ R is 1 if P = 1 and Q = 1 and R =
1, and it is 0 for all other values of P,
Q, and R.

• The expression for the third row is P∧


∼Q ∧ R because P∧ ∼Q ∧ R is 1 if P =
1 and Q = 0 and R = 1, and it is 0 for
all other values of P, Q, and R.

• Similarly, the expression for the fourth


row is P ∧ ∼Q ∧ ∼R.
Designing a Circuit for a Given Input/Output Table
It follows that a Boolean expression with
the given truth table is

(P ∧ Q ∧ R) ∨ (P∧ ∼Q ∧ R) ∨ (P∧ ∼Q∧


∼R).
Designing a Circuit for a Given Input/Output Table

The circuit corresponding


to the expression:

(P ∧ Q ∧ R) ∨ (P∧ ∼Q ∧ R) ∨ (P∧
∼Q∧ ∼R)
Simplifying Combinational Circuits
Consider the two combinatorial circuits
Simplifying Combinational Circuits
If you create a table for Circuit A

If you create a table for Circuit B


Simplifying Combinational Circuits
The Boolean expressions for each circuit are
((P∧ ∼Q) ∨ (P ∧ Q)) ∧ Q and P ∧ Q are logically equal.
Simplifying Combinational Circuits
The Boolean expressions for each circuit are
((P∧ ∼Q) ∨ (P ∧ Q)) ∧ Q
and
P ∧ Q are logically equal.
NAND and NOR Gates

• Another way to simplify a circuit is to find an equivalent circuit that uses the
least number of different kinds of logic gates.

• Two gates not previously introduced are particularly Harvard University


Archives H. M. Sheffer (1882–1964) useful for this: NAND-gates and NOR-
gates.

• A NAND-gate is a single gate that acts like an AND-gate followed by a NOT-
gate.

• A NOR-gate acts like an OR-gate followed by a NOT-gate.


NAND and NOR Gates

• Thus the output signal of a NAND-gate is 0 when, and only when, both input
signals are 1, and the output signal for a NOR-gate is 1 when, and only when,
both input signals are 0.

• The logical symbols corresponding to these gates are | (for NAND) and ↓ (for
NOR), where | is called a Sheffer stroke (after H. M. Sheffer, 1882–1964)
and ↓ is called a Peirce arrow (after C. S. Peirce, 1839–1914; see page
101). Thus

P | Q ≡ ∼(P ∧ Q) and P ↓ Q ≡ ∼(P ∨ Q).


NAND and NOR Gates
THANK YOU
IT - 104
Discrete Mathematics

You might also like