# three input xor using mosfet

Discussion in 'Homework Help' started by Christine Del Rosario, Jan 10, 2016.

1. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
Hi! i am tasked to design and create a three input xor logic gate using a mosfet transistor. by the use of LEDs as my input/output indicators, (if the LED lights up, logic value = 1; otherwise, 0). ICs are not allowed.

As i have searched through the net, an xor can be made by "anding the or with a nand" and i was also able to encounter a 2 input xor logic gate which looks like this: My problem is i dont quite get how i will be able to make a functioning circuit which compromises of a three input xor logic gate by using a mosfet.
any suggestions is welcome

File size:
144.9 KB
Views:
20
2. ### GopherT AAC Fanatic!

Nov 23, 2012
6,319
4,044
XOR is an odd logic chip. Looking at it, you end up with a question whether "exclusive" really means exclusive or not. Get a datasheet from a commercially available chip and you'll see it is more of an odd party checker than an exclusive OR chip.

Last edited: Jan 10, 2016
Christine Del Rosario likes this.
3. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
my progress so far... with a two input xor logic gate
seems I cant find where and what I've done wrong lol.

File size:
64.5 KB
Views:
21
4. ### GopherT AAC Fanatic!

Nov 23, 2012
6,319
4,044
You seem to have some gaps (shorts) between transistors that need to be finished.

Also, is there supposed to be some sort of output between Q1 and Q8. If not, what is the point of these two transistors?

5. ### chuckey Well-Known Member

Jun 4, 2007
75
10
I would define an exclusive OR as any 1 at an input gets through EXCEPT when all inputs are a 1, so I would disagree with GopherT's chart. This gives a 1 output when any one or all three inputs are a 1. And the "inverse", gives a 0 when any two inputs are a 1 or all three are 0s. Try to extend this to four inputs.
So you NAND the inputs and AND the output of the NAND with the OR of the inputs.
Frank

6. ### GopherT AAC Fanatic!

Nov 23, 2012
6,319
4,044
This topic has been hashed and re-hashed on this site. It is not a question of whether or not you agree with it, it is a question of what evolved into an industry standard. You can feel free to invent your own "Chucky-XOR" that behaves that way. No other commercially available 3 or more input XOR gate does.

7. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
The issue of what a multi-input XOR gate "should" be is very debatable. The issue of what a multi-input XOR gate "is" is pretty well-established industry convention -- it is an odd parity checker and is HI whenever an odd number of inputs are HI.

Christine Del Rosario likes this.
8. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0

update on my circuit~
found a pattern for a 3 input xor gate on this site
but Multisim keeps popping a simulation error. I dont know what to do ._.

9. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
What is the simulation error? We are not mind readers.

10. ### absf Senior Member

Dec 29, 2010
1,493
374
Look at P3 of the datasheet attached. You will immediately know where your mistakes are...

Allen

• ###### cd4077b.pdf
File size:
1.2 MB
Views:
11
Christine Del Rosario likes this.
11. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
Sorry i thought i uploaded the report txt
here~

File size:
2.2 KB
Views:
2
File size:
2.2 KB
Views:
1
12. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
Thanks! you're right. haha it seems I've complicated this circuit more than it should be.

13. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
i'm sorry it seems that im a little lost, did my placement for my vdd and vss incorrect?

im sure that I correctly placed the mosffet based on this diagram i found here:
n

14. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
You aren't going to learn nearly as much as you think you might by finding someone else's solution and copying it.

The goal of the exercise is for YOU to use the skills and knowledge YOU have attained to solve a problem. You should be able to take an arbitrary truth table and implement it directly in CMOS. What will you do next time when a customer needs a function implemented in silicon and you can't find someone else that happens to have posted a solution for that exact problem?

15. ### absf Senior Member

Dec 29, 2010
1,493
374
I merely want to point out that in the diagram in post #3, the p-mosfet are all drawn backwards. You's have to correct this mistake and make the 2-input XOR gate work first before you have any chance with the 3-input XOR.

The circuit in post#1 is a theoretical one. After adding in the input switches and the NOT_A and NOT_B stage, it won't be that simple any more...

Allen

16. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
I'm sorry, just so you know I tried doing what you've said and made my own design but unfortunately it contains many transistors and halfway I stopped working on it after spending huge time and seeing this one which contains less transistor which looks simple made me envious so I've decided to use it.

Well you could say that I just got lazy or whatever. I'm also guilty for what I've done, copying someone else's work and for that I'm terribly sorry. I'm not gonna do that again, I'm just frustated that the set deadline is just around the corner and I havent done anything that's working so i copied it. aah this is embarassing

Last edited: Jan 18, 2016
17. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
ohh so you were referring to the first circuit!
Yeah you're right. my bad haha
i'll try working on it
thanks~

18. ### Christine Del Rosario Thread Starter New Member

Jan 5, 2016
11
0
I've decided to replace my my previous 2input xor circuit by this circuit
As one can see, I've used an OR and NAND gate in input A and B and then ANDED the output. But then again,there's a simulation error that popped up namely, the numeric overflow in device model. Any thoughts how to resolve this error?

19. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
So let's see if we can get you where you are supposed to be in order to design this circuit yourself.

In a pure CMOS logic circuit, the term "Complementary MOS" is more than just a marketing name -- it is the design philosophy for implementing logic circuits. You have a certain logic function implemented using NFETs to pull the output down and the complement of that same logic implemented in PFETs to pull the output up. So you can focus on one and then take the complement to get the other.

An OR function is created by putting FETs in parallel and an AND function is created by putting them in series. So let's look at the following function

Y = AB + A'B'

This can be thought of as

Y = W + X

where W and X are two functions of A and B.

This means that I want the output to be HI when either W is true OR when X is true, which means that the realization of W and X are in parallel in the pullup portion of the circuit. It also means that, in the pulldown portion, the complements, W' and X', are in series.

Now we can focus on implementing W and X and their complements

W = AB

which means that we want to implement FETs in series, one that pulls up when A is HI and the other that pulls up when B is HI.

W = A'B'

also means that we want to implement FETs in series, but with one that pulls up with A is LO and the other that pulls up when B is LO.

Because of the inverting nature of FETs, to get a PFET to pullup when A is HI, we need to apply A' to its gate. With this in mind, we have, for the pullup section:

Now you see if you can design the pulldown section using NFETs.

absf likes this.
20. ### absf Senior Member

Dec 29, 2010
1,493
374
Yes that might work. Too bad Q11, Q12, Q15, Q16 is a NOR gate.

It is very hard to read your circuit. Can you make the connection dots larger?
Why Q10 gate is grounded?

Allen