Why Is Total Parity of Bits Important in Computing?

  • Thread starter Thread starter Callaghan
  • Start date Start date
  • Tags Tags
    Bit Bits Parity
Click For Summary

Discussion Overview

The discussion revolves around the concept of total parity of bits in computing, particularly in relation to classical logic gates and their universality. Participants explore the implications of total parity in the context of XOR gates and their limitations compared to other gates like AND, OR, NAND, and NOR.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant questions the meaning of total parity of bits and its implications in the context of classical computing, noting a distinction from parity bits.
  • Another participant explains that total parity is determined by the number of bits set to one (M), stating that if M is odd, total parity is 1, and if M is even, total parity is 0, linking this to XOR as modulo 2 addition.
  • This participant also discusses the limitations of XOR gates, asserting that they cannot generate certain gates like AND, OR, NAND, or NOR due to the parity constraints of XOR operations.
  • Several participants express confusion about how to generate a 1 using XOR, with one suggesting that inputs can be tied high or low to provide 1 or 0 directly.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding total parity and its implications. There is no consensus on how to generate a 1 using XOR, indicating ongoing confusion and differing interpretations of the topic.

Contextual Notes

Some participants highlight that the term "total parity" is not commonly used, which may contribute to misunderstandings. The discussion also reflects a dependency on definitions and the specific context of classical versus quantum computing.

Callaghan
Messages
13
Reaction score
0
Below is the extraction from quantum computer book, but I think my question is related to classical computing;

"Now let us generalize from one to multiple qubits. Figure 1.6 shows five notable multiple bit classical gates, the AND, OR, XOR (exclusive-OR ), NAND and NOR gates. An important theoretical result is that any function on bits can be computed from the composition of NAND gates alone, which is thus known as a universal gate. By contrast, the XOR alone or even together with NOT is not universal. One way of seeing this is to note that applying an XOR gate does not change the total parity of the bits. As a result, any circuit involving only NOT and XOR gates will, if two inputs x and y have the same parity, give outputs with the same parity, restricting the class of functions which may be computed, and thus precluding universality."

I searched over the dictionary and understood the meaning of universal gate, but I do not get the total parity of the bits.

What does that mean? and what does that underlined, bold sentence imply?

I searched, and I found parity bits, but it seems that it's little bit different from what I am looking for.
 
Technology news on Phys.org
If you have N bits and M of them are one, then the "total parity" will depend only on "M". If M is odd, the "total parity" will be 1. If M is even, then "total parity" will be 0. The word "total" is not usually included - but they are probably referring to the fact that an XOR is the same as a modulo 2 addition.

Stepping back, they are trying to show that there are some gates that cannot be created with only XORs. They are also letting you use NOT - but this is no gift. You can generate a NOT from an XOR by XORing with 1. Starting with A, B, and as many XORs as you wish, these are the symbols you can generate:
0, A, B, A XOR B, 1, NOT A, NOT B, or NOT(A XOR B)

XORing any of those with any of the others will not generate anything new.
What they are getting at can be seen in the table below. The columns are:
1) Result when A=0, B=0
2) Result when A=0, B=1
3) Result when A=1, B=0
4) Result when A=1, B=1
5) The XOR operation generating the result.
0000 0
0011 A
0101 B
0110 A XOR B
1111 1
1100 NOT A
1010 NOT B
1001 NOT(A XOR B)

Here's the key. Notice two things:
1) For each row, the number of 1's in the the table above is always even.
2) Whenever you XOR two even patterns, you will get an even result.

Therefore, something like an AND, OR, NAND, or NOR can never be generated from XOR gates only.
0001 AND (1 is odd)
0111 OR (3 is odd)
1110 NAND (3 is odd)
1000 NOR (1 is odd)
 
Last edited:
  • Like
Likes   Reactions: poseidon721 and jim mcnamara
So, I understand that the gate can be viewed as combination of 0 and 1 for 4 binary digits by using 0, A, B, 1.

But how do you make 1 by XOR??
 
Callaghan said:
So, I understand that the gate can be viewed as combination of 0 and 1 for 4 binary digits by using 0, A, B, 1.

But how do you make 1 by XOR??
In practice, you can always tie the input to a gate high or low. This is the same as providing a 1 or 0 as the input. So 1 and 0 are always available - unless you make a special rule to exclude them.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
Replies
10
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
514
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
29
Views
6K