Re: c programmes
endianness->It refers to the way no of bytes of information is stored in memory of byte addressable system.
....our computer architecture theory provide three way to do this.
1>Little endian(also known as intel format): It provide a way to store bytes of information where we store least significant byte first followed by it most significant byte.
....like i give you an example where you have to store 19045(100101001100101) by using Little endian technique.
01001010 01100101
2>Big endian(also known as motorola format): It provide you a way to store bits of information where we store most significant byte first followed by it's least significant byte.
so now write above number in little indian format.
01100101 01001010
But this is the binary representation of the number 19044.so you need to know the endian nature of the machine which read and wrote your data.
If the endian nature of the machines are different then you need a software which swap your bytes of information in order to understand bytes of information in right sequence order.
Most of our UNIX machines are big endian. Whereas most PCs are little endian machines.
In the networking where you have to send most significant byte first uses big endian concept.....Same like when you have to call somewhere suppose India so at first you have to dial +91 then others in sequence.
I forgot, i read somewhere in java complete reference that sockets API which defines a set of functions to convert 16- and 32-bit integers to and from network byte order.
I will search for that if i find i will send you......why not you write a program in order to convert big endian to little endian. Just start it, it's not a vary hard work.