Title: A Prelude
 1A Prelude
- Practice yourself, for heavens sake, in little 
things and thence proceed to greater.  
Epictetus  - Today we are going to build simple systems 
satisfying binary input/output tables  
  2(No Transcript) 
 3Combinational Logic Units / Prelude
Input/output Spec Table
- Let us look at the pencil-and-paper assignment 
which was due today  - Describe a physical implementation of gadget 
which takes two inputs and one output.Each of the 
inputs can either take the value YES or the value 
NO.The same goes for the output. The gadget is 
specified by the input-output table to the left. 
Describe how the values NO and YES are 
represented in your physical system for the 
inputs as well as for the output. Moreover 
describe the implementation details of your 
gadget(system). 
In1 In1 Out
No No No
No Yes No
Yes No No
Yes Yes Yes 
 4Combinational Logic Units/Prelude
Input/output Spec Table
- Discussion of some answers
 
In1 In1 Out
No No No
No Yes No
Yes No No
Yes Yes Yes 
 5Combinational Logic Units / Prelude
Input/output Spec Table
- Same question but for a different Inpu/Output 
Spec Table  - Describe a physical implementation of gadget 
which takes two inputs and one output.Each of the 
inputs can either take the value YES or the value 
NO.The same goes for the output. The gadget is 
specified by the input-output table to the left. 
Describe how the values NO and YES are 
represented in your physical system for the 
inputs as well as for the output. Moreover 
describe the implementation details of your 
gadget(system). 
In1 In1 Out
No No No
No Yes Yes
Yes No Yes
Yes Yes Yes 
 6Combinational Logic Units / Prelude
Input/output Spec Table
- Disscussion of some answers
 
In1 In1 Out
No No No
No Yes Yes
Yes No Yes
Yes Yes Yes 
 7Combinational Logic Units /Prelude
Input/output Spec Table
- Let us look at the pencil-and-paper assignment 
which was due today  - Describe a physical implementation of gadget 
which takes two inputs and one output.Each of the 
inputs can either take the value YES or the value 
NO.The same goes for the output. The gadget is 
specified by the input-output table to the left. 
Describe how the values NO and YES are 
represented in your physical system for the 
inputs as well as for the output. Moreover 
describe the implementation details of your 
gadget(system). 
In Out
No Yes
Yes No 
 8Combinational Logic Units /Prelude
Input/output Spec Table
- Discussion of some answers
 
In Out
No Yes
Yes No 
 9Combinational Logic Units / Prelude
How do implement the following Input/output Spec 
Table
In1 In2 In3 Out
No No No No
No No Yes No
No Yes No No
No Yes Yes No
Yes No No No
Yes No Yes No
Yes Yes No No
Yes Yes Yes Yes 
 10Combinational Logic Units
- After the previous prelude we will discuss the 
following points  - Combinational Logic Units 
 - Specifying a CLU with a Input/Output Tables 
 - Reading off a Logic Diagram of a CLU from its 0-1 
Specification Tables  - Specifying a CLU with an Algebraic Expression of 
the Switching Algebra 
  11Combinational Logic UnitsSome Definitions
- Combinational logic a digital logic circuit in 
which logical decisions are made based only on 
combinations of the inputs. e.g. an adder.  - Sequential logic a circuit in which decisions 
are made based on combinations of the current 
inputs as well as the past history of inputs. 
e.g. a memory unit.  - Finite state machine a circuit which has an 
internal state, and whose outputs are functions 
of both current inputs and its internal state. 
e.g. a vending machine controller.  
  12Combinational Logic Units
- Combinational logic a digital logic circuit in 
which logical decisions are made based only on 
combinations of the inputs. e.g. an adder.  
  13Combinational Logic Unit
- Translates a set of inputs into a set of outputs 
according to one or more mapping functions.  - Inputs and outputs for a CLU normally have two 
distinct (binary) values high and low, 1 and 0, 
0 and 1, or 5 v. and 0 v. for example.  - The outputs of a CLU are strictly functions of 
the inputs, and the outputs are updated 
immediately after the inputs change. A set of 
inputs i0  in are presented to the CLU, which 
produces a set of outputs according to mapping 
functions f0  fm 
  14Combinational Logic Unit 
 15Specifying Combinational Logic Unit
