DOCUMENTATION CENTER SEARCH
Mathematica
>
System Information
>
Built-in
Mathematica
Symbol
Global System Information
Tutorials »
|
$ProcessorType
$System
$CharacterEncoding
ByteOrdering
See Also »
|
Binary Data
System Information
More About »
$ByteOrdering
$ByteOrdering
gives the native ordering of bytes in binary data on your computer system.
MORE INFORMATION
Possible values of
$ByteOrdering
are
+1
and
-1
.
+1
corresponds to big endian (appropriate for 680x0 and many other processors);
-1
corresponds to little endian (appropriate for x86 processors).
+1
corresponds to having the most significant byte first;
-1
to having the least significant byte first.
+1
is the order obtained from
IntegerDigits
[
n
, 256]
.
$ByteOrdering
gives the default setting for the
ByteOrdering
option in
Import
and
Export
.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Byte ordering on this machine:
In[1]:=
Out[1]=
Read in a byte stream with reversed byte ordering:
In[1]:=
Out[1]=
Correct the byte ordering:
In[2]:=
Out[2]=
SEE ALSO
$ProcessorType
$System
$CharacterEncoding
ByteOrdering
TUTORIALS
Global System Information
MORE ABOUT
Binary Data
System Information
New in 4
© 2008 Wolfram Research, Inc.