mod2 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

convert/mod2

convert expression to mod 2 form

 Calling Sequence convert(expr, mod2)

Parameters

 expr - expression

Description

 • The convert/mod2 function reduces an expression modulo 2.
 • The expression can contain the following Boolean operators:

 and not or xor implies

 These are converted to their equivalent modulo 2 representation.

Examples

 > $\mathrm{convert}\left(7{x}^{3}y+5,\mathrm{mod2}\right)$
 ${x}{}{y}{+}{1}$ (1)
 > $\mathrm{convert}\left({x}^{2}{y}^{2}+xy,\mathrm{mod2}\right)$
 ${0}$ (2)
 > $\mathrm{convert}\left(x\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{and}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{not}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}y,\mathrm{mod2}\right)$
 ${x}{}\left({1}{+}{y}\right)$ (3)
 > $\mathrm{convert}\left(x\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}y,\mathrm{mod2}\right)$
 ${x}{}{y}{+}{x}{+}{y}$ (4)
 > $\mathrm{convert}\left(x\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{xor}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}y\mathbf{⇒}z,\mathrm{mod2}\right)$
 ${1}{+}{x}{+}{y}{+}\left({x}{+}{y}\right){}{z}$ (5)

 See Also