Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Boolean Algebra
AND OR NOT NAND NOR Exclusive-OR (XOR) Exclusive-NOR (XNOR)
AND/OR
AB = F
A 0 0 1 1 B 0 1 0 1 F 0 0 0 1
A + B = F
A 0 0 1 1 B 0 1 0 1 F 0 1 1 1
NOT
A = F
A 0 1 F 1 0
NAND/NOR
AB = F
A 0 0 1 1 B 0 1 0 1 F 1 1 1 0
A + B = F
A 0 0 1 1 B 0 1 0 1 F 1 0 0 0
A xnor B = F
A 0 0 1 1 B 0 1 0 1 F 1 0 0 1
Types of Logic
Combinational Logic Sequential Logic
Combinational Logic
Logical decisions based only on
combinations of inputs Maps inputs to outputs No feedback Inputs/outputs have two states
Combinational Logic
Analog
Continuum of values
Multi-valued circuits
Logic Gates
Boolean operations can also be
represented as Boolean logic functions AND
AB
A+B A
OR
Compliment
Logic Gates
AND
A B F OR A B F
Buffer A F
Inverter A F
Logic Gates
NAND
A B F NOR A B F
Exclusive-OR (XOR)
Exclusive-NOR (XNOR)
A
B
A
B
Transistors
Control strong electrical signal with a
weak signal Support the process of amplification Threshold
Only voltages within the low and high ranges will work Forbidden Zone
Electronics: Inverter
VCC = +5 V RL A A Vin
VCC
Vout
Collector Emitter
Distributive
Identity
Logical inverse
Associative
Idempotence
Multimedia Logic
Try this
Draw logic diagrams for the following:
Create a truth table & a circuit diagram for each of the previous equations Implement your diagrams and test them
DeMorgans Laws
A + B AB
=AB =A+B
Standard Circuits
Multiplexer/Demultiplexer Encoder/Decoder Full adder
Multiplexer/Demultiplexer
Multiplexer
Demultiplexer
Try this
Create a truth table for a 2-input
multiplexer Use this truth table to create a corresponding circuit
Encoder/Decoder
Encoder
2n inputs / n outputs Output is binary code for which input had a 1 n inputs / 2n outputs Output that gets 1 determined by inputs; all others get 0
Decoder
Try this
Create a truth table for a 4x2 encoder? Use this truth table to create a
corresponding circuit
Full adder
Adds three one-bit
binary numbers (C A B) and outputs two one-bit binary numbers, a sum (S) and a carry (C1) Usually a component in a cascade of adders The carry-in for one full-adder circuit is from the carry-out from the previous circuit
1 1 1 1 + 0 1 1 0 0
Try this
Create a truth table for a Full Adder Use this truth table to create a
corresponding circuit
Sequential Logic
Decisions based on combinations of
current inputs as well as past history of outputs
S-R Flip-Flop
What would
the truth table look like for this? Is Q an input? Whats the purpose of this circuit?
S
Reduction
Algebraic Method K-Map Method Tabular Method
Algebraic Method
F = AB + A = A(B + 1) = A(1) =A
distributive property identity identity
Algebraic Method
F = ABC + ABC + ABC + ABC
How would you reduce this? Give it a try! Did you get F = BC + AC + AB ? How did you get it?
Algebraic Method
Try these
Try this
Create a circuit diagram based on the
following 4 inputs, 1 output Output is 1 whenever exactly two of the inputs are 1
K-Map Method
F = ABC + ABC + ABC + ABC
AB
C
0 1
00
01
11 1
10
Try this
AB
CD 00 01 11 10 1 00 1 01 11 1 10 1 1 1
And this
AB
CD 00 01 11 10 1 1 1 1 00 01 1 11 1 1 1 10
And this
AB
CD 00 01 11 10 1 00 01 1 1 1 1 1 1 1 11 10
And this
AB
CD 00 01 11 10 00 1 1 1 1 1 1 1 01 11 10 1
Dont Cares
Can be 0 or 1
AB
CD 00 01 11 10 d 00 1 1 1 1 1 01 11 10 d
Try this
AB
CD 00 01 11 10 d 1 1 1 1 1 d 00 01 11 10 d
Try this
Design a circuit with three inputs and
two outputs, such that the outputs represent the binary encoding of the three inputs added together.
Tabular Method
(Quine-McClusky)
A 0 0 B 0 0 0 C 0 0 1 D 0 1 0 F A 0 B 0 C 0 D 0
d
1 0
0 0
0
0 0
1 1 0 1 0 1 1
0 1
0 1 1 1 1 0 1
1 1
1 0 0 1 1 1 1
A.
0
0 0 0 0 1 1 1 1 1 1 1 1
0
1 1 1 1 0 0 0 0 1 1 1 1
1
0 0 1 1 0 0 1 1 0 0 1 1
1
0 1 0 1 0 1 0 1 0 1 0 1
1
0 1 1 1 0 0 1
B.
0 1 0 1 1 1
A. Start with a truth table that lists all input combinations and their outputs B. Eliminate rows that have a 0 output
d
0 1 0
Tabular Method
(Quine-McClusky)
A 0 B 0 C 0 D 0 A B 0 C 0 D _
0 0
0 0 1 0 1 1 1
0 0
1 1 0 1 0 1 1
0 1
0 1 1 1 1 0 1
1 1
1 0 0 1 1 1 1
0 _
_ 0 1 1 1 0 1 _
_ 0
1 1 _ 0 1 1 1 1
1 1
1 1 1 1 _ _ 1 1
C.
0
0 _ 0 _ 0 1 _ 1
C. Find all combinations of rows where only one bit is different and replace the bit with a blank D. Repeat this process until no additional pairings are possible
Tabular Method
(Quine-McClusky)
A 0 B 0 C 0 D _ A B _ C _ D 1
0 0
0 _ 0 _ 0 1 _ 1
0 _
_ 0 1 1 1 0 1 _
_ 0
1 1 _ 0 1 1 1 1
1 1
1 1 1 1 _ _ 1 1
* *
_ _
_ 1
1 _
1 1
* *
Tabular Method
(Quine-McClusky)
A 0 B 0 C 0 D _ A B _ C _ D 1
0 0
0 _ 0 _ 0 1 _ 1
0 _
_ 0 1 1 1 0 1 _
_ 0
1 1 _ 0 1 1 1 1
1 1
1 1 1 1 _ _ 1 1
* *
_ _
_ 1
1 _
1 1
* *
These are the rows we will turn into terms in our equation
Try this!
Create a circuit consisting of 2, 1-bit
inputs (A and B), 2 control bits (C1, C0), and one output (F), that will perform the following operations