Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Least significant byte of an int
Message
 
À
30/09/2005 17:18:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01055093
Message ID:
01055115
Vues:
18
>>>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.

Hilmar,
Could you please post code? (My mind left for the weekend again and my body should get out of here soon to otherwise I'll be in some serious trouble with the chief<s>)

I guess the big question is which is faster bitwise AND or your mod 256.

Einar
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform