What is an OR-Gate?

Thread Starter

level

Joined Mar 27, 2017
7
Hello room, I'm a student studying computer science and we are covering computer organization. One of the things we're looking
at is half adders and full adders and ALU's. I understand the function of an AND, OR and NOT gate but what I cant seem to find is
what is actually happing in the chip. I've looked up a lot of information on what is a transistor and how it works, but I can't
seem to find how they design one that acts like an OR; or an AND gate. I thought maybe what they do is hook a bunch of NP transistors
together and the net result is the effects of an OR; or AND, but this is just my guess.

Can anyone explain this to me or direct me to some good intro level videos?

Thank you very much
 

hp1729

Joined Nov 23, 2015
2,304
Hello room, I'm a student studying computer science and we are covering computer organization. One of the things we're looking
at is half adders and full adders and ALU's. I understand the function of an AND, OR and NOT gate but what I cant seem to find is
what is actually happing in the chip. I've looked up a lot of information on what is a transistor and how it works, but I can't
seem to find how they design one that acts like an OR; or an AND gate. I thought maybe what they do is hook a bunch of NP transistors
together and the net result is the effects of an OR; or AND, but this is just my guess.

Can anyone explain this to me or direct me to some good intro level videos?

Thank you very much
Here is a start.
(edited to add ...)
CMOS gates included now.
 

Attachments

Last edited:

dl324

Joined Mar 30, 2015
18,226
Welcome to AAC!

For simplicity, I'll describe how an unbuffered 2 input NOR gate, shown below, works. The schematic is from a TI document, bulk connections aren't shown.
upload_2017-3-27_8-21-6.png
When either input is logic HIGH, the output will be low. A or B being HIGH will turn on the right or left, respectively, NMOS transistor. When both A and B are LOW, both PMOS transistors will be on and the output will be HIGH.

To make an OR, the output of the NOR is inverted.

This is for unbuffered CMOS. Buffered CMOS will add inverters to the inputs and outputs to make circuit operation independent of loading. A typical way to implement the logic is to use De Morgan's Law.

\( \small \overline{A+B}=\overline{A}\overline{B}\)

Which means to convert an unbuffered NOR to buffered, you implement it as a NAND.

This is a schematic for an RCA CD4071B; presumably a buffered NOR OR:
upload_2017-3-27_8-50-15.png
But the circuit shows unbuffered inputs to a NOR OR gate with buffered output.

EDIT: corrected NOR to OR in two places. Obviously a typo because CD4071B is an OR gate...
 
Last edited:

Thread Starter

level

Joined Mar 27, 2017
7
Here is a start.
(edited to add ...)
CMOS gates included now.

Thank you for your reply, however what i'm looking for is what is actually happening in the chip, not necessarily the graphic
representation. What I mean is, in an NP transistor we have a two pieces of dopped silicon next to each other and taking
advantage of their electron properties we can get voltage to move across them. I'm very new to all this so I don't understand
why transistors and resistors are so vital or really what the words mean, but I know they are and somehow they work like switches.
What I'm looking for a graphic (less the schematic and more of a literal) or a very "for dummies" explanation of what's going on in the chip?
Is it a combination of NPs that
are next to each other and when the current is applied to both ends or one end that it behaves as an OR or AND or NOT?
Please excuse my use of the word "current" and "voltage" I know they have technical meanings so if i used it wrong please correct me,
but this is what im trying to figure out.
 

MrChips

Joined Oct 2, 2009
34,630
Thank you for your reply, however what i'm looking for is what is actually happening in the chip, not necessarily the graphic
representation. What I mean is, in an NP transistor we have a two pieces of dopped silicon next to each other and taking
advantage of their electron properties we can get voltage to move across them. I'm very new to all this so I don't understand
why transistors and resistors are so vital or really what the words mean, but I know they are and somehow they work like switches.
What I'm looking for a graphic (less the schematic and more of a literal) or a very "for dummies" explanation of what's going on in the chip?
Is it a combination of NPs that
are next to each other and when the current is applied to both ends or one end that it behaves as an OR or AND or NOT?
Please excuse my use of the word "current" and "voltage" I know they have technical meanings so if i used it wrong please correct me,
but this is what im trying to figure out.
Really, you are at the knowledge level of electronics that you still have a long way to go.
Best to start with the AAC tutorials on how a transistor works.
 

bertus

Joined Apr 5, 2008
22,887
Hello,

You can download the textbooks.
I made a post where you can find the links:
Downloadable version of the textbook and more

If you want videos, here are some pages with videos on digital circuits and design:
http://www.learnerstv.com/Free-Engineering-Video-lectures-ltv145-Page1.htm
http://www.learnerstv.com/Free-Engineering-Video-lectures-ltv072-Page1.htm

