BusXOR (Bus XOR)

Inputs

PinTypeDescription
Abus8First input bus (8 bits)
Bbus8Second input bus (8 bits)

Outputs

PinTypeDescription
Qbus8Bitwise XOR: A ^ B

How It Works

Each output bit is 1 only if the two corresponding input bits differ. Equal bits produce 0.

A BitB BitQ Bit
000
011
101
110

Usage

Toggling bits: XOR with 0xFF inverts all bits (same as BusNOT). XOR with a mask where bit N = 1 toggles only bit N.

Equality check: If A ^ B = 0, then A = B. Feed XOR output into a BusZero detector to test equality.

Simple encryption: XOR a value with a secret key to obscure it. XOR again with the same key to restore the original. A ^ K ^ K = A.