Converting 8-bit binary array to decimal number