@BinaryXor

Parent Previous Next

@BinaryXor.

Does binary xor operations (xorb) on each byte across an array of blobs. Returns a blob with the length of the longest participating blob.


Syntax.


 @BinaryOr(Blob[] blobs) : Blob

 


Arguments:


If a participating blob in the array has a length which is smaller than the longest blob, it does not participate beyond its length.


Example:


 Blob res, arr[] := [0x7F, 0xEEAB, 0xF977DD];

 res := @BinaryXor(arr[]);

 //Now res == 0x68DCDD;


 //Calculation:

 //0x7F     ~ 0111 1111

 //0xEEAB   ~ 1110 1110 1010 1011

 //0xF977DD ~ 1111 1001 0111 0111 1101 1101

 //---------------------------------------- xorb

 //0x68DCDD ~ 0110 1000 1101 1100 1101 1101

 //========================================