Learn R Programming

binaryLogic (version 0.2.6)

switchEndianess: Switch Endianess.

Description

switch little-endian to big-endian and vice versa.

Usage

switchEndianess(x)

Arguments

x
binary number. Any binary vector.

Value

  • switch little-endian to big-endian and vice versa.

See Also

negate or fillUpToByte.

Examples

Run this code
x <- as.binary(c(1,1,0,0), logic=TRUE); print(x); summary(x);
y <- switchEndianess(x); print(y); summary(y);
neg_two <- as.binary(-2)
as.raw(neg_two)
as.raw(switchEndianess(neg_two))

Run the code above in your browser using DataLab