0% found this document useful (0 votes)
2 views43 pages

Digital Logic Lab Manual (CSS 351) (1)Digital Logic Lab Manual (CSS 351) (1)

Digital Logic Lab Manual (CSS 351) (1)Digital Logic Lab Manual (CSS 351) (1)
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views43 pages

Digital Logic Lab Manual (CSS 351) (1)Digital Logic Lab Manual (CSS 351) (1)

Digital Logic Lab Manual (CSS 351) (1)Digital Logic Lab Manual (CSS 351) (1)
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Gates and Circuits

Computers and Electricity

Gate
A device that performs a basic operation on
electrical signals
Circuits
Gates combined to perform more
complicated tasks

2
Computers and Electricity
How do we describe the behavior of gates and
circuits?
Boolean expressions
Uses Boolean algebra, a mathematical notation for
expressing two-valued logic
Logic diagrams
A graphical representation of a circuit; each gate has its
own symbol
Truth tables
A table showing all possible input value and the associated
output values
3
Gates

Six types of gates


– NOT
– AND
– OR
– XOR
– NAND
– NOR

Typically, logic diagrams are black and white with


gates distinguished only by their shape
We use color for emphasis (and fun)

4
NOT Gate

A NOT gate accepts one input signal (0 or 1) and


returns the opposite signal as output

Figure 4.1 Various representations of a NOT gate

5
AND Gate

An AND gate accepts two input signals


If both are 1, the output is 1; otherwise,
the output is 0

Figure 4.2 Various representations of an AND


gate

6
OR Gate
An OR gate accepts two input signals
If both are 0, the output is 0; otherwise,
the output is 1

Figure 4.3 Various representations of a OR


gate
7
XOR Gate

An XOR gate accepts two input signals


If both are the same, the output is 0; otherwise,
the output is 1

Figure 4.4 Various representations of an XOR gate

8
XOR Gate

Note the difference between the XOR gate


and the OR gate; they differ only in one
input situation
When both input signals are 1, the OR gate
produces a 1 and the XOR produces a 0

XOR is called the exclusive OR

9
NAND Gate

The NAND gate accepts two input signals


If both are 1, the output is 0; otherwise,
the output is 1

Figure 4.5 Various representations of a NAND gate


NOR Gate
The NOR gate accepts two input signals
If both are 0, the output is 1; otherwise,
the output is 0

Figure 4.6 Various representations of a NOR gate

11
Functionally Complete Gates
° Just like the NAND gate, the NOR gate is functionally
complete…any logic function can be implemented
using just NOR gates.
° Both NAND and NOR gates are very valuable as any
design can be realized using either one.
° It is easier to build an IC chip using all NAND or NOR
gates than to combine AND,OR, and NOT gates.
° NAND/NOR gates are typically faster at switching
and cheaper to produce.
NOR Gates into Other Gates

(what are these circuits?)


A
Y

NOT Gate A
B Y

A OR Gate

Y
B

AND Gate
The XOR Gate (Exclusive-OR)
A
Y
B
° This is a XOR gate.
A B Y
° XOR gates assert their output 0 0 0

when exactly one of the inputs 0 1 1

1 0 1
is asserted, hence the name.
1 1 0
° The switching algebra symbol

for this operation is ⊕, i.e.

1 ⊕ 1 = 0 and 1 ⊕ 0 = 1.
The XNOR Gate
A
Y
B
° This is a XNOR gate. A B Y
° This functions as an 0 0 1
exclusive-NOR gate, or 0 1 0
simply the complement of 1 0 0
the XOR gate. 1 1 1
° The switching algebra symbol
for this operation is , i.e.
1  1 = 1 and 1  0 = 0.
NOR Gate Equivalence
° NOR Symbol, Equivalent Circuit, Truth
Table
DeMorgan’s Theorem
° A key theorem in simplifying Boolean algebra
expression is DeMorgan’s Theorem. It states:
(a + b)’ = a’b’ (ab)’ = a’ + b’

° Complement the expression a(b + z(x + a’)) and simplify.

(a(b+z(x + a’)))’= a’ + (b + z(x + a’))’


