DIGital:

Lesson 1100: Writing Boolean Expressions Using Electronic Gates And Using Electronic Gates to Write Boolean Expressions

How to Use the Gates

Remeber that these symbols represent the Boolean operators. For example, if you wanted to draw the Electronic gate diagram for AB or A*B then you would use the AND gate symbol which is found below.

AND gate

You then write the variables used, A and B in a column and draw lines connecting them to the left side of the AND gate as seen below.

The last step is to label what the output will be called and in this case we will use f


Now that you've learned how to draw a simple gate diagram, we can move on to more complex Boolean equations. Let's draw the gate diagram for the equation ~(A*B)+(~A). Below you will find a basic description of steps that you should take as a beginner.

  1. Identify what gates you will need to use

    In this equation, ~(A*B)+(~A), the first half, ~(A*B), represents A NAND B. The second half, ~A, represents NOT A. These two halves are being OR-ed so you will need to use three gates.

  2. Identify the number of variables needed

    In the equation there are two variables, A and B.

  3. Write down Variables in a column

    Since the equation has two variables, A and B, we write it down in a column as seen below.

  4. According to the Order of Operations, draw the gates to be used first and connect them to the variables

    According to the order of operations we can do A NAND B or NOT A first. So we draw the gates and connect them to the variables A and B depending on what values they use. In A NAND B both A and B are being used so we draw lines from A and B to the left side of the NAND gate. But, NOT A only uses variable A so we draw a line from A to the NOT gate. Look at the diagram below for better understanding.

  5. Continue drawing gates by following the Order of Operationes

    The last operator in the equation is taking the output of A NAND B and NOT B and OR-ing them. First draw an OR gate. Next we draw lines from the right hand side of the NAND and NOT gate and connect them to the left side of the OR gate as seen below

  6. Draw the final output variable

    In this case the final output is f thus we draw a line from the right hand side of the OR gate and label it f as in the diagram


Now that you have learned the basic steps to draw a electronic gate diagram from the equation, lets try writing a Boolean expression from a electronic gate diagram. Given the diagram below, we will go through the process you can take to find the Boolean expression.


  1. Analyze the diagram

    From the diagram we can deduce that the equation uses two variables, A and B, and two different gates, AND and OR.

  2. Identify independent parts of equation

    This means that you should find parts of the equation that don't depend on the output of any other operation. From the diagram we know that only A AND B don't require the output of an operation.

  3. Write down independent parts

    We identified that A AND B was the only independent part of the equation so we can write it down. Recall that you don't have to write the '*' in an AND operation but simply put AB instead of A*B.

  4. Identify dependent parts of equation

    The only operation left is OR. This operation requires the output of A AND B and then is OR-ed with A. Thus we take the result of AB and OR it with A as seen below. Because of the order of operations we don't have to put in parenthesis around the AB.

    AB+A=f

    Now that you know how to draw electronic gate diagrams from equations and equations from diagrams, try these exercises.



    Check your progress


    1. Which electronic gate diagram represents A+B?



    2. Which Boolean equation represents the following gate diagram?
      A+B+C
      AB+C
      AC+B

    3. Which electronic gate diagram represents ~(AB)+A+B?



    4. Which Boolean equation represents the following gate diagram?


      ~(AB+C)
      AB+C
      ~(ABC)




    DIGital
    An Online Digital Circuitry Course
    Your Comments Welcome