% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/to_decimal.R
\name{to_decimal}
\alias{to_decimal}
\title{Convert a Vector of Bits to a Decimal Number}
\usage{
to_decimal(bits)
}
\arguments{
\item{bits}{(\code{logical()})\cr
Logical vector of input values. Missing values are treated as being \code{FALSE}.
If \code{bits} is longer than 30 elements, an exception is raised.}
}
\value{
(\code{integer(1)}).
}
\description{
Converts a logical vector from binary to decimal.
The bit vector may have any length, the last position is the least significant, i.e.
bits are multiplied with \code{2^(n-1)}, \code{2^(n-2)}, ..., \code{2^1}, \code{2^0} where \code{n} is the
length of the bit vector.
}
