Digital Logic and Boolean Algebra

Digital Computer
„
Modern day computers are made out of
electronic device called transistors
„
Transistors act as switch (abstraction)
Digital Logic and Boolean Algebra
„
„
Applying a certain input voltage, the transistor acts as
a switch i.e. OFF(OPEN) or ON(CLOSE)
Voltage is discrete i.e. HIGH (1) or LOW(0)
CIT 595
S i 2010
Spring
x = 0
x = 1
two states of a switch
CIT 595
Transistor: Building Block of Computers
Making Logical Functions from Switches
Power
supply
S
S
x
x
1
2
Light
L
S- switch (0 – OPEN, 1 – CLOSED)
x1
x2 L
0
0
0
0
1
0
1
0
0
1
1
1
AND
„
Logically, each transistor acts as a switch
„
Combined to implement
p
logic
g functions
„ AND, OR, NOT
„
Combined to build higher-level structures
„ Adder, register, multiplexer, decoder, …
„
Combined
C
bi d tto b
build
ild processor
„ LC-3, Intel Pentium 4, Sun SPARC
S
x
Power
supply
x1 x2 L
1
S
x
2
OR Function
CIT 595
2
L
Light
0
0
0
1
1
0
1
1
0
1
1
1
3
CIT 595
4
1
Integrated Circuits (IC) Examples
Integrated Circuits
„
7404 Chip
Integrated Circuits (IC) contain dozens
transistors on single silicon chip
„
Very Large Scale Integrated circuits (VLSI)
have more than 10,000 components per chip
„
Enabled the creation of microprocessors
„
The first was
as the 4
4-bit
bit Intel 4004
„
Intel 80 series had around 29,000 transistors
(6 Inverters on one chip)
Millions of Transistors on silicon
Wafer (VLSI)
VDD
Gnd
CIT 595
5
CIT 595
Moore’s Law (Rule of Thumb)
„
Moore’s Law example
Gordon Moore, Intel founder in 1965 said
“The density of transistors in an integrated
circuit will double every year
year.”
„
6
DEC
LSI-11,
LSI
11
Early 1980’s
Contemporary version: “The density of
silicon chips doubles every 18 months.”
Faster computation (also, prices decline)
„ experts predict this trend might continue
until ~2020
„ limited when size reaches molecular level
„
CIT 595
DEC
PDP-11,
mid 1970’s
7
CIT 595
These computers were functionally equivalent
8
2
Transistor Density Increase
Logic Gates
„
CIT 595
9
A gate is an electronic device that produces a
result based on one or more input values
„
In reality, gates consist of transistor(s), but digital
d i
designers
thi
think
k off th
them as a single
i l unit
it
„
Integrated circuits contain collections of gates suited
to a particular purpose
CIT 595
10
Image source: wikipedia
Basic Gates
„
NAND and NOR gates
The three simplest gates are the AND, OR, and
NOT gates
CIT 595
11
CIT 595
12
3
Universal Gates
„
XOR Gate
„
NAND and NOR
are known as
universal g
gates
because they are
inexpensive to
manufacture and
any Boolean
function can be
constructed using
g
only NAND or only
NOR gates
CIT 595
„
Another very useful gate is the exclusive OR
(XOR) gate
The output of the XOR operation is true only
when the values of the inputs differ
Note the special symbol ⊕
for the XOR operation.
13
CIT 595
Boolean Expression & Function
Boolean Algebra
„
„
„
Computer components
„
So how do I know what combination of basic gates will give
the desired output??
„
Boolean expressions are created by performing
“operations on Boolean variables”
„
„
Boolean algebra is a mathematical system for the
manipulation of variables that can taken on only two
values
„
„
“true” and “false”, “1” and “0”, or “high” and “low”
Inventor George Boole (1815 – 1864)
„
CIT 595
„
In the late 1930s Claude Shannon showed that
Boolean algebra provides an effective means of
describing circuits built with switches
15
Common Boolean operators include AND, OR, and
NOT
E.g. NOT(X AND Y) -> X and Y are Boolean variables
A Boolean function has:
„
„
14
At least one Boolean variable
At least one Boolean operator, and
At least
l
t one input
i
t from
f
the
th sett {0,1}
{0 1}
„
It produces an output that is also a member of the set
{0,1}
„
E.g. F(x,y) = NOT (X AND Y)
CIT 595
16
4
Boolean Operator
Truth Tables
„
Useful in depicting information involving logic
functions
„
Enumerate all possible values for a function
„
2n rows
„
A Boolean operator can be completely
described using a truth table
„
The AND operator
p
is also known as a
“Boolean product”.
„
It is also represented with dot symbol.
E.g x.y
¾ 2n
possible input combinations and their respective
output
„
„
„
Important:
p
„
„
Always list the rows of the truth table in numerical
order (base 2) of the variables
This way the values in the function column completely
specify the function
CIT 595
17
Boolean Operator Precedence
„
Boolean operations
have rules of
precedence
„
The NOT operator has
highest priority,
followed by AND and
th OR
then
CIT 595
The OR operator is the “Boolean sum”.
„
It is also represented with ‘+’ symbol.
E.g.
g x+y
The NOT operation is most often
designated by an overbar.
„
It is sometimes indicated by a prime
mark ( ’ ) or an “elbow” (¬) or tilda (~)
CIT 595
18
Gate representation of Boolean Function
19
CIT 595
20
5
Boolean Function Standardization
„
A technique to express unknown
function
„
Boolean expression is derived using
inputs and outputs from a truth table
„
The function is said to be expressed in
standardized or canonical form
CIT 595
Standard or Canonical Form
21
Conversion to Sum-of-Products Form
„
„
There are two canonical forms for Boolean expressions:
sum-of-products and product-of-sums
„ Recall the Boolean product is the AND operation
and the Boolean sum is the OR operation
operation.
„
In the sum-of-products form, ANDed variables are
ORed together.
„ For example:
„
In the product-of-sums form, ORed variables are
ANDed together:
„ For example:
CIT 595
22
Conversion to Sum-of-Products form (contd..)
We are interested in the values
of the variables that make the
function “true” (i.e. output 1)
„
The sum-of-products form
for function is:
Using the truth table, we list the
values of the variables that
result in a true value
„
„
„
„
The variables corresponding to row
with output 1 are “ANDed”
One ANDed Group is
known as Minterm
If the variable’s input value is 1
then it is written as it is else the
complement of that variable is
written
Note: This function is not in
simplest terms. It was just shows
how the function can be rewritten
in canonical sum-of-products
form.
Each group of variables is then
“Ored” together
CIT 595
23
CIT 595
24
6
Conversion to Product-of-Sums
„
„
We are interested in the values of
the variables that make the function
“false” (i.e. output 0)
„
The sum-of-products form for
function is:
Using the truth table, we list the
values of the variables that result in
a false value
The variables corresponding to row
with output 0 are “ORed”
If the variable’s input value is 0
then it is written as it is else the
complement of that variable is
written
„
„
„
Conversion to Product-of-Sums (contd..)
One ORed Group is
known as Maxterm
Each group of variables is then
“ANDed” together
CIT 595
25
CIT 595
Boolean Function Reduction – Part I
„
Digital computers contain circuits that implement
Boolean functions
„
The simpler we can make a Boolean function
function, the
smaller the circuit that will result
„
Boolean Identity Group I
„
Most Boolean identities have an AND (product)
form as well as an OR (sum) form.
Simpler circuits are cheaper to build, consume less
power, and run faster than complex circuits
„
With this in mind, we always want to reduce our
Boolean functions to their simplest form
„
One way to do Boolean function reduction is by
using Boolean identities
CIT 595
26
27
CIT 595
28
7
Boolean Identity Group II
„
Boolean Identity Group III
The second group of Boolean identities should be
familiar to you from your study of algebra:
CIT 595
„
29
If you have studied set theory or formal logic, these
laws are also familiar to you
CIT 595
Example using Boolean Identity
„
De Morgan’s Law
We can use Boolean identities to simplify the function:
„
Sometimes it is more economical to build a
circuit using the complement of a function (and
complementing its result) than it is to implement
the function directly
„
DeMorgan’s law provides an easy way of finding
the complement of a Boolean function
(x + y)(x’ + y)
= xx’ + xy + yx’ + yy
Distributive Law
= 0 + xy + yx’ + y
Inverse & Idempotent Law
= xy + yx’ + y
Identity Law
= y(x + x’) + y
Distributive Law
= y(1) + y
Inverse Law
= y+y
Identity Law
= y
Idempotent Law
CIT 595
30
31
CIT 595
32
8
De Morgan’s Law (contd..)
„
DeMorgan’s law
„
Can be extended to any number of variables
Replace each variable by its complement and
change all ANDs to ORs and all ORs to ANDs
Thus, we find the the complement of:
„
„
CIT 595
33
9