Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Making a logic circuit

  1. May 4, 2012 #1
    Hello all,

    I recently started working with circuits and in my classes I learned and used some logic circuits. It was pretty cool but we never actually went over what makes up an IC of one of the logic components.

    I really want to know what goes on inside the IC, so I was wondering, how would I go about making, say an OR gate from normal circuit components? Is it possible? Can anyone shed some light into the workings of an OR gate or any other type of gate?

  2. jcsd
  3. May 4, 2012 #2


    User Avatar
    Gold Member

    Xyius, We used diode logic long before microcrocircuits were invented, and they work just fine. Google is your friend. I recommend you learn to use it when you have some question such as above. I Googled "diode logic gate" and within 0.014 seconds found this:


    Check it out, and after you study it if you would like to learn more, or see more applications, use the links near the bottom of the page. Good luck.
  4. May 4, 2012 #3


    User Avatar
    Science Advisor

    If either of the inputs is high, the output will be high.

    If both of the inputs are high, the output will be high.
  5. May 4, 2012 #4
    Thanks everyone!

    I think I can see how the OR gate works but how exactly does the AND gate circuit work? How come the light wouldn't be on all the time? (Assuming we attached an LED to OUT) It looks to me like there is a straight path from V through the resistor through OUT and to ground. (Again, excuse my ignorance im still new at this! :] )
  6. May 4, 2012 #5


    User Avatar
    Science Advisor

    Yes, that is right.

    But can you see that if either of the inputs was grounded, that the output would be low?

    So, they both have to be high for the output to be high.
  7. May 4, 2012 #6
    Oh I see! I just made both of them and it all makes sense now. Thanks! :D!
  8. May 4, 2012 #7
    I was messing around with these circuits again, is there any way I can make the AND gate take positive signals? What I mean is, right now I need to apply ground (as you said) to change the gate status. But how could I make it so that I have to give it positive signals? I know it probably isn't a big deal but how would I be able to do this?
  9. May 4, 2012 #8


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    if you tied the inputs A and B of the diodes permanently LOW to ground via say a 1k to 4k7 resistor then you could apply a positive voltage to that point then the inputs A and B would be HI and therefore the output would be HI
    Not the best way to show it but it has the desired effect ;)


    its sorta defeating the purpose of it being an AND gate ...am trying to think of another way to show it
    logic ccts are not my forte haha
    if you have been actually making up the diode gates that vk6kro showed, try using individual resistors off A and B to ground. see what happens when you apply a positive voltage to A or B ... does the output go HI ? or do you need voltage applied to A and B to make the output go HI ?



    Attached Files:

    Last edited: May 4, 2012
  10. May 4, 2012 #9


    User Avatar
    Science Advisor

    I knew you would ask that.

    That was a simple example to show the principle.

    You could do this:

    In the left diagram, you would have to have both inputs high to get current into the resistor at the bottom.

    However, the main point is why would you do something as pointless as this? Why use AND gates at all?

    Suppose you gave a friend a switch connected to one of the inputs and told him to switch it on and off continuously.
    So, he could turn a light on or off just by switching the switch.

    Secretly, though, you have a switch connected to the other input. Unless you switch your switch high, your friend cannot switch the light on and off.

    Now, suppose you could switch your switch high for exactly 1 minute. If you count your friend's total number of light pulses, you would know how many pulses per minute he is sending.

    So, one of the inputs could work as a control for the other input.

    Or, you might turn your garden sprinklers on, but they wouldn't go on if it was raining. You could do this with AND gates. You have to have two conditions apply before something will happen.
  11. May 4, 2012 #10
    Thanks a lot! I will try both these methods.

    To answer vk6kro, I simply just want to make the logic gates. I haven't really done much with using logical circuits and I didn't like using the IC's without knowing how they work.

    So basically im just doing experiments for educational purposes. :]
  12. May 4, 2012 #11


    User Avatar
    Science Advisor
    Gold Member

    This makes me happy.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook