Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #237 Xor integers

Assign to c the result of (a xor b)

var c = a ^ b;
int c = a ^ b;
(def c (bit-xor a b))
int c = a ^ b;
int c = a ^ b;
use Bitwise
c = a ^^^ b
C = A bxor B
c = ieor(a,b)
import "math/big"
c := new(big.Int)
c.Xor(a, b)
c := a ^ b
import Data.Bits (xor)
c = xor a b
const c = a ^ b;
int c = a ^ b;
c := a xor b;
my $c = $a ^ $b;
c = a ^ b
c = a ^ b
let c = a ^ b;
Dim c As Integer = a Xor b

New implementation...
< >
programming-idioms.org