What is the difference between big endian form and little
endian form? write a code to convert big endian form to
little endian and vice versa..
Answers were Sorted based on User's Feedback
Answer / peter
Little endian has least significant digit at far left.
Big endian has most significant digit at far left.
Is This Answer Correct ? | 28 Yes | 8 No |
Answer / raj
Little Endian ->LSB at lower address
Big Endian -> MSB at lower address
e.g:
if the value is 0x0A0B0C0D then
in case of LE storage will be
Address 1000 0D
Address 1001 0C
Address 1002 0B
Address 1003 0A
in case of BE storage will be
Address 1000 0A
Address 1001 0B
Address 1002 0C
Address 1003 0D
Marco to convert(this will convert from LE to BE or BE to
LE--> one for all :) )
#define CON(NUM) (NUM&0x000000FF)<<24|(NUM&0x0000FF00)<<8
|NUM&0x00FF0000)>>8 |(NUM&0xFF000000)>>24
Is This Answer Correct ? | 17 Yes | 3 No |
Answer / amit
the endianness of a bus determines whether the MSB is put
into the lowest address
(big-endian) or in the highest address (little-endian).
Is This Answer Correct ? | 13 Yes | 5 No |
Answer / vivek
in little endien lsb is at lower addess and in big endien
msb at lower address
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vish
Small correction in above macro.
'(' was missing in second line.
#define CON(NUM) (NUM&0x000000FF)<<24|(NUM&0x0000FF00)<<8
|(NUM&0x00FF0000)>>8 |(NUM&0xFF000000)>>24
Is This Answer Correct ? | 2 Yes | 3 No |
How to find a missed value, if you want to store 100 values in a 99 sized array?
what is c language?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
Can you please explain the difference between exit() and _exit() function?
What are the back slash character constants or escape sequence charactersavailable in c?
What is nested structure in c?
1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.
What is extern c used for?
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
Explain #pragma statements.
What is variable initialization and why is it important?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3