Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: little/big ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 26050 of 26955
Post > Topic >>

Re: little/big endian question.

by Ben Bacarisse <ben.usenet@[EMAIL PROTECTED] > May 4, 2008 at 10:00 PM

Martin <martindotounderscorebrien@[EMAIL PROTECTED]
> writes:

> On Sat, 03 May 2008 15:29:24 +0100, Charles Sullivan
> <cwsulliv@[EMAIL PROTECTED]
> wrote:
>>   hibyte = (svalue >> 8) & 0xFF;
>
> What's the point of the '& 0xFF'?

Well, it does make a difference if unsigned char has more than 8 bits
and unsigned short has more than 16.  If you've used a machine with
36, 18 and 9 bit types to implement octet-based processing, you do
this automatically.

-- 
Ben.
 




 6 Posts in Topic:
little/big endian question.
Charles Sullivan <cwsu  2008-05-03 14:29:24 
Re: little/big endian question.
Willem <willem@[EMAIL   2008-05-03 14:34:25 
Re: little/big endian question.
vippstar@[EMAIL PROTECTED  2008-05-03 09:21:28 
Re: little/big endian question.
Charles Sullivan <cwsu  2008-05-03 14:45:05 
Re: little/big endian question.
Martin <martindotounde  2008-05-04 20:27:40 
Re: little/big endian question.
Ben Bacarisse <ben.use  2008-05-04 22:00:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:34:24 CDT 2008.