Link to home
Start Free TrialLog in
Avatar of jasgiv1122
jasgiv1122Flag for United States of America

asked on

How do I read bytes in a file?

I have my file (it is a QDX file if anyone is familiar with that...) and I need to read the last 4 bits of the 559th byte in this file using vb.net or vbscript.  I've looked at a few other methods on here but can't get any of them to work.  Any help is appreciated!  Thanks
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The offset probably needs to be 558 rather than 559.
Avatar of jasgiv1122

ASKER

This worked perfectly, thanks!  Can you explain the 'mask' part so I can sort of grasp what you did?  Thanks!
The mask is for "and I need to read the last 4 bits". 15 in binary is 0000 1111, and when you AND that value with another value, you get the values of the last four bits.