Android Question How to convert "10110110" to 8bit value ?

Discussion in 'Android Questions' started by Buzby, Apr 4, 2015.

  1. Buzby

    Buzby New Member Licensed User

    I am fairly new to B4A, and don't know all the clever stuff hidden away in there.

    There is a serial line sending in strings of 8 ascii '1' and '0' chars, like "11100110".

    I need to convert this string into an 8bit value. This could be done by extracting each char, then using its value to add 2^x to the result. This is how I would attempt it, but does B4A have a better method ?.
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

  3. Buzby

    Buzby New Member Licensed User

    Thankyou, that looks just right !.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice