1 <?xml version="1.0" encoding="UTF-8"?>
4 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5 * Copyright (C) 2011 - DIGITEO - Michael Baudin
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises
9 * This file is hereby licensed under the terms of the GNU GPL v2.0,
10 * pursuant to article 5.3.4 of the CeCILL v.2.1.
11 * This file was originally licensed under the terms of the CeCILL v2.1,
12 * and continues to be available under such terms.
13 * For more information, see the COPYING file which you should have received
14 * along with this program.
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="bitxor" xml:lang="en">
19 <refname>bitxor</refname>
20 <refpurpose>bitwise XOR</refpurpose>
29 <title>Parameters</title>
35 a <literal>m</literal>-by-<literal>n</literal> matrix of doubles
36 or a <literal>m1</literal>-by-<literal>m2</literal>-by-...-by-<literal>mm</literal> hypermatrix of doubles
37 or a <literal>m</literal>-by-<literal>n</literal> matrix of unsigned integers (<literal>uint8</literal>, <literal>uint16</literal> or <literal>uint32</literal>).
38 Must contain positive integer values.
46 a <literal>m</literal>-by-<literal>n</literal> matrix of doubles
47 or a <literal>m1</literal>-by-<literal>m2</literal>-by-...-by-<literal>mm</literal> hypermatrix of doubles
48 or a <literal>m</literal>-by-<literal>n</literal> matrix of unsigned integers (<literal>uint8</literal>, <literal>uint16</literal> or <literal>uint32</literal>).
49 Must contain positive integer values.
57 a <literal>m</literal>-by-<literal>n</literal> matrix of doubles
58 or a <literal>m1</literal>-by-<literal>m2</literal>-by-...-by-<literal>mm</literal> hypermatrix of doubles
59 or a <literal>m</literal>-by-<literal>n</literal> matrix of unsigned integers.
66 <title>Description</title>
68 Given <varname>x</varname> and <varname>y</varname> two positive integers, this function returns the decimal
69 number <varname>z</varname> whose the binary form is the XOR of the binary representations
70 of <varname>x</varname> and <varname>y</varname>.
76 <title>Examples</title>
77 <programlisting role="example"><![CDATA[
78 // Compute the bitwise XOR of two matrices of doubles.
84 // Compute the bitwise XOR of two matrices of integers.
89 // The types of x and y cannot be mixed (error).
96 // XOR is (10110)_2 which is 22.
97 bitxor(uint8(13), uint8(27))