## 3: Logic Circuits, Boolean Algebra, and Truth Tables

TOPIC 1: Logic Representation

There are three common ways in which to represent logic.

1.  Truth Tables

2. Logic Circuit Diagram

3. Boolean Expression

We will discuss each herein and demonstrate ways to convert between them.

TOPIC 2: Truth Tables

A truth table is a chart of 1s and 0s arranged to indicate the results (or outputs) of all possible inputs.  The list of all possible inputs are arranged in columns on the left and the resulting outputs are listed in columns on the right.  There are 2 to the power n possible states (or combination of inputs).  For example with three inputs there are 2^3=8 possible combination of inputs.  (Audio) TOPIC 3: Logic Diagram

A logic diagram uses the pictoral description of logic gates in combination to represent a logic expression.  An example below shows a logic diagram with three inputs (A, B, and C) and one output (Y).  The interpretation of this will become clear in the following sections. TOPIC 4: Boolean Expression

Boolean Algebra can be used to write a logic expression in equation form.  There are a few symbols that you’ll recognize but need to redefine. Note: Sometimes when the ! is used to represent the NOT it is used before the letter and sometimes it is used after the letter.  Care should be used so that you understand which method is being used!

Below is an example boolean expression.  In fact, it represents the same logic as the example logic circuit diagram above.  This concept will also become clearer when we cover converting from and to the boolean expression below. TOPIC 5: Converting from a Logic Circuit Diagram to a Truth Table

This conversion is accomplished by selecting each state (or combination of inputs) one at a time, replacing the inputs with their respective values and figuring the value of each point through the circuit until the output is reached.   The final output value for each state is then listed in the truth table next to the value of each input.  Below is a logic circuit diagram with the input values.  Study it carefully for an extended period of time, it is an animated image and the inputs and output will change every few seconds.  (Click the image if it isn’t changing) Below are the results of the conversion in truth table form. TOPIC 6: Converting Logic Circuit Diagrams to Boolean Expressions

To convert from a logic circuit diagram to a boolean expression we start by listing our inputs at the correct place and process the inputs through the gates, one gate at a time, writing the result at each gate’s output.  The following is the resulting boolean expression of each of the gates. And here is an example of the process being carried out.  The fact that the result simplifies to the XOR is merely coincidental. (Audio)  TOPIC 7: Converting Truth Tables to Boolean Expressions

There are two methods for converting truth tables to boolean expressions.

The Sum of Products (Audio) TOPIC 8: Converting Boolean Expressions to Logic Diagrams

Converting boolean expressions to logic diagrams is the most challenging conversion on this page because it requires a very good understanding of order of operation.  Below is the order of operations used in this conversion. (Audio) In order to complete this conversion we will progress through the order of operations.  We will first look for bracketed quantities or something in parentheses.  Inside any parentheses we will look for more parentheses and then NOTs, then ANDs, then ORs.  It’s best to begin with an example.

Audio Audio Audio Audio Audio TOPIC 9: Converting a Truth Table to a Logic Diagram

The easiest way to accomplish this is to first convert the truth table to a boolean expression and then to a logic diagram.

1.  A logic system has 5 inputs.  How many possible states exist in this system?

2.  What symbol is used to represent the NOT gate when the line over the letter is not convenient to use?

3.  A logic system has 3 inputs and therefore 8 possible states.  The logic diagram representation is shown below.  Complete the truth table and convert the output column to hexadecimal if the state 0 is the least significant bit and the state 7 is the most significant bit. 4.  Give the boolean expression from the above circuit diagram.

5.  A truth table has the same states as in number 3 above.  However, the output column from top to bottom reads 00110101. Give the result of the sum of products method.

6.  Give the result of the product of sums method in number 5 above.

7.  A boolean expression is given Y = (A+B)C+!BA+!C(A+B)+!(AC).  Just as in 3 above, produce a truth table and convert the output column to hexadecimal.

### 18 Responses to “3: Logic Circuits, Boolean Algebra, and Truth Tables”

1. Katie Says:

In question number 3, I don’t understand what you mean by converting anything from a truth table into a hexadecimal figure. Could you give an example?

