Possible Duplicate:
Converting binary to decimal without using loop
I'm looking for the simplest and fastest solution. I tried documentation but could find anything.
I have an array of bits like [0, 1, 1, 1] and I want to convert it to simple int number 7. I get this array with bitget(x, 1:3), where x is an integer.