Bit_order has No Endianness . Why ?

Hi,

It is really strange that Endiannes is not dependent on the Bit_Order but only on the Byte_order.

But, Why the Bit_Order has not been taken into consideration ??

Really strange. Any specific reasons for this ??? Eager to know about this.

Thx in advans, Karthik Balaguru

Reply to
KBG
Loading thread data ...

Ain't no Endiannes here, just Native 'merkins ;-)

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | |

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

Why bits of a byte are of Big-Endian type ? Then, we could have gone for Big-endian throughout all designs !!

Why did Little-Endian come ?

It is strange that Endiannes is not dependent on the Bit_Order of a Byte but only on the Byte_order.

Why bits of BYTEs do not have endianness ? And, Why the Bit_Order has not been taken into consideration ??

Really strange. Any specific reasons for this ??? Eager to know about this.

Thx in advans, Karthik Balaguru

Reply to
KBG

Just like Bytes make the Most Significant BYTE(MSB) and LSB of many datatypes. The Bits make the Most Significant BIT(MSB) and LSB of a Byte.

It is strange that Endiannes is not dependent on the Bit_Order of a Byte but only on the Byte_order.

My questions are : Why bits of a byte are of Big-Endian type ? Then, we could have gone for Big-endian throughout all designs !!

Why did Little-Endian come ?

Why bits of BYTEs do not have endianness ? Just like bytes, bits are also manipulated in many places in the form of MSB and LSB only. Every basic driver level interface goes to the BIT level.

So, Why the Bit_Order has not been taken into consideration ??

Really strange. Any specific reasons for this ??? Eager to know about this.

Thx in advans, Karthik Balaguru

Thx in advans, Karthik Balaguru

Reply to
KBG

It's -- sort of -- a historical artifact. When people were first designing processor (or even cruder devices, I imagine), it was already well-defined what a "byte" was. Usually you'd have something like an "8 bit" processor (e.g., the 6502) that generally dealt with byte quantities, but once in awhile -- e.g., for fetching addresses, which were 16 bits -- it'd have to deal with 2 bytes.

At that point you get to choose whether you'd like a big-endian or little-endian system.

Typically little-endian was a little easier to implement... if you're doing something like, "jump to this 16 bit address plus an offset," you can fetch the least significant byte, add the offset (which was often restricted to 8 bits -- remember you probably only have an 8 bit adder available), fetch the most significant byte (add any remaining part of the offset if need be), and go. With big-endian, you have to fetch the MSByte, fetch the LSByte, and

*then* start adding offsets -- for simple 8 bit CPUs, that would have been a clock cycle or 2 clock and thus undesirable.

Basically, the "endianess boundary" is defined by the size of the data "chunks" you normally "access." There are many protocols -- RS-232 being a good example -- where you're accessing data chunks a single bit at a time anyway, an therefore it is reasonably to send bit 0, then bit 1, etc. -- and this is exactly what RS-232 does.

---Joel

Reply to
Joel Kolstad

Endianness has meaning only where there is some ambiguity. There is no ambiguity in which bit is least significant at the largest atomic value, which is usually a byte (provided you have connected everything at the hardware level correctly), but there can be above the byte (or access size) level.

This particularly shows up in ROM/Flash loads. If I specify a single byte value, we need to make sure things are connected correctly, but when I have a multibyte value, things aren't as clear.

In general, endian isssues are only an issue at the level _above_ the byte level; at the byte level it's a matter of connecting the devices properly at the hardware layer; above that, the access protocol (endianness) matters. Substitute 'hardware atomic size' for byte to make this a generic statement.

Cheers

PeteS

Reply to
PeteS

Anything to do with Big/Little endian is one big pain.

This all depends on which definition big endian you use. If you look and some of the power PC products (i.e.

formatting link
they have done the endianess on the bit order too. (address and data).

If you really want to know about big/little endian see chapter IV of

formatting link
:)

Reply to
bogusemail98230

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.