rotate: Rotate no carry ()

Description Usage Arguments Value See Also Examples

Description

A circular shift

Usage

1
rotate(x, n)

Arguments

x

The binary number to rotate. (binary or logical vector).

n

The number of bits to rotate.

Value

rotates the vector from left to right. The value from MSB is used to fill up the vector at LSB. Returns a binary/logical vector.

See Also

shiftLeft and shiftRight

Examples

1
2
3
x <- as.binary(c(1,0,0,1,1,1,0,1), logic=TRUE); x
rotate(x,1)
rotate(x,2)

binaryLogic documentation built on May 2, 2019, 10:25 a.m.