Is it Possible 4 input XOR gate ? why ?

WBahn

Joined Mar 31, 2012
32,893
no. they are defined by not and either or or and. not both.
Again, back up this claim. What is your reference for this?

Hint, you need to show that George Boole, who invented what later became known as Boolean algebra, defined it the way you claim in his 1847 book The Mathematical Analysis of Logic. It is my assertion that he defined a two-state algebra using three operators, namely negation, conjunction, and disjunction and that conjunction and disjunction were defined based on their independent behavior. YOU need to show that he defined one in terms of the other.

and, although you are right on both fronts, manufacturing, and pure logic, are distinct. so are we talking die real-estate, or logic philosophy.
I have yet to figure out what on earth you are trying to talk about.

user-defined means: at any point in pure logic one goes past the most basic definition of a 2-i/p, 1-o/p gate, one is defining that logic himself.
That's rubbish. According to you, everyone is free to define a multi-input AND gate to have any functional behavior they want. The same for a 2-input XOR gate, for that matter.
 

peter taylor

Joined Apr 1, 2013
106
Yes.
600px-Full_Adder_Blocks.svg.png
A half adder is also a 2-input XOR gate.
A and B are two binary one-bit numbers.
S is the sum.
C is the carry when A plus B is greater than 1.
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Because the XOR gate is one level of complexity beyond a nand gate, it can now be user-defined as a half adder, an XOR gate, or a Flange.

And Yes, he is wrong.


 

analogdude

Joined Jul 14, 2015
14
Again, back up this claim. What is your reference for this?

Hint, you need to show that George Boole, who invented what later became known as Boolean algebra, defined it the way you claim in his 1847 book The Mathematical Analysis of Logic. It is my assertion that he defined a two-state algebra using three operators, namely negation, conjunction, and disjunction and that conjunction and disjunction were defined based on their independent behavior. YOU need to show that he defined one in terms of the other.



I have yet to figure out what on earth you are trying to talk about.



That's rubbish. According to you, everyone is free to define a multi-input AND gate to have any functional behavior they want. The same for a 2-input XOR gate, for that matter.

Yes.
View attachment 91810
A half adder is also a 2-input XOR gate.
A and B are two binary one-bit numbers.
S is the sum.
C is the carry when A plus B is greater than 1.
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Because the XOR gate is one level of complexity beyond a nand gate, it can now be user-defined as a half adder, an XOR gate, or a Flange.

And Yes, he is wrong.

I don't know if Boole formally used the expressions 'or' and 'and', but if he did, his use does not follow the natural use of either word.
But, their use has been adopted to describe logical functions, but that too depends upon circumstance. If I search for dogs OR cats, I will get both.
If I can choose one prize OR another, I get one.

A 2 input XOR is a parity generator, but having only 2 inputs, there is not the opportunity to provide an output for anything other than when one input is high. When there are more than 2 inputs, there is that opportunity, so becomes a 'parity genreator' or if you are NXP or TI,
a 3 input XOR gate.
 

WBahn

Joined Mar 31, 2012
32,893
How can a half-adder, which has TWO outputs, also be a 2-input XOR gate?

A half-adder uses two 2-input gates -- the Sum output is the XOR of the two inputs while the Carry output is the AND of the two inputs.

Of course, according to you, we can't say that the Sum output is the XOR of the two inputs because, according to you, everyone gets to define their own meaning for XOR.

So now you are declaring that George Boole -- the person who invented and defined Boolean algebra -- was wrong?

A bit delusional, aren't we?
 

WBahn

Joined Mar 31, 2012
32,893
I don't know if Boole formally used the expressions 'or' and 'and', but if he did, his use does not follow the natural use of either word.
But, their use has been adopted to describe logical functions, but that too depends upon circumstance. If I search for dogs OR cats, I will get both.
If I can choose one prize OR another, I get one.