Enough if you know how to handle the case of ONE 
output and arbitrary number of inputs 
 16SpecifyingCombinational Logic Unit
- CLU (with one output )is completely specified by 
an input/output table if you have more than one 
output you will have an input/output table for 
each output  - Since the inputs and outputs assume only two 
values say 0 or 1 (low voltage or high voltage 
etc) a CLU can be specified by 0-1 Table or Truth 
Table  
  17SpecifyingCombinational Logic Unit
0-1 Table/Truth Table
Truth Table
A B Out
F F F
0 T F
T F F
T T T
A B Out
0 0 0
0 1 0
1 0 0
1 1 1
A B Out
No No No
No Yes No
Yes No No
Yes Yes Yes 
 18Truth Tables Showing All Possible Functions of 
Two Binary Variables
- The more frequently used functions  AND, XOR, 
OR, NOR, XOR, and NAND. (Always use upper case 
spelling.) See also handout 
  19Combinational Logic Unit
- We have constructed an implementation of an AND, 
OR and NOT gate (waterworks ? )  
A B OR
0 0 0
0 1 1
1 0 1
1 1 1 
 20Combinational Logic Unit
- We have constructed an implementation of an AND, 
OR and NOT gate (waterworks ? )  
A B AND
0 0 0
0 1 1
1 0 1
1 1 1 
 21Combinational Logic Unit
- We have constructed an implementation of an AND, 
OR and NOT gate (waterworks ? )  
A NOT
0 1
1 0 
 22SpecifyingCombinational Logic Unit Example One 
Bit Full Adder
 1 1  1 ----- 11 
 23from spec table to Logic Diagram (LD) for a CLU
Output 2
inputs
Output 1
S
0
1
1
0
1
0
0
1
Cout
0
0
0
1
0
1
1
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1 
 24from spec table to (LD) for a CLU
inputs
Output 1
S
0
1
1
0
1
0
0
1
Let us concentrate on the First output the sum 
of the two input bits and the the carry_in.
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1 
 25from spec table to (LD) for a CLU
- Given the Truth table we can implement a circuit 
as follows  - For each input provide a line(wire) and a negated 
wire (by using inverters)  - Draw a multi-AND gate (that is, n-AND gate where 
n equals the number of inputs) for each 1 in the 
output column  - Wire the AND gates to the appropriate inputs (see 
next slides)  - Feed the output of all the AND gates into an OR 
gate  - In the next slides we show in detail how the 
above algorithm works. 
  26from spec table to LD Step 1
For each input we introduce a wire and a negated 
wire
inputs
Output 1
A
 Cin
B
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 27from spec table to LD Step 2
 Cin
A
B
For each 1 in the output Column introduce a 
multi-way AND gate
inputs
Output 1
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 28From spec table to LD Step 3 
Consider each (input) row of which the output is 
1 connect the input lines to the AND gate 
appropriately if 0 appears connect to neg line 
for a 1 to the line itself 
 Cin
A
B
inputs
Output 1
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 29spec table to LD Step 3 (contd)
Consider each (input) row of which the output is 
1 connect the input lines to the AND gate 
appropriately if 0 appears connect to neg line 
for a 1 to the line itself 
 Cin
A
B
inputs
Output 1
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 30spec table to LD Step 3 (contd)
Consider each (input) row of which the output is 
1 connect the input lines to the AND gate 
appropriately if 0 appears connect to neg line 
for a 1 to the line itself 
 Cin
A
B
inputs
Output 1
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 31spec table to LD Step 3 (contd)
Consider each (input) row of which the output is 
1 connect the input lines to the AND gate 
appropriately if 0 appears connect to neg line 
for a 1 to the line itself 
 Cin
A
B
inputs
Output 1
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 32spec table to LD Step 4
 Cin
Wire the AND gates to a multi OR gate (for this 
example a 4-OR gate)
A
B
inputs
Output 1
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
S
Digital Techniques Fall 2007 André Deutz, Leiden 
University 
 33from spec table to LD for (CLU)
