Title: Logic, Circuits, and Truth Tables
1Logic, Circuits,and Truth Tables
- CS 147Dr. Sin-Min Lee
- Presented by
- Kristina Miguel
2Introduction
- The CPU is constructed from logic gates.
- The basic activity of the control unit is
decoding instructions. - Decoder circuits use an input binary number to
select an output line, or several lines. - Logic circuits can be implemented directly from
truth table information.
3Review Basic Logic Gates with Truth Tables
4Traffic Light Controllers Impossible to avoid!
- Traffic controllers are an example of decoder
circuits. - Integrated urban traffic management schemes
depend on communication links between the traffic
light controllers and a central control computer.
5Example System
- Traffic light controllers found at British road
junctions have the sequence Red, Red/Amber,
Green, Amber, and then Red again. - We will analyze the corresponding truth tables.
6Circuit Implementation from Truth Tables some
practical tips
7Tip 1 Identical Columns
- The input is directly connected to the output if
an output column is identical to an input column.
No logic is required. - The level crossing Amber output and Y input are
identical and can be expressed as
8Tip 2 Nearly Identical Columns
- An output can be generated by a simple logic
function from only some of the inputs. - The level crossing Red is the inverse of input X.
9Tip 3 Solo Row
- Use an AND gate to detect the input row if an
output column only has a single 1. - The level crossing Green can be expressed as
10Tip 3 Solo Row (cont.)
- The crossroads Green can be expressed as
11Tip 4 Inverted Solo Row
- Use an AND gate to detect the input row pattern,
and then a NOT inverter when an output column
only has a single 0. - Crossroads Red can be expressed as
12Tip 5 Standard Patterns
- Sometimes it is possible to utilize an existing
logic circuit, with minimum modification. - Let us consider a simple washing machine
controller. - XOR can be used as a difference detector as
seen in the motor control output from the
following washing machine example.
13Tip 5 Standard Patterns (cont.)
- Motor can be expressed as
- Motor (X XOR Y) AND Z
14Tip 6 Elimination
- A shortcut can be taken when considering the
Crossroads truth table. - There are two rows where both X and Z contains
1 and the value of Y has no effect in
determining the output. - Crossroads Amber can be expressed as
15Tip 7 Sum-of-Products
- When these short cuts do not work out, the brute
force method remains - Run down each output column and mark every row
which contributes a 1. - Next set up an AND gate pattern detector for each
marked row, using NOT gates on inputs if 0 is
detected. - Then allocate an OR gate to each output column.
16Decoder Logic essential for control units and
memories
- The essential purpose of a decoder is to
recognize a code number and invoke the
corresponding action. - The schematic diagram for a decoder is a box with
more output than input lines. - Proper decoders select a single output line at
a time. - Example 74F138 Decoder
- 3 to 8 line decoder
- Accepts three binary weighted inputs.
- The output selected depends on the input number.
- Ideal for memory chip select decoding.
17Example 74F138 Decoder
18Another Example Seven-Segment Converter
- The seven-segment decoder has three inputs and
eight outputs and could be modified to implement
a binary to seven-segment display converter.
- The unit is constructed from seven LEDs
(Light-Emitting Diodes).
19Applying the Brute Force Method
- Using logic expressions you can design a
seven-segment display converter driver circuit. - The truth table logic terms for each output
column can be directly implemented by the brute
force method.
20Applying the Brute Force Method (cont.)
21Applying the Brute Force Method (cont.)
22Using Logic Expressions to Design a Logic Circuit
- Logic circuit for the a segment of a
seven-segment LED driver. - a can be derived by taking the complement of
inverse a
23Summary
- Truth tables can clearly express logic circuit
functionality by displaying input-output
relationships. - Some short cuts can be used to speed up the
process of deriving logic circuits from truth
tables. - Logic minimization may not be the priority when
building circuits.