A 2 input XOR is a parity generator, but having only 2 inputs, there is not the opportunity to provide an output for anything other than when one input is high. When there are more than 2 inputs, there is that opportunity, so becomes a 'parity genreator' or if you are NXP or TI,
a 3 input XOR gate.
Boole used the formal logic predicates negation, conjunction, and disjunction.

In everyday usage human beings infer from context whether the word "or" is to be used inclusively or exclusively. Human beings are very good (but not perfect) at making such contextual inferences. But that is not adequate for an algebra, which must have firm and context-free definitions. It was only later that conjunction was mapped to the concept of "and" and disjunction to the concept of "or" and the distinction between inclusive and exclusive OR was made explicit with the adoption of the convention that "or" would be taken to mean "inclusive-OR".

While it is very true that a 2-input XOR acts as a 2-input odd parity generator, that does NOT mean than a multi-input XOR gate MUST be an odd-parity generator. It is equally true that a 2-input acts as a logic circuit that is true when exactly one of its inputs is true. But even though this is a closer description to the connotation implied by the name exclusive-OR, that does NOT mean that a multi-input XOR gate MUST be true when exactly one of its inputs is true. There are other ways to describe the functionality of a 2-input XOR gate, but NONE of them say ANYTHING about how a multi-input XOR gate must behave. The reason is simple -- I can have numerous multi-input logic functions that are very, very different from each other and yet, when reduced to two inputs, all behave exactly the same. Thus, how a N-input circuit behaves does not dictate how an N+1 version of that circuit behaves. It is the FUNCTION that must be defined. In the case of the XOR function, there are several reasonable definitions that COULD have been adopted. To the best of my knowledge, no formal definition has ever been adopted by a relevant standards body. But decades past the digital logic community informally reached a consensus that a multi-input XOR would behave just like a cascade of 2-input XOR gates since that is the natural interpretation of a sequence of signals in an XOR chain using the shortcut XOR operation symbol. As it turns out, this also happens to behave as an odd-parity detector.
 

peter taylor

Joined Apr 1, 2013
106
Good

But before I come into the discussion about three-input logic gates, I need to define a two-input logic gate, or even a single-input logic gate.

It is fundamentally important to understand the difference between a two-input gate that outputs a zero for half of the possible four input combinations, such as an XOR, and one that outputs a zero only for one combination of four possible input states, such as a NAND gate (making it truly fundamental).

And I say that what George Boole says in his book is incorrect because an AND and an OR gate are indistinguishable because they each have one unique outcome given many combinations of input, making them the same in that sense.

Following this logic (?), because an XOR gate is not fundamental in that sense, then it makes no sense to upscale an XOR to three inputs, because that makes no sense.
 

WBahn

Joined Mar 31, 2012
32,893
Good

But before I come into the discussion about three-input logic gates, I need to define a two-input logic gate, or even a single-input logic gate.
So? No one is disputing the accepted definitions of any of the 1-input or 2-input logic functions.

Do you even know how many such functions there are or what their names are?

It is fundamentally important to understand the difference between a two-input gate that outputs a zero for half of the possible four input combinations, such as an XOR, and one that outputs a zero only for one combination of four possible input states, such as a NAND gate (making it truly fundamental).
This is nonsensical. What do you even mean by "truly fundamental"? There are four two-input logic functions that output a zero for only one of the four possible combinations of input states. One of them is the OR gate and another is the NAND gate. According to you, they are both therefore "truly fundamental". Yet is I give you an unlimited supply of OR gates, and nothing else, the only logic you can implement is a great big OR gate. But if I give you an unlimited supply of NAND gates, and nothing else, you can implement any Boolean logic function that can be conceived.

You are just making stuff up out of whole cloth.

And I say that what George Boole says in his book is incorrect because an AND and an OR gate are indistinguishable because they each have one unique outcome given many combinations of input, making them the same in that sense.
Using up more of that whole cloth.

Following this logic (?), because an XOR gate is not fundamental in that sense, then it makes no sense to upscale an XOR to three inputs, because that makes no sense.
A good use of the ? mark since very little makes sense following any of your logic.

