addmod2: addmod2

Description Usage Arguments Value Examples

View source: R/addmod2.R

Description

Takes two integers and adds their bits modulus two. The resulting string of bits represents an integer, that value of which is the output.

Usage

1
addmod2(x,a)

Arguments

x

integer

a

integer

Value

Integer resulting from the bit-wise addition of two number modulus 2

Examples

1
2
 addmod2(5,5)
 addmod2(1,2)

Example output

Attaching package:QuantumOpsThe following object is masked frompackage:stats:

    dist

The following objects are masked frompackage:base:

    I, norm, single

[1] 0
[1] 3

QuantumOps documentation built on Feb. 3, 2020, 5:07 p.m.