- Does our 4-step algorithm produce the right Logic 
Diagram for the Combinational Logic Unit? Why?  - This algorithm will generally not produce the 
most frugal combinational logic unit.  - Despite the previous remark this algorithm is 
still very important! Why?  -  This algorithm convinced us that for each 
input/output table (0/1-table) there exists an LD 
( or for that matter a CLU) satisfying it. 
Besides the LD (or for that matter also the CLU) 
produced by the algorithm there are, of course, 
many more LDs satisfying the 1/0-table (some of 
them will in general be more efficient)  - Secondly once you can translate your task into 
an input/output table you are home free (we can 
worry later about optimizing the circuit) 
  34Two more examples a 4x1 Multiplexer and 1x4 
Demultiplexer and the Music the pair can make 
 35Boolean Algebra 
 36Boolean Algebra
- Actually a special kind of Boolean Algebra 
namely, Switching Algebra  
  37Intro to Boolean Algebra Specifying 
- Sofar we can specify a CLU either by a Logic 
Diagram of NOT, AND and OR gates or by a 
1/0-table  - There is at least a third way of specifying CLU 
namely via Algebra (algebraic equations/expression
s)  - What is the advantage of Algebraic 
specifications? Among others can simplify 
circuits by manipulating expressions with pencil 
and paper or computer programs 
  38Boolean Algebra
- In order to analyze and design digital 
combinational logic units we need a mathematical 
system.  - Binary logic system called Boolean Algebra is 
used.  - George Boole (1815-1864) An investigation of 
the laws of thought  a book published in 1854 
introducing the mathematical theory of logic.  - Boolean Algebra deals with binary variables that 
take 2 discrete values (0 and 1), and with logic 
operations.  - Binary/logic variables are typically represented 
as letters A,B,C,,X,Y,Z or a,b,c,,x,y,z.  - Three basic logic operations 
 - AND, OR, NOT (complementation or negation).
 
  39Basic Logic Operations 
- AND operation is represented by operators  or 
  or by the absence of an operator.  - Z  XY or Z  X Y, or Z  XY is read Z is 
equal to X AND Y meaning that  - Z  1 if and only if X  1 and Y  1 otherwise Z 
 0.  - AND resembles binary multiplication 
 -  0  0  0, 0  1  0, 
 -  1  0  0, 1  1  1 
 - OR operation is represented by operators  or  
 .  - Z  XY or Z  X Y is read Z is equal to X 
OR Y meaning that  - Z  1 if X  1 or Y  1, or if both X  1 and Y  
1. Z  0 if and only if X  0 and Y  0.  - OR resembles binary addition, except in one case 
 -  0  0  0, 0  1  1, 
 -  1  0  1, 1  1  1 (? 102) 
 - NOT operation is represented by operator    or 
by a bar over a variable.  - Z  X or Z  X is read Z is equal to NOT X 
meaning that  - Z  1 if X  0 but Z  0 if X  1 
 - NOT operation is also referred to as complement 
operation.  
  40Basic Identities of Boolean Algebra
- Let X be a boolean variable and 0,1 constants 
 - 1. X  0  X -- Zero Axiom 
 - 2. X  1  X -- Unit Axiom 
 - 3. X  1  1 -- Unit Property 
 - 4. X  0  0 -- Zero Property 
 - 5. X  X  X -- Idempotence 
 - 6. X  X  X -- Idempotence 
 - 7. X  X  1 -- Complement 
 - 8. X  X  0 -- Complement 
 - 9. (X)  X -- Involution 
 
  41Boolean Algebra Properties 
- Let X,Y, and Z be boolean variables 
 - Commutative 
 -  10. X  Y  Y  X 11. 
X  Y  Y  X  - Associative 
 -  12. X  (YZ)  (XY)  Z 13. 
X(YZ)  (XY)Z  - Distributive 
 -  14. X(YZ)  XY  XZ 15. 
X(YZ)  (XY)  (XZ)  - DeMorgans Theorem 
 -  16. (X  Y)  X  Y 17. 
(X  Y)  X  Y  - In general for DeMorgan, 
 - ( X1  X2    Xn )  X1  X2    Xn, 
 - ( X1  X2    Xn )  X1  X2    Xn 
 
  42The Duality Principle
- The dual of an expression is obtained by 
exchanging ( and ), and (1 and 0) in it, 
provided that the precedence of operations is not 
changed.  - Cannot exchange x with x. 
 - Example 
 - Find the dual of expression xyz  xyz 
 - Answer (x  y  z )  (x   y  z) 
 - Dual expression does not always equal the 
