News & Updates

Version 2.24.02.27 released.

29 February 2024

Download new release with more speed, new Python and better look.

Version 2.23.04.28 released.

28 April 2023

Download new release with more speed.

Version 2.23.02.02 released.

3 February 2023

Download new release with more speed and less bugs.

Version 2.22.07.22 released.

23 July 2022

Download new release with new features and Croatian language support.

Version 2.22.03.30 released.

30 March 2022

Download new release.

Version 2.22.01.03 released.

5 January 2022

Download new release with button keyboard shortcuts.

Version 2.21.01.10 released.

14 January 2021

Download new release with fixes in Swedish translation and new Python.

Version 2.20.06.25 released.

25 June 2020

Download new release with new features, bug fixes and Swedish translation.

Version 2.20.01.15 released.

15 January 2020

Download new release with bug fixes.

Truth Table

You can build truth table of your sub circuit if it has input and output pins and does not contain any states holding elements like flip-flops and RAM. In other words you circuit is a pure function.

For more details on pure functions see: http://en.wikipedia.org/wiki/Pure_function

For more details on truth table see: http://en.wikipedia.org/wiki/Truth_table

To build truth table click menu Circuit/Truth Table.

Truth table of simple AND circuit

In the popped up dialog you'll see a table which columns are named like input and output pins.

All the rows of the table are all the permutations of input and result of the outputs.

Here is another example of truth table of full adder.

Truth table of full adder

So as you can imagine number of rows should be equal to two in power of sum of number of bits on all inputs. For example if you circuit like the one above has 3 input pins of one bit each then 2 ^ 3 = 8 the truth table will be 8 rows long. Therefore it is fairly easy to build very big truth table by just increasing bit width of input pins. The dialog however will not show more than 4096 rows because it is unmanageable number of rows. But you can use filter to ensure correctness of you circuit.

Filter is just an expression that applied to each row in the truth table to determine if the row needs to be included in the resulting truth table. In these expressions you can use names of input and output pins and check if their values are satisfy some conditions. For example for the first truth table which is just AND gate the filter expression can be: q = x & y. Please note the invert check box right next to Filter text box in the top of the dialog. If this box is checked then the result of the expression is inverted and hence the above expression been inverted will result in empty table. This is indicating correct behavior of the circuit. If you uncheck it then all the rows will be visible in the table. Please note that there is two numbers in the bottom of the dialog showing total number of rows in the truth table and number displayed in the dialog.

Expression syntax

You should know a few things about the syntax of the expressions.

If name of the pin is starting from letter and contains only letters and digits (like: a, x21, Pin190) than you can just use the name in the expression. In all other cases you need to take it in the double quote.

For example: "q+" character + is not a letter or digit, so enclose it in quotes. "a f" there is a space between letters. "1s" - the name starts from digit.

If pin name contains double quote than you need to prepend it with back slash: "a\"" for pin a". Same with the back slash itself if it is in the name use two of them in expression: "a\\" will represent name of a\ pin.

If you need to specify a number in the expression you have 4 options:

There are two types of expressions you can use: arithmetic and logical. Arithmetic expressions evaluated on 32 bit numbers and include addition, multiplications and bit operations. Logical operation evaluated to either 0 or 1 - both are also 32 bit numbers. For example result of arithmetic operation 3 + 4 will be number 7, but result of logical operation comparison 3 < 5 will be 1.

You can use the following operations in the expressions:

PriorityOperation Meaning
1(E)Enclose expression in the parentheses
1-EUnary negation - change sign of the expression
1~EBitwise not inverts all bits in the expression
1!ELogical Not - results in 0 if expression is not equal to 0 and to 1 if it is
2E1 << E2Bitwise left shift. Shifts e1 to number of bits provide in e2
2E1 >> E2Bitwise right shift. Shifts e1 to number of bits provide in e2
3E1 & E2Bitwise AND of expressions E1 and E2
4E1 | E2Bitwise OR of expressions E1 and E2
4E1 ^ E2Bitwise EXCLUSIVE OR of expressions E1 and E2
5E1 * E2Multiplication of E1 and E2
5E1 / E2Division of E1 by E2
5E1 % E2Remainder of division E1 by E2
6E1 + E2Additions of E1 and E2
6E1 - E2Subtraction of E2 from E1
7E1 = E2You can use == also. Logical operation: equality of E1 and E2
7E1 <> E2You can use != instead of <>. Logical operation: not equality
7E1 @ E2@ one of: < <= >= > Logical operation: comparison of E1 and E2
8E1 && E2Logical AND: results in 1 if E1 is not 0 and E2 is not 0 otherwise 0
9E1 || E2Logical OR: result in 1 ifE1 is not 0 or E2 is not 0 otherwise 0

The fact that logical operations produce numbers 0 or 1 lets you use them in arithmetic expressions. For example if you have 4 inputs multiplexer and hence 2 bit selector input you can use the following expressions to validate it. Let's assume data inputs named X0, X1, X2, X3, selector is called N, and output is Q.

(N = 0) * X0 + (N = 1) * X1 + (N = 2) * X2 + (N = 3) * X3 = Q

Here each of comparison of N will produce either 0 or 1 and 0 been multiplied to input value will results in 0 so the result will be equal to selected input.

When writing expression you need to be careful to suppress extra bits not needed in other parts like comparison. For example if you checking only s output of full adder in the above image you'll need to suppress carry in the expression. So instead of:

s = inC + a + b

You will need to have

s = (inC + a + b) & 1

Finally expression result is just a number. This number is treated as logical value "true" for any number that is not equal to 0 and "false" if it is zero.