Making a Logic Circuit: Learn How to Build an OR Gate

In summary: AND gates are used to combine two input signals into one output signal. In this example, you can see that if you give one input a HIGH voltage and the other input a LOW voltage, the output will be HIGH since both inputs have to be HIGH for the output to be HIGH.
  • #1
Xyius
508
4
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?

Thanks!
 
Engineering news on Phys.org
  • #2
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:

http://en.wikipedia.org/wiki/Diode_logic

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.
Bobbywhy
 
  • #3
Xyius said:
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?

Thanks!

dior.gif

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

diand.gif

If both of the inputs are high, the output will be high.
 
  • #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 I am still new at this! :] )
 
  • #5
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.
 
  • #6
Oh I see! I just made both of them and it all makes sense now. Thanks! :D!
 
  • #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?
 
  • #8
Xyius said:
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?

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 ;)

attachment.php?attachmentid=46976&stc=1&d=1336183188.jpg


its sort of 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 ?

Dave

cheers
Dave
 

Attachments

  • diand.JPG
    diand.JPG
    5 KB · Views: 482
Last edited:
  • #9
I knew you would ask that.

That was a simple example to show the principle.

You could do this:
and2.gif


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.
 
  • #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 I am just doing experiments for educational purposes. :]
 
  • #11
Xyius said:
So basically I am just doing experiments for educational purposes. :]
This makes me happy.
 

1. How does an OR gate work?

An OR gate is a basic logic gate that takes in two or more inputs and produces an output based on the logical operation of addition. If any of the inputs are high (1), the output will be high (1). If all of the inputs are low (0), the output will be low (0).

2. What components are needed to build an OR gate?

To build an OR gate, you will need a power source (such as a battery), resistors, transistors, and wires. You may also need a breadboard or other circuit board to assemble the components.

3. Can I use different values for the resistors in an OR gate?

Yes, you can use different values for the resistors in an OR gate, as long as they are all the same value. This will ensure that the inputs are weighted equally in the logical operation.

4. How do I test if my OR gate is working correctly?

To test if your OR gate is working correctly, you can use a multimeter to measure the voltage at the output. If the output voltage is high (close to the power source voltage), then the OR gate is working as expected.

5. Are there any practical applications for OR gates?

Yes, OR gates are commonly used in digital electronics to create logical operations and control the flow of data. They are also used in various electronic devices such as computers, calculators, and appliances.

Similar threads

  • Electrical Engineering
Replies
1
Views
899
  • Electrical Engineering
Replies
10
Views
1K
Replies
16
Views
4K
Replies
0
Views
44
Replies
55
Views
3K
Replies
10
Views
3K
  • Electrical Engineering
Replies
29
Views
3K
  • Electrical Engineering
Replies
17
Views
1K
  • Electrical Engineering
Replies
5
Views
5K
  • Electrical Engineering
Replies
12
Views
1K
Back
Top