These are coming from the engeneering page of the learnerstv:
http://www.learnerstv.com/Free-Engineering-video-lecture-courses.htm

Bertus
 

#12

Joined Nov 30, 2010
18,224
I've looked up a lot of information on what is a transistor and how it works, but I can't
seem to find how they design one that acts like an OR; or an AND gate.
They don't. A gate is a circuit which usually contains more than one transistor, and I only said, "usually" because I don't know everything there is to know about gates. Probably all gates have more than one transistor.

Most of us think on a level where post #3 IS how it works and there's no way to make it simpler. That's because we studied the internals a long time ago and the language of schematics is as natural as speaking words. I think I spotted the difficulty because you asked how ONE transistor is a gate. It isn't. A gate is a circuit.
 

MrChips

Joined Oct 2, 2009
34,630
They don't. A gate is a circuit which usually contains more than one transistor, and I only said, "usually" because I don't know everything there is to know about gates. Probably all gates have more than one transistor.

Most of us think on a level where post #3 IS how it works and there's no way to make it simpler. That's because we studied the internals a long time ago and the language of schematics is as natural as speaking words. I think I spotted the difficulty because you asked how ONE transistor is a gate. It isn't. A gate is a circuit.
The basic AND gate consists of two diodes and a resistor.
You can add a transistor simply for buffering. Then you have inadvertently created a NAND gate.
Once you have a NAND gate, all other functions can be created using deMorgan's theorems.
 

Thread Starter

level

Joined Mar 27, 2017
7
They don't. A gate is a circuit which usually contains more than one transistor, and I only said, "usually" because I don't know everything there is to know about gates. Probably all gates have more than one transistor.

Most of us think on a level where post #3 IS how it works and there's no way to make it simpler. That's because we studied the internals a long time ago and the language of schematics is as natural as speaking words. I think I spotted the difficulty because you asked how ONE transistor is a gate. It isn't. A gate is a circuit.
Thank you, this helps immensely, yes I have been visualizing the gate as a single transistor and not as a circuit!
 

Thread Starter

level

Joined Mar 27, 2017
7
The basic AND gate consists of two diodes and a resistor.
You can add a transistor simply for buffering. Then you have inadvertently created a NAND gate.
Once you have a NAND gate, all other functions can be created using deMorgan's theorems.
Thank you this, is starting to clear things up, what is buffering?
 

#12

Joined Nov 30, 2010
18,224
The basic AND gate consists of two diodes and a resistor.
That's how you do the basics, but look at a commercial AND gate and you will find 5 or 6 transistors inside it.
That casts some doubt on the idea that you can actually buy an AND gate that consists of 2 diodes and a resistor.
You can "roll your own" but that's not what's inside an IC.
what is buffering?
A buffer is a stage which increases the current available. Look at the internals of the datasheet I posted and see how the guts work.
 

Attachments

#12

Joined Nov 30, 2010
18,224
Look at the internals of the datasheet I posted and see how the guts work.
Yes, I know it's a leap. A beginner can spend an hour figuring what each transistor is doing. Some provide more current availability. Some ensure good saturation of the internal switch. Some enable faster switching. Some help the input ignore noise instead of interpreting it as a valid command to change the state of the internal switch. In one of those drawings, there is a pair of transistors on the output side to enable the gate to either supply current or drain current to ground.

Two diodes and a resistor only go so far. If they could do everything anybody could want, this IC wouldn't exist.
 

MrChips

Joined Oct 2, 2009
34,630
A buffer is like a cushion or shield, to protect you from the kickback from the load.
A buffer separates the input from the output.
A buffer protects the input from the recoil of a heavy load, like a shock absorber.
 

dl324

Joined Mar 30, 2015
18,226
You aren't going to learn about what you're asking in a CS program.
What I mean is, in an NP transistor we have a two pieces of dopped silicon next to each other and taking
advantage of their electron properties we can get voltage to move across them. I'm very new to all this so I don't understand
why transistors and resistors are so vital or really what the words mean, but I know they are and somehow they work like switches.
You need to clearer about what technology you're referring to. Resistors implies RTL because most technologies avoid them as much as possible because they take a lot of real estate. When you say transistors, do you mean BJTs or MOSFETs? It makes a difference.

In an IC, there aren't separate pieces of doped silicon next to each other. A process starts with an N or P type silicon wafer and regions of the opposite polarity are implanted or deposited. Many die are fabricated on the same silicon wafer and separated after test for packaging.
What I'm looking for a graphic (less the schematic and more of a literal) or a very "for dummies" explanation of what's going on in the chip?
A cross section of more than an inverter is pretty much impossible. The way these devices are drawn, the N devices are grouped together and the P devices are grouped together (for CMOS). It's done that way to minimize the number of P regions that need to be separated from N regions.
 
Top