c++ - Should I worry about Big Endianness or is it only a trivial aspect? -


are there many computers use big endian? tested on 5 different computers, each purchased in different years, , different models. each use little endian. big endian still used days or older processors such motorola 6800?

edit:

thank treya, intel.com/design/intarch/papers/endian.pdf nice , handy article. covers every answers bellow, , expands upon them.

there's many processors in use today big endian, or allows option switch endian mode between big , little endian, (e.g. sparc, powerpc, arm, itanium..).

it depends on mean "care endian". don't need care endianess if program data need. endian matters when need communicate outside world, such read/write file, or send data on network , reading/writing integers larger 1 byte directly to/from memory.

when need deal external data, need know format. part of format e.g. know how integer encoded in data. if format specifies first byte of 4 byte integer significant byte of said integer, read byte , place @ significant byte of integer in program, , able accomplish fine code runs on both little , big endian machines.

so it's not processor endianess, data need deal with. data might have integers stored in either "endian", need know which, , various data formats use various endianess depending on specification, or depending on whim of guy came format.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -