dotmod2: dotmod2

Description Usage Arguments Value Examples

View source: R/dotmod2.R

Description

Takes two integers and takes the dot product of their binary representations. Output is the value of the dot product, modulus 2

Usage

1
dotmod2(x,a)

Arguments

x

integer

a

integer

Value

Binary value resulting from the bit-wise dot product modulus 2

Examples

1
2
3
 dotmod2(5,5)
 dotmod2(1,2)
 dotmod2(0,1)

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] 0
[1] 0

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