Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Little or Big Endian?

Status
Not open for further replies.

faisal78

Member level 3
Joined
Aug 27, 2004
Messages
62
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
592
low endian

Can somebody help me understand what are the difference and pros./cons between them?
 

hexdump endian

"Little Endian" means that the low-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address. Intel processors (those used in PC's) use "Little Endian" byte order.
"Big Endian" means that the high-order byte of the number is stored in memory at the lowest address, and the low-order byte at the highest address. Motorola processors (those used in Mac's) use "Big Endian" byte order.
 

lower endian

faisal78 said:
Can somebody help me understand what are the difference and pros./cons between them?

For example for 32 bit number 0x12345678

Bytes in memory (like hex dump):
Big endian: 0x12 0x34 0x56 0x78
Low endian: 0x78 0x56 0x34 0x12
 

big endian msb

big-endian The most significant byte is on the left end of a word.
little-endian The most significant byte is on the right end of a word.
 

big endian example

For example for 32 bit number 0x12345678

Bytes in memory (like hex dump):
Big endian: 0x12 0x34 0x56 0x78
Low endian: 0x78 0x56 0x34 0x12


******************************************

Shouldn't it be like this??

Big endian: 0x12 0x34 0x56 0x78
Low endian: 0x87 0x65 0x34 0x21

Only the the MSB for big endian will be on the right most and MSB for low endian be on the left most
 

low-endian

faisal78 said:
For example for 32 bit number 0x12345678

Bytes in memory (like hex dump):
Big endian: 0x12 0x34 0x56 0x78
Low endian: 0x78 0x56 0x34 0x12

******************************************
Shouldn't it be like this??

Big endian: 0x12 0x34 0x56 0x78
Low endian: 0x87 0x65 0x34 0x21

Only the the MSB for big endian will be on the right most and MSB for low endian be on the left most

The first example is ok.
You gotta change the order of bytes, not nibbles.
 

hexdump big endian

BIG ENDIAN refers to data
ordering where the most significant portion of an operand is stored at the lower address. LITTLE
ENDIAN refers to data ordering where the most significant portion of an operand is stored
at the higher address.

I strongly suggest that you should read the wishbone spec, which explain this very clearly!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top