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 |
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What is the difference between c &c++?
In which header file is the null macro defined?
Is swift based on c?
write a program to count the no of repaeted words in a line?
What is wrong with this program statement?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
write a program to reverse the words in the sentence.NOTE:not reverse the entire string but just the occurance of each word
what is difference between strcmp & palindrome?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is the difference between exit() and _exit() function in c?