original expression.  - If a Boolean equation/equality is valid, its dual 
is also valid.  
  43The Duality Principle (cont.)
With respect to duality, Identities 1  8 and 
Properties 10  17 have the following 
relationship 1. X  0  X 
 2. X  1  X (dual of 1) 3. X  1 
 1 4. X  0  0 (dual of 
3) 5. X  X  X 6. X  X  X 
 (dual of 5) 7. X  X  1 8. 
X  X  0 (dual of 7) 10. X  Y  Y  X 
 11. X  Y  Y  X 
(dual of 10) 12. X  (YZ)  (XY)  Z 13. 
X(YZ)  (XY)Z (dual of 12) 14. 
X(YZ)  XY  XZ 15. X(YZ)  (XY)  
(XZ) (dual of14) 16. (X  Y)  X  Y 
 17. (X  Y)  X  Y (dual 
of16) 
 44Absorption Property (Covering)
- X  XY  X -- (absorption property) 
 - X(XY)  X -- (dual absorption property) 
 - ProofX  XY  X1  XY  X  (1  Y)  
 X  1  X  - Can you prove the dual absorption property?
 
  45Principle of dualityThe dual of a Boolean 
function is gotten by replacing AND with OR and 
OR with AND, constant 1s by 0s,and 0s by 1s
 Occams Razor for Boolean Algebras
A(AB)  AB AABAB elimination of 
complement 
 46A more formal definition Boolean Algebras
- A Boolean algebra is a set B on which two binary 
operations  and  and one unary operation ' are 
defined and in which there are two distinct 
elements 0 and 1 such that the following 
properties hold for all x, y, z ? B 
  47A more formal definition of Boolean Algebras 
(continued)
- 1a. x  y  y  x 1b. x  y  y  x (commutative 
properties)  - 2a. (x  y)  z  x  (y  z) 2b. (x  y) z  x 
 (y  z) (associative properties)  - 3a. x  (y  z)  (x  y )  (x  z) 
 - 3b. x  (y  z)  (x  y)  (x  z) 
(distributive properties)  - 4a. x  0  x 4b. x  1  x (identity 
properties)  - 5a. x x  1 5b. x  x  0 (complement 
properties)  
  48The specific Boolean Algebra we use
- Example Let B  0,1 ( the set of integers 0 
and 1) define binary operations  and  on B by  -  x  y  max(x,y ), 
 -  x  y  min(x,y ) 
 - Then we can illustrate the operations of  and  
by the tables  -  0 1  0 1 
 - 0 0 0 0 0 1 
 - 1 0 1 1 1 1 
 - A unary operation ' can be defined as follows 
 - ' 
 - 0 1 
 - 1 0 Thus 0'  1 and 1'  0. B, , , ', 0, 1 
is a Boolean algebra We can verify the 10 
properties by checking all possible cases 
  49Remark on Boolean Algebras
- idempotent property x  x  x 
 - This holds in any Boolean algebra since 
 - x  x  (x  x)  1 (4b) 
 -  (x  x)  (x  x' ) (5a) 
 -  x  (x  x') (3a) 
 -  x  0 (5b) 
 -  x (4a) 
 
  50Non-Example on Boolean Algebra
- The operations on integers share many of the 
properties of the operations for boolean 
algebras.  - Idempotency is a property which is not shared. 
 - Thus the set of integers is not a boolean algebra 
(aside from needing a complementation operation) 
  51Transition from 1/0 table to LD to Boolean 
expression
- Combinational Logic Units with one output can be 
specified by  - A Boolean equation 
 - A Logical Diagram 
 - 1/0 table 
 - We already saw how to get a Logic Diagram (LD) 
from a 1/0 table it is clear that from the Logic 
Diagram you can read off a 1/0 table  - It is also clear how you get a Boolean expression 
from a 1/0 table 
  52From 1/0 table to Boolean expression
S
0
1
1
0
1
0
0
1
A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
S  A ' B ' C  A ' B C '  AB ' C ' ABC 
 53From Boolean expression to 1/0 table?
F
0
1
1
1
0
0
1
1
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
F A ' B ' C  B 
 54To remember
- With Boolean expressions (BE), or Logic 
Diagrams(LD) or Truth tables(TT) you can specify 
CLU with one output.  - The transition between any of the two of ( BEs, 
TTs or LDs) can be readily done