For instance, by your reasoning it makes no sense to upscale an AND gate since it is not "fundamental" (outputs a zero for exactly one of the four possible input combinations).
 

peter taylor

Joined Apr 1, 2013
106
"As far as fundamental logic goes, you could say that there is a two terminal NOT gate, and a three terminal AND gate, and that all other logic is made from these".

A NOT gate has one unique output from many (one) inputs.

An AND gate has one unique output from many inputs.

As I had stated earlier, all other logic is made from these.
 

WBahn

Joined Mar 31, 2012
32,893
"As far as fundamental logic goes, you could say that there is a two terminal NOT gate, and a three terminal AND gate, and that all other logic is made from these".
You can say that as many times as you like, that doesn't make it true.

You can just as easily say that there is a two-terminal NOT gate and a three-terminal OR gate, and that all other logic is made from these.

A NOT gate has one unique output from many (one) inputs.

An AND gate has one unique output from many inputs.
So?

An OR gate has one unique output from many inputs.

As I had stated earlier, all other logic is made from these.
All other logic CAN be made from these. There is a HUGE difference between IS and CAN -- a difference which you seem incapable of grasping.

You can just as easily say that and OR gate has one unique output from many inputs and, thus, all logic is made from NOT and OR.
 

Glenn Holland

Joined Dec 26, 2014
703
Maybe this should have been posted in the jokes section, but here it is anyway.

On the subject of XOR (assures that two input variables can NOT be present at the same time), does anyone know how to arrange a situation where my mother in law can't come over for a visit when I'm at home on the weekend? :)
 

peter taylor

Joined Apr 1, 2013
106
A = If it is the weekend and you are at home THEN your mother-in-law will visit
B = If it is the weekend and you are not at home THEN your mother-in-law will visit
C = If it is the weekend and you are at home and your mother-in-law doesn't visit THEN stay at home
:)
 

dannyf

Joined Sep 13, 2015
2,197
Elegance, XOR
That's because NAND gates are universal - the other universal gate is NOR: both of them can be used to perform AND, OR and NOT operations, exclusively.

Now, try to do the inverse - try to get your XOR gates to do that, :)
 

peter taylor

Joined Apr 1, 2013
106
One can choose AND or OR as fundamental. But ultimately, how one chooses to define how four combinations of two consecutive digits of a binary number coerce to one unique outcome is irrelevant.

The fact is, OR and AND equally serve the purpose. I personally don't care which one is used.

I can use ONE, or the OTHER, but not both (hmmm XOR).
 

analogdude

Joined Jul 14, 2015
14
Boole used the formal logic predicates negation, conjunction, and disjunction.

In every To the best of my knowledge, no formal definition has ever been adopted by a relevant standards body. But decades past the digital logic community informally reached a consensus that a multi-input XOR would behave just like a cascade of 2-input XOR gates since that is the natural interpretation of a sequence of signals in an XOR chain using the shortcut XOR operation symbol. As it turns out, this also happens to behave as an odd-parity detector.
Of course, to avoid ambiguity, use the formal logic notation which has been defined and commonly accepted.
When cascaded, XOR gates behave as an odd-parity generator. There may not be any formal definition for n-input XOR, but there is an IEEE symbol for the 2-input XOR, suggesting when expanded, its behaviour would be that of a 'one hot' detector; an output that is true, when one and only one input is true. That symbol is in common use, so I don't think I can agree the 'the community' has accepted otherwise. Perhaps, Cadence, for example, have defined their cells that way, and that is the basis of the common acceptance?
 

analogdude

Joined Jul 14, 2015
14
Maybe this should have been posted in the jokes section, but here it is anyway.

On the subject of XOR (assures that two input variables can NOT be present at the same time), does anyone know how to arrange a situation where my mother in law can't come over for a visit when I'm at home on the weekend? :)
When it's the weekend, go to your mother in law's house, and stay there.
That will prevent her from visiting you when you are at home.
 
Top