CAD TOOLS

ESPRESSO

This page contains three examples of the use of espresso to obtain reduced sum of product expressions. These examples correspond to Exercises 5.10, 5.11 and 5.12 of the textbook.

Espresso has many options to produce alternative forms. Here we show only the one obtained by default.

The input file gives the one-set and the zero-set of the functions. Also possible is to give one-set and dc-set or zero-set and dc-set. It is also possible to provide expressions.

The output provides the product terms, with a 1 indicating an uncomplemented variable and a zero a complemented variable. 

The program is executed by giving the command

espresso [options] inputfile > outputfile

# Example 1: Exercise 5.10
# Input 5.10
.i 5
.o 1
00000 0
00001 0
00010 0
00011 0
00100 0
00101 0
00110 0
00111 1
01000 0
01001 0
01010 0
01011 1
01100 0
01101 1
01110 1
01111 1
10000 0
10001 0
10010 0
10011 1
10100 0
10101 1
10110 1
10111 1
11000 0
11001 1
11010 1
11011 1
11100 1
11101 1
11110 1
11111 1
.e
.i 5

# Output 5.10
.o 1
.p 10
111-- 1
11-1- 1
1-11- 1
-111- 1
11--1 1
1-1-1 1
-11-1 1
1--11 1
-1-11 1
--111 1
.e

# Example 1: Exercise 5.10
# Input 5.10
.i 5
.o 1
00000 0
00001 0
00010 0
00011 0
00100 0
00101 0
00110 0
00111 1
01000 0
01001 0
01010 0
01011 1
01100 0
01101 1
01110 1
01111 1
10000 0
10001 0
10010 0
10011 1
10100 0
10101 1
10110 1
10111 1
11000 0
11001 1
11010 1
11011 1
11100 1
11101 1
11110 1
11111 1
.e
.i 5

# Output 5.10
.o 1
.p 10
111-- 1
11-1- 1
1-11- 1
-111- 1
11--1 1
1-1-1 1
-11-1 1
1--11 1
-1-11 1
--111 1
.e

#Example 3: Exercise 5.12
#Input 5.12
.i 5
.o 3
#a1a0b1b0c cs1s0
00000 000
00001 001
00010 001
00011 010
00100 010
00101 011
00110 011
00111 100
01000 001
01001 010
01010 010
01011 011
01100 011
01101 100
01110 100
01111 101
10000 010
10001 011
10010 011
10011 100
10100 100
10101 101
10110 101
10111 110
11000 011
11001 100
11010 100
11011 101
11100 101
11101 110
11110 110
11111 111
.e

# Output 5.12
#a1a0b1b0c cs1s0
.i 5
.o 3
.p 23
1-000 010
0-100 010
100-0 010
001-0 010
1000- 010
0010- 010
0-011 010
010-1 010
0101- 010
-1-00 001
-0-10 001
-0-01 001
1-111 010
111-1 010
1111- 010
-1-11 001
--111 100
1--11 100
-11-1 100
11--1 100
-111- 100
11-1- 100
1-1-- 100
.e