dec2bin: Convert decimal values to binary values

Description Usage Arguments Value Author(s) Examples

Description

A function to convert decimal values to binary values

Usage

1
dec2bin(number, bits)

Arguments

number

the decimal number that needs to be converted.

bits

the number of bits of the result

Value

a vector contains of binary values 0 and 1.

Author(s)

Liye He liye.he@helsinki.fi

Examples

1
dec2bin(8, 5)

Example output

     [,1] [,2] [,3] [,4] [,5]
[1,]    0    1    0    0    0

timma documentation built on May 2, 2019, 1:10 p.m.