If you take the output column (Y) and rotate it clockwise 90 degrees you’ll have a binary number such that the value of Y for state seven (A=1, B=1, C=1) is the most significant bit of the binary number and state zero (A=0, B=0, C=0) will be the least significant bit. For example, if the output column from top to bottom was 00011101 then the binary number would be 00011101 and would be equivalent to 1Dh. The same is true to question 7.

2. Katie Says:

Did we learn how to convert a boolean expression into a truth table?

You will need to apply the techniques of both TOPIC 5 and 8. Use TOPIC 8 to convert to a logic diagram and then TOPIC 5 to covert from a logic diagram to a truth table. Alternatively, you may take one state at a time and plug the values in to the boolean expression, work out the math and find the value of the output.

3. gisele hussey Says:

when converting boolean expression to boolean diagram how do u know when to tie the inputs to show that they share signals?

When you convert a boolean expression to a logic circuit diagram there is the possibility that there are more than one reference to the same input. You can tell from the boolean expression if this will be the case. If an input, say input A, occurs twice in the boolean expression then there will be two references to it in the logic circuit diagram. Because these are the same input they can be drawn as connected together and named once instead of twice. In my opinion I would rather have multiple references to the same input instead of a more complicated looking drawing but this is a matter of preference. Some may prefer to see only one reference to each input. Therefore, there is really no “right” answer only the happy-medium that they should be tied together and referenced once only if it does not complicate the drawing.

4. Mahfuz Says:

If an math is (A!.B!).(C!.B!)!
Then what it’s Truth Tables & Logic circuit

Mahfuz,

Start by simplifying. First use DeMorgan’s Theorem, i.e. (C!B!)=(C+B)!. Then use X!!=X to reduce to (A!B!)(C+B). Then distribute (or multiply through) to get A!B!C + A!B!B. Because B!B will always be zero you can simplify further to A!B!C. This should simplify the procedure of developing the logic diagram and truth table. Use the methods listed above for these.

Hope this helps.

5. jabu Says:

can i please be helped how do we draw up the truth tabble from odd amounts of 1’s appear on three inputs to the logic circuit

Begin by copying down all possible states. If there are three inputs then you’ll have 2^3=8 possible states. Now the output column will be a one if there are either one input or three inputs that are on. You should find four different outputs that are a 1. Hope that helps.

6. grace Says:

please help me solve this problem!!! give the logic circuit diagram and complete true table of : a.) F=x’ y+y z’ (x y z) b.) G=a c+ b’ c+ a’ b

On part a: when you multiply the first term through you get F=x’y + xyyzz’. By definition zz’=0 and the second term in the equation will always be zero so it simplifies to F = x’y + 0 = x’y. Using the simplified equation, obtain the table and circuit using the methods on the website. When it comes to the truth table you’ll need a column for z but its value will not impact the outcome (F). However, be careful… as your teacher may prefer you not simplify this in the way I did above. For part b, it should be relatively simple to use the methods on the website to get the table and circuit as this equation does not simplify easily. You’ll end up with two NOTs, three ANDs, and two ORs.

7. rhinofluffalus Says:

how do you convert: truth table–>boolean equation–>logic circuit diagram if there is more than one output(y)?

Consider them as completely separate problems each with their own singular outputs. So you’ll have one equation for each output and one diagram for each output. However, sometimes the logic diagrams can be simplified. For example if both equations contain the term AB’C then the circuit for that term could be drawn once and the output of that AND gate could be conected to two places, one in each diagram.

8. RICHARD Says:

HOW I CAN SIMPLIFY !A!B!C+!A!BC+A!BC+A!B!C+A!BC+ABC AND MAKE A CIRCUIT DIAGRAM? CAN YOU ANSWER THIS FOR ME?

Richard,
Begin by factoring out !A!B from the first two terms to get !A!B(!C+C). Factor each of the remaining two sets of terms to arrive at similar results. You should now have three terms !A!B(!C+C) + … + … Remember that (!X+X) = 1 so the first piece simplifies to !A!B. After simplifying you’ll have !A!B + … + …, follow TOPIC 8 on my page to arrive at the diagram. Complete the NOTs(!) first then the ANDs and then the OR. You’ll end up with two NOT gates, three (two-input) AND gates, and one (three-input) OR gate.

Good Luck,

9. richard Says:

how it happens that (!x+x)=1?
in your topic 8 how about there is a nand’s, nor’s,exor’s, & exnor’s gate what is the order of operation?