Tutorial 24 of 24
Logic designer – truth tables, Karnaugh maps and minimal circuits
Intermediate 10 min
Fill in a truth table with don't cares, read every minimal sum of products in a grouped Karnaugh map, check your own answer and turn the result into gates, Verilog and a simulation.
The Logic designer is the place for combinational logic in Ohmforge: you describe what a circuit should do in a truth table and get the smallest two-level circuit for every output. Open it with Instruments → Logic designer…. It starts with the example BCD to 7-segment, segments a–c, a decoder with four inputs, three outputs and six don't-care rows.
Fill in the truth table

- Type the input names into Inputs (up to 6, the first is the most significant bit) and the output names into Outputs (up to 8), then press Apply. Existing columns keep their values.
- Press an output cell to cycle it through 0, 1 and × (don't care). With the keyboard, the arrow keys move between cells and the keys 0, 1 and X type a value.
- Fill from expression sets a whole column from a Boolean expression such as
A'B + C; tick Keep don't cares to leave the × cells alone. - Truth table as text, equations and files shows the table in a text format you can copy, edit and paste back (
A B C | F, then rows like0 1 1 | 1; a-in the inputs covers both values). You can also open a text file or build the table from equations such asS = A ^ B ^ C. - Undo and Redo step through your edits (Ctrl+Z and Ctrl+Y outside the text fields).
Read the minimal result
Under Minimised result, choose the Output and the Minimal form: sum of products groups the 1 cells, product of sums groups the 0 cells. The line under the selectors shows the expression, for segment a of the example a = B3 + B2·B0 + B2'·B0' + B1.

The Karnaugh map uses Gray-code order, so neighbouring cells differ in one input. Each term of the result is a numbered outline; the legend lists the term and its cube (-0-0 means B2 = 0 and B0 = 0, the other inputs do not matter). Groups at an edge wrap around: the four corner cells of the map form group 3. × cells are used only when they make a group bigger. With five or six inputs you get two or four maps, one for each value of the first inputs.
Some functions have several equally small answers. Load the example Cyclic function with two minimum covers: Minimum cover then offers both solutions, found with Petrick's method, and the map, the circuit and all exports follow your choice. The prime implicant chart shows which prime covers which row and which primes are essential.
Check your own answer

Type your solution into Check your own answer and press Check. Ohmforge compares it with the table on every row that is not a don't care. If it is wrong, the table lists the rows where yours differs, with the expected and your value.
Build, simulate and export
- Add the gate circuit to the schematic places switches with pull-down resistors, NOT gates, 2-input AND and OR gates and a logic probe for the selected output, as one undoable edit.
- Open in the logic simulator hands all outputs to Instruments → Logic simulator… as a netlist with gate delays, so you can look at the timing.
- Download Verilog writes a module with one
assignper output; Download netlist, Download truth table, Download CSV and the two SVG buttons save the rest.
Every result is cross-checked: the generated netlist is simulated for every input row and compared with your table. The design is saved in the project when you close the dialog. The same calculation is available as the ohmforge-logic-minimizer tool for scripts and AI agents, which also compares two expressions for equivalence.
Ready to try it?