answersLogoWhite

0


Best Answer

"Little Endian" means that the lower-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address. For example, a 4 byte Integer

Byte3 Byte2 Byte1 Byte0

will be arranged in memory as follows:

Base Address+0 Byte0

Base Address+1 Byte1

Base Address+2 Byte2

Base Address+3 Byte3

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. The same 4 byte integer would be stored as:

Base Address+0 Byte3

Base Address+1 Byte2

Base Address+2 Byte1

Base Address+3 Byte0

Motorola processors (those used in Mac's) use "Big Endian" byte order.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

"Little Endian" means that the lower-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address.

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

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

Big-endian and little-endian describe the byte order of multi-byte values (words), whether in computer memory or during transmission. Humans use big-endian notation, such that the most-significant digit always comes first when we read a numeric symbol from left-to-right. That is, the three-digit symbol 123 means one-hundred-and-twenty-three. By contrast, little-endian notation would completely reverse the significance, such that 123 would mean three-hundred-and-twenty-one.

Many of the early binary computers used the "normal" big-endian convention, such that the four-byte binary value 0x01020304 would be written with the most-significant byte (0x01) at the lowest address and the least-significant byte (0x04) in the highest address. If assume the four bytes are allocated to address A, the memory layout would be as follows:

A[0] = 0x01 (A + 0 bytes (lowest address))

A[1] = 0x02 (A + 1 byte)

A[2] = 0x03 (A + 2 bytes)

A[3] = 0x04 (A + 3 bytes (highest address))

While this seems to make perfect sense because it matches the way we imagine all values should be written (whether in decimal, binary or some other base), it does create a subtle but not insignificant problem. Let's imagine we've actually stored the binary value 0x00000001 in those four bytes. The memory layout would then be:

A[0] = 0x00 (lowest address: A + 0 bytes) A[1] = 0x00

A[2] = 0x00

A[3] = 0x01 (highest address: A + 3 bytes)

Now, imagine we have allocated one byte of storage at address B and we wish to perform the assignment operation B = A. If we did this naively, without taking the byte-order into account, B = A would really mean B = A[0] because A and A[0] have the exact same address (A+0 bytes). Thus the value of B after assignment would be 0x00. This is clearly not what we expect because A is a four-byte value with the decimal value 1. So when we said B = A what we really meant was B = A[3]. The computer can easily take this into account on our behalf, but it does add a minute overhead to the assignment operation.

To eliminate this overhead completely, many modern computers use little-endian notation. Thus our four-byte value would actually be written in reverse order:

A[0] = 0x01 (lowest address: A + 0 bytes)

A[1] = 0x00

A[2] = 0x00

A[3] = 0x00 (highest address: A + 3 bytes)

Now when we say B = A we really do mean B = A[0], thus B = 0x01.

It should be noted at this point that many systems today still use big-endian notation. This is largely due to historical reasons, such as maintaining backward compatibility. It should also be noted that little-endian notation has no effect on the order of character arrays (strings), only the order of the bytes used to encode the individual characters within the string. That is, 16-bit UNICODE characters may be individually encoded using little-endian notation, but the order of the characters within the string remains big-endian, as you would expect.

There are also some systems that support both big-endian and little-endian notations. In addition, there are also other "endians" where the byte order may be partially big-endian or little-endian, such that a 4-byte word might use little-endian notation for each pair of bytes, but the order of those pairs with respect to each other may be big-endian. Such endians are often called middle-endian or mixed-endien.

Big-endian notation is also widely-used in data networks. This, of course, is vital since systems with different endians still require a consistent means of transmitting data back and forth. As such, the internet protocol suite (IPv4, IPv6, TCP and UDP) advocate big-endian byte order. For that reason, big-endian is also known as network byte order.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

The big-endians assert that you have to open an egg at the bigger end, the little-endians, at the smaller end. The two groups are engaged in bitter fightings. (This is from Gulliver's Travels.)

In programming, it refers to the order in which bytes are saved for a number; I believe this refers especially to integers. The difference is whether the highest-order byte is stored first (big-endian), or last (little-endian).

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Basic Memory Concepts

A bit has two values (on or off, 1 or 0)

A byte is a sequence of 8 bits.

Integer, and float type variables are stored in 4 bytes or 32 bits, while long, and double are stored in 8 bytes or 64 bits.

Memory is a one large array containing bytes as its elements.

In computer terminology, index for memory array is called an address, which refers to a location in the memory array

Each address stores one element of the memory "array", which is typically one byte. There are some memory configurations where each address stores something besides a byte, but here we are dealing with only bytes.

Big and Little - Endian formats:

Represents the order in which a sequence of bytes is stored in computer memory.

Everything in Java binary format files is stored in big-endian format, MSB (Most Significant Byte) first. This is referred to as big-endian byte sex or sometimes network order.

For example, consider the number 1025 stored in a 4-byteinteger:

1025 in binary = 10000000001 (2 to the tenth power plus one).

The "leftmost" bit in a byte is the biggest. So, the binary sequence 00000100 00000001 is the decimal number 1025.

00000100 00000001 = (210 + 20 = 1024 + 1 = 1025).

Bits in a byte are numbered from right-to-left, and bit 0 is the rightmost and the smallest; bit 7 is leftmost and largest.

Thus (underlined) 1 (which is 2 to the power of 10 = 1024) is the most significant digit, and the other 1 (which is 2 to the power of 0 = 1) is the least significant digit.

In a little-endian system, the least significant byte (LSB) in the sequence is stored first, therefore it is stored exactly opposite of big-endian format as follows:

Address

Big-Endian representation of 1025

Little-Endian representation of 1025

00

01

02

03

00000000

00000000

00000100

00000001

00000001

00000100

00000000

00000000

Big-endian: used by

Java virtual machine (JVM),

Motorola

Little-endian: used by

Intel processors (CPUs) and DEC Alphas,

Windows on x86, x64

Many mainframe computers, particularly IBM mainframes, use big-endian architecture. Most modern computers, including PCs, use the little-endian system.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

"Little Endian" means that the lower-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address.

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

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the use of little endian and big endian?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is hp laptop prosesor little endian or big endian?

little-endian


Does Java support little endian or not?

There is little endian byte ordering support in Java found in the java.nio package (see ByteBuffer and ByteOrder class).


How did the dispute arise between the big-endians and the little-endians?

The dispute between the big-endians and the little-endians arose from a disagreement over how boiled eggs should be opened. The big-endians believed in cracking the egg at the big end, while the little-endians preferred cracking it at the small end. This seemingly trivial disagreement led to deep divisions and conflict between the two factions.


To decide whether given processor is using little endian format or big endian format?

There are n no. of ways for determining endianness of your machine. Here is one quick way of doing the same.#include <stdio.h> int main() { unsigned int i = 1; char *c = (char*)&i; if (*c) printf("Little endian"); else printf("Big endian"); getchar(); return 0; } In the above program, a character pointer c is pointing to an integer i. Since size of character is 1 byte when the character pointer is de-referenced it will contain only first byte of integer. If machine is little endian then *c will be 1 (because last byte is stored first) and if machine is big endian then *c will be 0.


What is the binary code for seventeen?

It depends how you want to encode it. Encoding as 8-bit ASCII (ISO/IEC/8859 or ISO-8859-1) it will be: 0x6920616d20736576656e00 Note the 0x00 at the end is the null terminator. Total length is 11 bytes. However, you will probably want to replace the lowercase 'i' with an uppercase 'I' (in all version of English, the singular first person noun 'I' is always capitalised), in which case the encoding would be: 0x4920616d20736576656e00 Encoding as 16-bit UNICODE is the same except each byte is padded with 8 zero bits (0x00) and a BOM (byte-order mark) is inserted at the front to ensure correct interpretation. In big-endian notation, the binary value would be: 0xfeff004900200061006d00200073006500760065006e0000 In little-endian notation, it would be: 0xfffe4900200061006d00200073006500760065006e000000 Similarly with 32-bit UNICODE, padding with another 16 zero bits along with a 32-bit BOM: 32-bit big-endian: 0x0000feff0000004900000020000000610000006d00000020000000730000006500000076000000650000006e00000000 32-bit little-endian: 0xfffe0000004900000020000000610000006d00000020000000730000006500000076000000650000006e000000000000 There are many other ways to encode text. This is primarily due to the wide variety of character sets available to cater for foreign languages and other symbols. It is also possible to use compression encodings, cipher encodings and encrypted encodings. But in order to interpret these encodings correctly you would need to know precisely how it was encoded, in the same way a BOM tells the decoder how to correctly interpret the byte order.

Related questions

Is hp laptop prosesor little endian or big endian?

little-endian


What does 'endian' mean in computer science?

Both little and big endian are still in use today. In big endian the most significant byte is the smallest address stored. In little endian the least significant byte is the smallest address stored.


If A word on a little-endian computer has the numerical value of 3 If it is transmitted to a big-endian computer byte by byte and stored there with byte 0 in byte 0 and so on what is its numerica?

In a 32-bit word, the decimal value 3 has hex value 0x00000003. Laid out in memory in a little-endian computer, it is 0x03, 0x00, 0x00, 0x00. If you move that to a big-endian computer without reversing the byte order, you get 0x03000000, which is decimal 50,331,648. The correct big-endian representation should have been 0x00, 0x00, 0x00, 0x03.


How is the hex 1234 stored in big endian?

Big endian does not change the ordering, so it is stored as 0x1234


Give the ASCII representation for the numeral 24.6391 in hexa decimal?

24.6391 is represented in IEEE real*4 (32-bit real number) as: 0x41c51ce0 (big-endian) 0xe01cc541 (little-endian)


What is the major difference between little endian and big endian in file system?

Endianness relates to the order of bytes in a multi-byte value. Humans prefer to work with big-endian notation, such that the value 123 is interpreted as being one-hundred-and-twenty-three. In little-endian notion, 123 would be interpreted as being three-hundred-and-twenty-one. In other words, the significance of the digit positions is completely reversed. With big-endian notation, the most significant digit always comes first. With little-endian notation, the least-significant digit comes first.Note that although the word 'end' usually means final or last, the term derives from Jonathan Swift's novel, Gulliver's Travels, where a civil war breaks out over which end of a soft-boiled egg to crack first; the big end or the little end, analogous to the most-significant or least-significant end of a multi-digit value respectively.


Does Java support little endian or not?

There is little endian byte ordering support in Java found in the java.nio package (see ByteBuffer and ByteOrder class).


Which two ideologies were most directly opposite of each other?

The "Big Endian" and "Small Endian" philosophies described by Jonathan Swift in "Gulliver's Travels".


How do you disable endian firewall?

Disabling Endian firewall is a little tough. You either need to create an allow rule for all ports, or disable to firewall on outgoing traffic.


How did the dispute arise between the big-endians and the little-endians?

The dispute between the big-endians and the little-endians arose from a disagreement over how boiled eggs should be opened. The big-endians believed in cracking the egg at the big end, while the little-endians preferred cracking it at the small end. This seemingly trivial disagreement led to deep divisions and conflict between the two factions.


To decide whether given processor is using little endian format or big endian format?

There are n no. of ways for determining endianness of your machine. Here is one quick way of doing the same.#include <stdio.h> int main() { unsigned int i = 1; char *c = (char*)&i; if (*c) printf("Little endian"); else printf("Big endian"); getchar(); return 0; } In the above program, a character pointer c is pointing to an integer i. Since size of character is 1 byte when the character pointer is de-referenced it will contain only first byte of integer. If machine is little endian then *c will be 1 (because last byte is stored first) and if machine is big endian then *c will be 0.


What is the main difference between Pentium and PowerPC processors?

There are several "main" differences, that are important, depending on what context you are interested in them for. PowerPC processors are primarily manufactured by IBM and Freescale. Pentium processors are manufactured by Intel. PowerPC processors can operate in both little-endian and big-endian modes. Pentium processors (and compatibles) are little-endian only. PowerPC processors are used in some servers, game consoles, and in embedded kiosks. They were also used in Macs before 2005. Pentium (and compatible) processors are used in most desktop computers, the original Xbox, servers, and some embedded kiosks.