<P> For example, the 74LVC1G386 microchip is advertised as a three - input logic gate, and implements a parity generator . </P> <P> The XOR logic gate can be used as a one - bit adder that adds any two bits together to output one bit . For example, if we add 1 plus 1 in binary, we expect a two - bit answer, 10 (i.e. 2 in decimal). Since the trailing sum bit in this output is achieved with XOR, the preceding carry bit is calculated with an AND gate . This is the main principle in Half Adders . A slightly larger Full Adder circuit may be chained together in order to add longer binary numbers . </P> <P> Pseudo-random number (PRN) generators, specifically Linear feedback shift registers, are defined in terms of the exclusive - or operation . Hence, a suitable setup of XOR gates can model a linear feedback shift register, in order to generate random numbers . </P> <P> XOR gates produce a 0 when both inputs match . When searching for a specific bit pattern or PRN sequence in a very long data sequence, a series of XOR gates can be used to compare a string of bits from the data sequence against the target sequence in parallel . The number of 0 outputs can then be counted to determine how well the data sequence matches the target sequence . Correlators are used in many communications devices such as CDMA receivers and decoders for error correction and channel codes . In a CDMA receiver, correlators are used to extract the polarity of a specific PRN sequence out of a combined collection of PRN sequences . </P>

Represent xor with inverters and and or gates