Altera_Forum
Honored Contributor
16 years agoAND vs XOR gate
Im sorry if my post doesnt belong to here. Just a short question: Which one is larger in term of implementation? AND gate or XOR gate ? thanks
Why are you comparing the speeds of the two functions? They are two different operations. You must be looking at some larger operation and trying to decide how to implement it. In which case, you should compare the speed of the larger operations and not these simple logic operations.
For example: given reg [15:0] a; reg [15:0] b; reg res; then: res <= !(a^b) is faster than but consumes one more LUT than: res <= (a == b); Jake