5 input / 5 output example
The problem
The following data describes a 5 input / 5 output truth table which
will be simplified in two ways.
The first form of boolean simplification will simplify each of the 5
output functions separately, producing a two level logic solution (one
level of AND gates followed by a second level of OR gates).
The second form will simplify all the 5 outputs simultaneously,
producing a three level solution that also minimizes the total number
of
logic gates.
File: 5in5out.tab
5 input / 5 ouput
##### Input signals
A4 High Active 1
A3 High Active 1
A2 High Active 1
A1 High Active 1
A0 High Active 1
##### Output signals
B4 High 1 Active 1
B3 High 1 Active 1
B2 High 1 Active 1
B1 High 1 Active 1
B0 High 1 Active 1
##### Flags
Mode=0
Table/Tree=0
Equations=1
Stats=0
##### Truth Table
00000 X110X
00001 X0X0X
00010 XXX1X
00011 X011X
00100 XX01X
00101 X11XX
00110 010XX
00111 X0001
01000 XXX00
01001 0X1XX
01010 XXX1X
01011 XXX0X
01100 X111X
01101 XX111
01110 XX1XX
01111 X1XXX
10000 XX0X0
10001 X1XXX
10010 0XXXX
10011 X111X
10100 X00XX
10101 00X1X
10110 XX0XX
10111 11XXX
11000 XXX11
11001 XX0XX
11010 X1110
11011 XX110
11100 X1XXX
11101 XXX0X
11110 1XXX0
11111 X1XXX
First solution (independent outputs)
The following data shows the solution obtained with the QM method
considering independent output functions.
Just run:
bf1 < 5in5out.tab >
5in5out-local.equ
File: 5in5out-local.equ
##### Boolean Functions
Total Terms: 32
##### Function B4
Total Local Terms : 28
Total Prime Imps : 19
1st reduced Prime Imps: 0
2nd reduced Prime Imps: 1
3rd reduced Prime Imps: 0
<Essential> Prime Imps: 1
## Boolean Equation
B4=A4*A2*A1
##### Function B3
Total Local Terms : 27
Total Prime Imps : 7
1st reduced Prime Imps: 5
2nd reduced Prime Imps: 0
3rd reduced Prime Imps: 0
<Essential> Prime Imps: 5
## Boolean Equation
B3=A3
+A4*A1
+A4*/A2
+/A4*/A0
+/A4*A2*/A1
##### Function B2
Total Local Terms : 25
Total Prime Imps : 13
1st reduced Prime Imps: 4
2nd reduced Prime Imps: 0
3rd reduced Prime Imps: 0
<Essential> Prime Imps: 4
## Boolean Equation
B2=A3*A2
+/A2*A1
+/A4*/A2
+A2*/A1*A0
##### Function B1
Total Local Terms : 26
Total Prime Imps : 13
1st reduced Prime Imps: 5
2nd reduced Prime Imps: 0
3rd reduced Prime Imps: 0
<Essential> Prime Imps: 5
## Boolean Equation
B1=A1*/A0
+A4*/A3
+A4*/A2
+/A3*/A2*A1
+/A4*A2*/A1
##### Function B0
Total Local Terms : 27
Total Prime Imps : 11
1st reduced Prime Imps: 2
2nd reduced Prime Imps: 0
3rd reduced Prime Imps: 0
<Essential> Prime Imps: 2
## Boolean Equation
B0=A2*A0
+A4*A3*/A1
Next is presented a logic gate diagram implementing this solution.

Second solution (global outputs)
The following data shows the solution obtained with the QM method
considering all output functions simultaneously.
Just change the line "Equations=1"
to "Equations=4" in the input
file and then run:
bf2 < 5in5out.tab >
5in5out-global3level.equ
File: 5in5out-global3level.equ
##### Boolean Functions
Total Terms : 32
Total Prime Imps : 103
1st reduced Prime Imps: 0
2nd reduced Prime Imps: 8
3rd reduced Prime Imps: 4
<Redundant> Prime Imps: 0
<Essential> Prime Imps: 12
## Boolean Equations
TERM_1=A4*A1
1 Term Common Expression
PRIME_1=/A4*A2*/A1
PRIME_2=A3*A2
PRIME_3=/A3*A2*/A1*A0
PRIME_4=/A3*A1*A0
+A4*A3*/A1
PRIME_5=TERM_1
+A1*/A0
+A4*/A2
PRIME_6=/A3*/A2*A1
6 Prime Imps Common Expressions
B4=PRIME_1
+PRIME_2
+PRIME_4
B3=PRIME_1
+PRIME_2
+PRIME_5
+/A2*/A0
B2=PRIME_2
+PRIME_3
+/A4*/A2
+TERM_1*/A2
B1=PRIME_1
+PRIME_3
+PRIME_5
+PRIME_6
B0=PRIME_1
+PRIME_3
+PRIME_4
+PRIME_6
Next you can see a logic gate diagram implementing this solution.

Although this solution also minimizes the logic gate count, it
introduces more signal propagation delays, which may be undesirable.
It
is also possible the perform QM global simplification and produce two
level only logic solutions, which is shown in the following output
data. In this approach, the logic gate count tends to be smaller (less
AND gates) than in the independent QM local approach.
Just change the line "Equations=1"
to "Equations=2" in the
original input file and then run:
bf2 < 5in5out.tab >
5in5out-global2level.equ
File: 5in5out-global2level.equ
##### Boolean Functions
Total Terms : 32
Total Prime Imps : 103
1st reduced Prime Imps: 0
2nd reduced Prime Imps: 8
3rd reduced Prime Imps: 4
<Redundant> Prime Imps: 0
<Essential> Prime Imps: 12
## Boolean Equations
PRIME_1=/A4*A2*/A1
PRIME_2=A3*A2
PRIME_3=/A3*A2*/A1*A0
PRIME_4=/A3*A1*A0
PRIME_5=A4*A3*/A1
PRIME_6=A4*A1
PRIME_7=A1*/A0
PRIME_8=A4*/A2
PRIME_9=/A3*/A2*A1
9 Prime Imps Common Expressions
B4=PRIME_1
+PRIME_2
+PRIME_4
+PRIME_5
B3=PRIME_1
+PRIME_2
+PRIME_6
+PRIME_7
+PRIME_8
+/A2*/A0
B2=PRIME_2
+PRIME_3
+/A4*/A2
+A4*/A2*A1
B1=PRIME_1
+PRIME_3
+PRIME_6
+PRIME_7
+PRIME_8
+PRIME_9
B0=PRIME_1
+PRIME_3
+PRIME_4
+PRIME_5
+PRIME_9
Last modification: 13 Oct 2005.
Main page