1lytics

Creating K-Maps from Truth Table

Creating functions set from text truth table is the second general way to create functions set. To create function set and enter functions from text truth table choose “File” — “New” — “From truth table” menu item. Next dialog appears on the screen:

Input from Truth Table Dialog

In the dialog you can see: 1) main input text field; 2) Buttons to show/paste/load data; 3) property grid with creation options. Buttons are intended for:

  • Show - replace the content of data input field with one of predefined samples (select it in the dropdown field at left);
  • Paste - paste clipboard content to data input field;
  • Load - load data from the text file with “Open File” dialog.

Two Forms of Truth Table Text Representation

When you enter truth table text, you need to set the type of truth table (TT) in first line: “#TABLE” or “#SET” (All lines below started with “#” threated as comments).

The “#TABLE” text TT type represent TT as set of lines, in which inputs vector is followed by outputs vector and inputs are separated from outputs with special separator (usually “=>”). Values in inputs and outputs vectors can be separated by “,” or “ ” (space), or without any separator symbol.

The “#SET” text TT type represent TT as set of lines, in each line there is the function name and input variable names followed by the vector of function values separated form names with special separator (usually “=>”).

In text form of truth table you can use “0”, “l” or “L” to define False; “1”, “t” or “T” to define True and “-”, “z”, “Z”, “u” or “U” to define Undefined function value.

Truth Table Text Samples

Samples of text form of truth table are showed below:


#TABLE: a,b => xor,nor,nand,undefs
# Comment line, ignored
00 => 0110
01 => 1011
1,0 => 1,0,1,-
1 1 => 0,0,0,-

#SET
# Comment line, ignored
#    ab   00,01,10,11
xor: a,b => 0,1,1,0
nor: a,b => 1,0,0,0
nand: a,b => 1,1,1,0
undefs: a,b => 0,1,-