title: React-native: How to convert byte array(Buffer data) to Bit(Binary data)
body: <p>I am new in react native and i develop app with Bluetooth device so hear, Bluetooth device send a data and my app received those data in buffer,</p>
  
  <p>My problem is,</p>
  
  <p>How to convert this buffer data in binary format ? then after this binary data convert in decimal.</p>
  
  <p>Please check my below code.</p>
  
  <pre><code>bleManagerEmitter.addListener(
         "BleManagerDidUpdateValueForCharacteristic",
         ({ value, peripheral, characteristic, service }) =&gt; {
  
           // Buffer data return from Bluetooth device
           const buffer = Buffer.from(value); 
           console.lgo("buffer &gt;&gt; "+buffer) //[161,52]             
  
           return dispatch({
             type: BLUETOOTH_TYPE.READ_DATA,
             weight: sensorData
           });
         }
       );
  </code></pre>
  
  <p>Hear buffer data is like [161, 52], how convert in binary format ? and then how convert this binary data in decimal ?</p>
  
  <p>Output for [161,52] is 306.</p>
  
  <p>Thanks in advance.</p>