Data reading problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michal Szpadzik

    #1

    Data reading problem

    I'm a newbie.

    I have some problems with bits data reading. I have binary data file
    where data is written as 12bits pack. I need to read it becouse there
    are saved values which have to processed later by my program. I was
    wandering about reading 3bytes=24bits and split it by bits moving. If
    anyone know how to do that please tell me or give me some code.

    My data example:
    101001000101111 010100101 etc

    i need to split it:
    x=101001000101 y=111010100101

    and then do:
    mydata=x*a+b where a and b are a float point numbers
    mydata2=y*a+b

    Sorry for my poor english. I wish You understand what I mean.

    THX for any answer.

    --
    Mike Szpadzik
Working...