Titan



xor4b


The keyword xor4b belongs to the family of the bitwise operators operating on bitstrings, hexstrings or octetstrings of equal length. It performs the following operation: for each corresponding bit position, the resulting value is 0 if both bits are set to 0 or if both bits are set to 1, otherwise the value for the resulting bit is 1.

Related keywords:


xor4b


Example 1:

const bitstring c_kelep := '1001'B;
const bitstring c_telep := '0101'B;
  var bitstring v_betue := c_kelep xor4b c_telep;

The variable v_betue will initially contain the value '1100'B.


Example 2:

const hexstring c_aimer := '9'H ;
const hexstring c_voire := '5'H;
  var hexstring v_etais := c_aimer xor4b c_voire;

The variable v_etais will initially contain the value 'C'H.


Example 3:

const octstring c_gooie := '39'O ;
const octstring c_kanel := '15'O;
  var octstring v_breda := c_gooie xor4b c_kanel;

The variable v_breda will initially contain the value '2C'O.



BNF definition of xor4b