Home > Archive > VC Language > May 2006 > "Little Endian" or "Big Endian"
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
"Little Endian" or "Big Endian"
|
|
| bob@coolgroups.com 2006-05-25, 4:19 am |
| Are longs in Windows "Little Endian" or "Big Endian"?
Does this affect shift operations (<< and >> )?
| |
| Heinz Ozwirk 2006-05-25, 4:19 am |
| <bob@ groups.com> schrieb im Newsbeitrag
news:1148542215.975137.154150@i39g2000cwa.googlegroups.com...
> Are longs in Windows "Little Endian" or "Big Endian"?
Usually endianess is not an issue of the operating system but the hardware
it runs on. So, if Windows runs on a little endian processor, the least
significant byte of a multi-byte value is assigned to lower memory addresses
than the most significant byte. For other processors there may be a
different arrangement of bytes.
Strictly speaking, "Little Endian" and "Big Endian" does not apply to longs;
it only applies to two-byte (actually two-octet) integral types. For a long,
which occupies at least 4 octets, there are 24 different byte arrangements
(most of them quite stupid), but I have encountered at least three of them.
> Does this affect shift operations (<< and >> )?
No.
Heinz
| |
| Tim Roberts 2006-05-26, 4:13 am |
| bob@ groups.com wrote:
>
>Are longs in Windows "Little Endian" or "Big Endian"?
All versions of Windows ever built run little-endian. Even Windows CE.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
|
|
|