# Working with Boolean Expressions in Logisim

The Logisim Combinational Analysis tool allows you to interactively design combinational logic circuits, switching between truth table, Boolean expression and Karnaugh map views, as required.

A new Combinational Analysis may be started by selecting theWindow > Combinational Analysisoption from the Logisim pull-down menu.

In cases where you know the required Boolean expression in advance, then the quickest design approach is to firstly define the required input and output variables, and then enter the Boolean expression(s) directly. This will spare you from the tedious task of manually defining each output value in the truth table.

## Syntax of Boolean Expressions

Logisim uses a special syntax to represent the available Boolean operators, as shown in the following table.

Operation | Operator(s) | Syntax Example |
---|---|---|

Brackets | ( ) | (A + B) C |

NOT | ~ | ~A + ~B |

AND | space | A B |

Exclusive OR | ^ | A ^ B |

Inclusive OR | + | A + B |

By default, Logisim evaluates Boolean operations in the order NOT, AND, XOR and OR, with brackets used as an override, when needed. The following example shows a Boolean expression incorporating each of the Boolean operators, and the resulting logic diagram.

## Case Study

A parity generator circuit is to be created to produce an even parity eighth bit, based on a 7-bit data word.

The first step is to create seven input variables** A B C D E F G**, and a single output

**. The truth table in this case has 128 lines (2**

*X*^{7}= 128), which would be very tedious to enter manually. However, it is straightforward to first enter the Boolean expression and then automatically generate the circuit, as shown below.

Notice in the above image that a total of five inputs are simultaneously enabled (*B*, *C*, *D*, *F*, and *G*), and the parity generator output is also active, giving an even number of 'ones' (6 in total). An application of this type of circuit would be adding a parity bit to a 7-bit ASCII character code, prior to serial data transmission.