= a’ + b’(z(x + a’))’
= a’ + b’(z’ + (x +
a’)’)
= a’ + b’(z’ + x’a’’)
= a’ + b’(z’ + x’a)
Example
° Determine the output expression for the
below circuit and simplify it using
DeMorgan’s Theorem
Universality of NAND and NOR gates
Universality of NOR gate

° Equivalent representations of the AND, OR, and


NOT gates
Example
Interpretation of the two NAND gate symbols

° Determine the output expression for circuit via


DeMorgan’s Theorem
Interpretation of the two OR gate symbols

° Determine the output expression for circuit via


DeMorgan’s Theorem
Summary
° Basic logic functions can be made from NAND, and
NOR functions
° The behavior of digital circuits can be represented with
waveforms, truth tables, or symbols
° Primitive gates can be combined to form larger circuits
° Boolean algebra defines how binary variables with
NAND, NOR can be combined
° DeMorgan’s rules are important.
• Allow conversion to NAND/NOR representations
Gates with More Inputs

Gates can be designed to accept three or more input


values
A three-input AND gate, for example, produces an output of
1 only if all input values are 1

25 Figure 4.7 Various representations of a three-input AND gate


Circuits

Combinational circuit
The input values explicitly determine the output
Sequential circuit
The output is a function of the input values and the
existing state of the circuit
We describe the circuit operations using
Boolean expressions
Logic diagrams
Truth tables Are you surprised?

26
Combinational Circuits

Gates are combined into circuits by using the


output of one gate as the input for another

27
Combinational Circuits

Three inputs require eight rows to describe all possible


input combinations
This same circuit using a Boolean expression is (AB + AC)

28
Combinational Circuits

Consider the following Boolean expression A(B + C)

Does this truth table look familiar?


Compare it with previous table
29
Combinational Circuits

Circuit equivalence
Two circuits that produce the same output for
identical input
Boolean algebra allows us to apply provable
mathematical principles to help design circuits
A(B + C) = AB + BC (distributive law) so circuits
must be equivalent

30
Properties of Boolean
Algebra

31
Multiplexers

Multiplexer
A circuit that uses a few input control signals
to determine which of several output data
lines is routed to its output

32
Multiplexers

The control lines


S0, S1, and S2
determine which
Figure 4.11 A block diagram of a multiplexer with three
select control lines
of eight other
input lines
(D0 … D7)
are routed to the
output (F)

33
Circuits as Memory

Digital circuits can be used to store


information
These circuits form a sequential circuit,
because the output of the circuit is also
used as input to the circuit

34
Circuits as Memory

An S-R latch stores a


single binary digit
(1 or 0)
There are several
ways an S-R latch
circuit can be
designed using
various kinds of
Figure 4.12 An S-R latch
gates
35
Circuits as Memory

The design of this circuit


guarantees that the two outputs
X and Y are always
complements of each other
The value of X at any point in
time is considered to be the
current state of the circuit
Therefore, if X is 1, the circuit is
storing a 1; if X is 0, the circuit is
storing a 0

Figure 4.12 An S-R latch

36
Integrated Circuits

Integrated circuit (also called a chip)


A piece of silicon on which multiple gates
have been embedded
Silicon pieces are mounted on a plastic or
ceramic package with pins along the edges
that can be soldered onto circuit boards or
inserted into appropriate sockets

37
Integrated Circuits

Integrated circuits (IC) are classified by the


number of gates contained in them

38
Integrated Circuits

Figure 4.13 An SSI chip contains independent NAND gates

39
CPU Chips

The most important integrated circuit


in any computer is the Central Processing
Unit, or CPU
Each CPU chip has a large number of pins
through which essentially all communication
in a computer system occurs

40
Ethical Issues

Email Privacy
Explain why privacy is an illusion.
Who can read your email?
Do you send personal email from
work?
Does everyone in your family use
email?
41
Who am I?

All the world knows my name. What is


it and why do people know it?

42
Do you know?

What is the name of the study of materials


smaller than 100 nanometers?

Did DeMorgan discover DeMorgan's laws?

Who did the 4th Infantry Division take to


war with them?

What is a virtual charity event?

43

You might also like