# Using the Truth Table to Create a Digital Model in Multisim

Updated Dec 10, 2019

• Multisim

## Issue Details

I want to simulate a digital part that is not available in the Multisim database. Is there a way for me to create the model using the truth table from the datasheet?

## Solution

In the Multisim database, there are three Arbitrary Logic Block components 4X4 (4 input/output pins), 8x8 and 16X16 located in the Misc Digital group under the TIL family. You can use these parts to define the truth table from the datasheet. In the following example, the 4X4 component will be used to model an AND gate with two inputs and one output pin.

Place the Arbitrary Logic Block 4X4 component on the Multisim workspace, double-click the part then Edit Component Model. The syntax you should know to create model is defined below, if you like to know more about the remaining syntax, please refer to the Multisim Help.
• Each new line must begin with a "+"
• You can represent a logic high as "H" or "1", "L" and "0" is low, "X" represent "don't care"
• The "+/ table 4" command defines the number of rows in your logic table, in this case, there are four rows.
• Add comments to your model by inserting a semicolon ';'
To model an AND gate, you need two inputs and one output pin. You must define the logic for the unused pins in the table but when you wire this part, leave those extra pins unwired.

The AND gate output is high only when both inputs are high, all the other input conditions result in a low output. You can define this model using only two conditions, the model is shown below, the bold text indicates the lines that were modified, everything else came from the default model.

+( behaviour= "
+/inputs  I1 I2 I3 I4
+/outputs O1 O2 O3 O4
+/table 2 ;must correspond to the number of rows in the table
+; inputs     ;outputs
+  1 1 X X    1 0 0 0
+  X X X X    1 1 1 1

+" )