Logic and Fault Simulation1126.96.36.199Truth TablesUsing the truth table is the most straightforward way to evaluate logic elements.Assuming only binary values, ann-input combinational logic element requires a2n-entry truth table to store the output value with respect to all possible inputcombinations. (For a sequential element,ncorresponds to the number of its inputand state variables.) In practice, the truth table is stored in an array of size 2n.Toaccess the array, the values of theninput variables are packed in a word that servesas the index to access the array. For example, consider the arrayTNAND3to storethe truth table of a three-input NAND gate. Then, the output value with respect toinput pattern 010 is obtained by:TNAND3±0102²=TNAND3±2²where the subscript 2 indicates the binary number system.For a multivalued logic system withksymbols, the required array size for ann-input element is calculated as follows. Letmbe the number of bits needed to codethek
This is the end of the preview. Sign up
access the rest of the document.