Learn R Programming

bitsqueezr (version 0.1.1)

bits_as_string: Generate a text representation of the bits in a double

Description

Generate a character vector of ones, zeros, and spaces, representing the bits in a double. Spaces are used to separate the sign bit, 11 exponent bits, and 52 fraction bits.

Usage

bits_as_string(d)

Arguments

d

a numeric value

Examples

Run this code
# NOT RUN {
# Output binary representation of pi
bits_as_string(pi)
# 0 10000000000 1001001000011111101101010100010001000010110100011000
# }

Run the code above in your browser using DataLab