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
n is the
length of the bit vector.