Engee documentation

Combinatorial Logic

Performing logical operations using a truth table.

combinatorical logic

Description

The Combinatorial Logic block implements a standard truth table for modelling programmable logic matrices (PLA), logic circuits, decision tables and other Boolean (logic) expressions. This block can be used in conjunction with Memory blocks to implement finite automata or triggers.

The Truth table is a list of possible logical states of the block. The number of its lines is determined by the formula , where is the number of input signals u (the number of input signals m = 2 results in 4 lines). The index of each line is determined by the input signals:

It must be remembered that the input and output signals of this block are the logical constants false (0) and true (1).

Ports

Input

Port_1 - input signal
vector

Input signal specified as a vector.

Data types: Bool.

Output

Port_1 - output signal
scalar | vector

Output signal.

Data types: Bool.

Parameters

Truth table - truth table
matrix

As the value of the Truth table parameter a matrix defining all possible outputs of the block is set. Each row of the matrix contains an output for a different combination of input elements. You must specify the outputs for each combination of input elements. The number of columns is equal to the number of outputs of the block.

Usage in program code

Block parameter

TruthTable

Values

Lmatrix

By default

[0 0;0 1;0 1;1 0;0 1;1 0;1 0;1 0;1 0;1 1]