Check out example codes for "matlab bit array to int". It will help you in understanding the concepts better.

Code Example 1

b = [0 0; 0 1; 1 0; 1 1]
d = bi2de(b, 'left-msb')

Learn ReactJs, React Native from akashmittal.com