std-logxor


Synopsis

(std-logxor <int1> <int2>)

Description

std-logxor calculates the bitwise (logical) XOR ("Exclusive OR") of the two numbers.

It returns the integer representation of the bitwise comparison of the numbers when only one of the input bits is 1.

Same as (boole 6 int1 int2).

Truth table:
bit1 bit2 => xor
0	0	=> 0
0	1	=> 1
1	0	=> 1
1	1	=> 0

2 [0010] xor	1 [0001]	 => 3 [0011]
3 [0011] xor	9 [1001]	 =>10 [1010]

Arguments

int1, int2: Integer numbers.

Return Value

A integer number representing the logical XOR value of the two arguments.

Side Effects

None.

Module

(std-require 'STDMATH)

Defined in STDMATH