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 |
Why is c faster?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
implement OR gate without using any bitwise operator.
What is dynamic dispatch in c++?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
praagnovation
The program to allow the characters from the input received and send this function to a function check if the characters between letters a to z is a function of y joins as the characters main and output to otherwise return to the original function of the y characters
Combinations of fibanocci prime series
When is a “switch” statement preferable over an “if” statement?
how to find out the inorder successor of a node in a tree??
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
How do you override a defined macro?