Data reading problem

M

Michal Szpadzik

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:
101001000101111010100101 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,214
Messages
2,571,112
Members
47,705
Latest member
noname22

Latest Threads

Top