Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Least significant byte of an int
Message
From
30/09/2005 17:18:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01055093
Message ID:
01055100
Views:
16
>>It is Friday and my mind has already left for the weekend <s>.
>>How can I get the least significant byte of an int value?
>>
>>Einar
>
>Hey my mind came back for a brief moment.
>Just bitwise AND with 0xFF
>
>
>bByte = (byte) (iInt & 0xFF);
>
>
>Einar

A division mod 256 should also do the trick.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform