Article View: comp.arch
Article #22170Re: Byte ordering
From: Herman Rubin
Date: Tue, 06 Feb 1990 12:38
Date: Tue, 06 Feb 1990 12:38
29 lines
1892 bytes
1892 bytes
In article <1991@osc.COM>, jgk@osc.COM (Joe Keane) writes: > In article <1990Feb2.215421.24894@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) > writes: ........................... > >-- on a little-endian machine, they're not the same), which simplifies the > >code for optimized raster operations. > > Sorry, but little-endian is just as consistent. The code is exactly the same, > you just have to switch << and >> in the right places. On say a MicroVAX, the > leftmost bit on the screen is the least significant in its byte, word, page, > or whatever. It depends on the purpose. If the part you want to keep after truncating is the most significant part, such as is the case with floating point numbers and fixed point fractions, big-endian is far easier to work with. If you want the low-order parts, little endian has the advantage. On the VAX, in order to provide for this problem, floating point numbers are little endian within words, but the words (16 bit) are arranged in a big endian manner. Packing and unpacking are quite difficult. The raster problem corresponds to fixed point fractions; when truncating, the most significant part is used. This is easier in big endian. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)
Technical Details
Message-ID:
<1910@l.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cikReferences:
<9656@spool.cs.wisc.edu> <1990Feb2.215421.24894@utzoo.uucp> <1991@osc.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Re: Byte ordering Summary: What about floating point or fixed point "fractions"? Keywords: byte sex Message-ID: <1910@l.cc.purdue.edu> Date: 6 Feb 90 12:38:20 GMT References: <9656@spool.cs.wisc.edu> <1990Feb2.215421.24894@utzoo.uucp> <1991@osc.COM> Organization: Purdue University Statistics Department Lines: 29