Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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..

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function what are the types of function?

996


What is main () in c language?

1129


What is extern keyword in c?

1129


Explain can static variables be declared in a header file?

1151


I have a varargs function which accepts a float parameter?

1043


What is an lvalue?

1063


What are header files in c?

1076


Write a program to swap two numbers without using third variable in c?

1130


What is the difference between exit() and _exit() function in c?

1076


Differentiate between static and dynamic modeling.

1113


What is the correct declaration of main?

1206


What does *p++ do? What does it point to?

1061


What is the difference between near, far and huge pointers?

1093


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

2461


What is 2c dna?

1075