Link to home
Start Free TrialLog in
Avatar of codey-06
codey-06Flag for Afghanistan

asked on

extract a byte

Hello

Can someone advise how I can extract the first 8 bits and last 8 bits from a 16 bit integer.

for example decimal 64339 = 11111011 01010011

I need the 1st 8 bits decimal 251 (11111011) and then the last 8 bits decimal 83 (01010011)

Can you give me an example of how to write this in C

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
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