Monday, June 27, 2011

Relating Truth Table, Boolean Expression, and Logic Circuit

Many students have difficulties relating the 3 of them together. Basically, they are interrelated. The truth table, as the name suggests, describes the input conditions under which the output is true, i.e. output = 1. From the truth table, a boolean expression can be written for the output in terms of the input variables. For every line (or row) in the truth table where the output = 1, a product term can be written from the input conditions. The final expression is then a sum of the product terms. Having the boolean expression, we can then draw the logic circuit associated with the output.

Take for example, the XOR gate. The truth table for the XOR function is defined as:


Hence, from the truth table, there are 2 lines (or rows) where output = 1:

when (A=0 and B=1) or when (A=1 and B=0).

Hence, we can write the boolean expression for the output as

Output = (A' . B) + (A . B')

where A' denotes A_bar, or A complement/inverted, and B' denotes B_bar. This form of expression is called Sum-Of-Product (SOP) expression.

The logic circuit for the XOR function is:



Notice we have defined a special symbol for the XOR function.

Given one of the three, you be able to derive the other two. Remember, they are interrelated:

  1. Truth Table
  2. Boolean Expression
  3. Logic Circuit

An interesting website: Logic Gate Flash Animation


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.