What is inverse function to XOR?

The inverse is XOR! If you have: You can get a or b back if you have the other value available: For example if a = 5, b = 3 (and thus c = 6 as you mentioned) you get:

XOR signal in verilog

There are a couple of ways of doing this. One way could be to build a 4-input XOR module, and then instantiate multiple copies. Another way would be to use a for-loop. This won’t work with all the cases, since you don’t have an evenly-divisible number of wires. There are some other tricks (like 0-padding … Read more