Lab questions

Discussion in 'Homework Help' started by Hunter Neumann, Oct 20, 2015.

  1. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    I have no clue how to implement an adder using two xor gates and a minimal number of 2 input Nand and Nor Gates. All we have learned about adders is that it has 3 inputs and produces 2 outputs (carry out and sum). I get that and how to make the truth table for it but idk what my professor is trying to get me to do. If anyone can explain that would be great.
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    Well, the first thing is to make the truth table for each of the outputs. Until you do that and show us the results, we can't go much further.
     
  3. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    Good.

    So now focus on the 'sum' output. See if you can figure out how to implement that using two XOR gates.
     
    Hunter Neumann likes this.
  5. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    I am not sure how to with two, I got the sum right by using one xor gate
     
    Last edited: Oct 20, 2015
  6. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    Is this right? could I simplify it further by taking out one of the nand gates and one of the nor?
     
    Last edited: Oct 20, 2015
  7. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    Do you REALLY need 1.5 MB files?

    The description implies two 2-input XOR gates. If 3-input XOR gates are fair game, then what you did is fine as far as it goes, but by using two 2-input XOR gates you can reduce the number of 2-input NAND/NOR gates you need for the carry output.
     
    Hunter Neumann likes this.
  8. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    Does this look right using two input gates? could I simplify them any further?
    Screen Shot 2015-10-20 at 8.29.13 PM.png
     
  9. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    Yes.

    The 2 NOR gates are equivalent to an OR gate. Look up the equivalent of an OR gate using NAND gates. Redraw the circuit, and several simplifications will be apparent.
     
  10. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    what would be the most simplified way to do it using nor and nand gates? would I use them both? I'm not sure if my professor wants me to use both or just one. Im not good at simplifying them. Thats the only issue I have had in this class.
     
  11. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    In this case, have you done what I suggested? It should be quite obvious how to simplify from the schematic that results.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    The instructions indicate that you can use a combination of both of them if you want, but the goal is to minimize the total number of them.

    HINT: It can be done using three of these gates in addition to the two XOR gates.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    Keep in mind that the constraints of the problem allow him to use two XOR gates plus any number of addition 2-input NAND or NOR gates (with the goal to minimize that number).
     
  14. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    Screen Shot 2015-10-20 at 9.40.49 PM.png
    Is this right? I really just used trial and error. I don't know how you guys can figure that stuff out so quickly
     
  15. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    It's what I had in mind.
     
  16. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    WBahn - I had that in mind.
     
  17. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    Oh -- I thought you were thinking along the lines of reducing the NAND followed by the NAND with tied inputs down to an AND. But I see what you are focusing on -- the rightmost four gates and reducing that to a NAND.
     
  18. WBahn

    Moderator

    Mar 31, 2012
    17,775
    4,804
    Yes.

    With experience and practice you learn how to spot things. One very useful technique is known as "bubble logic" where you basically apply DeMorgan's theorem graphically to the logic symbols by adding/moving inversion bubbles around and swapping OR with AND (or vice-versa) while adding bubbles to all inputs/outputs. If you do that to the left NOR gate, it becomes and AND gate with bubbles at the two inputs and no bubble at the output (the new bubble cancels the bubble that was already there). The final NOR gate is just an inverter and so it becomes a bubble at the output of the NOR gate. The bubbles at the inputs cancel the two NAND gates that are to the left of them, since each of those is just an invertor. You thereby replace the four right-most gates with a single NAND gate.

    EDIT: Fix typo: simples -> symbols
     
    Last edited: Oct 21, 2015
    Hunter Neumann likes this.
  19. Hunter Neumann

    Thread Starter Member

    Aug 24, 2015
    53
    3
    Thanks for the tip, I will learn bubble logic.
     
Loading...