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
Endianness does not apply to byte
Started by ●November 17, 2006
Reply by ●November 17, 20062006-11-17
Reply by ●November 17, 20062006-11-17
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
Reply by ●November 17, 20062006-11-17
Paul Burke wrote:> karthikbg wrote: > > > > I find that regardless of what the byte Endian order is, the bits > > within > > bytes are always in Big-Endian format. > ... > > So, this implies that Big-Endian is the better concept and why did they > > introduce this little-endian ? > > The only good-endian is a dead-endian!Haha. Please, please, let this thread come to a dead-end now.
Reply by ●November 17, 20062006-11-17
On 2006-11-17, karthikbg <karthik.balaguru@lntinfotech.com> wrote:>> However it doesn't alter the fact that "big-endian" vs "little-endian" >> is by definition a discussion of _byte_ order, not _bit_ order. > > It is really strange that Endiannes is not dependent on the Bit_Order > but only on the > Byte_order. > > Why, the Bit_Order has not been taken into consideration ??Because on most machiens _there_is_no_such_thing_as_bit_order_. [And no, the ordering of bitfields within a struct doesn't count.] You can't index into a word like this: unsigned u = 12345; bool b = u[0]; // is u[0] MSB or LSB of u? AFAIK, the discussion about IBM and HP calling the MSB bit "0" is only relevent to documentation.> Really strange.No, it isn't.> Any specific reasons for this ??? Eager to know about this.-- Grant Edwards grante Yow! Is something VIOLENT at going to happen to a visi.com GARBAGE CAN?
Reply by ●November 17, 20062006-11-17
On 2006-11-17, karthikbg <karthik.balaguru@lntinfotech.com> wrote:> It is strange that Endiannes is not dependent on the Bit_Order of a > Byte but only on the Byte_order.[...]> So, Why the Bit_Order has not been taken into consideration ?? > > Really strange. Any specific reasons for this ??? Eager to know about > this.OK, now you're just trolling. -- Grant Edwards grante Yow! ... I'm IMAGINING a at sensuous GIRAFFE, CAVORTING visi.com in the BACK ROOMof a KOSHER DELI --
Reply by ●November 17, 20062006-11-17
larwe wrote:> karthikbg wrote: > > > I find that regardless of what the byte Endian order is, the bits > > within bytes are always in Big-Endian format. > > But, this is in violation to the Endianness concept as little endian > > internally a big-endian. (Bits within Bytes) > > No it is not. Instead of sitting in a Computer Science 101 lecture > playing WiFi games with your friends and verbally masturbating onto > Usenet, look up the definition of big-endian. > > "<data, architecture> A computer architecture in which, > within a given multi-byte numeric representation, the most > significant byte has the lowest address (the word is stored > "big-end-first")."Wow! Have you been eating chocolate covered coffee beans with Moutain Dew for breakfast again? Is it possible that the guy is just trying to work it all out in his head and missed the distinction between bits in the byte and the addressable unit?
Reply by ●November 17, 20062006-11-17
What you don't seem to grasp and no one is explaining to you properly, is that endian-ness is not a function of the bits or the bytes, but of the *addressing*. Most machines can not address bits, so bits are not part of endian-ness. If a machine only addresses words and not bytes, it does not *have* endian-ness in any regard. You are assuming that because a word is written as 00001, the 1 is in the right or least or last position. But this is not what endian-ness is about. It is about how the machine addresses the units. So endian-ness only applies when different sized units are addressed. Is that more clear? karthikbg wrote:> larwe wrote: > > DJ Delorie wrote: > > > > > Sorry, Data General and IBM mainframes have the MSB numbered '0'. > > > > PA-RISC also does this. What a pain in the ass it is, by the way. I > > worked with a chip that was essentially an i486 SoC where the 486 core > > was removed and replaced with a PA-RISC. All the CPU registers and bus > > lines were numbered in the MSB=right-hand convention. All the > > peripherals were numbered in the MSB=left-hand convention. Possibly the > > worst 32-bit micro I have ever used. > > > > However it doesn't alter the fact that "big-endian" vs "little-endian" > > is by definition a discussion of _byte_ order, not _bit_ order. > > It is really strange that Endiannes is not dependent on the Bit_Order > but only on the > Byte_order. > > 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 by ●November 17, 20062006-11-17
On 2006-11-17, David Brown <david@westcontrol.removethisbit.com> wrote:>> [1] There are some processors that can address bits within a >> register with certain instructions. All the ones I've see >> call the LSB bit "0". I've never seen such bit-addressing >> made visible in a high-level language -- except possibly >> PL/M-51 from Intel (I never actually wrote in PL/M-51, and >> have rather vague memories of it). The 8051 had a nifty >> feature where there was a block of memory that was >> bit-addressible. I don't remember if the bit addressing >> was big-endian or little-endian >> >> I have seen documentation (IBM?) where the register >> desriptions label the MSB of a register as bit 0, but >> I've not run into any hardware that works that way. > > Yes, IBM refers to bit 0 as the MSB. Thus if you have a > powerpc device (from IBM or Freescale), and look the pin > numbering, D0 is the MSB of the databus and D31 is the LSB.Is that convention visible to the programmer in any way? IOW, at the assembly language level are there instructions that use an integer "bit index" as an operand? A completely fictitious example where bit "endianess" would be visible: BITSET R0,#0 // Sets MSB of R0 MOV R1,#31 BITCLR R0,R1 // Clars LSB of R0 Off the top of my head, I can think of one CPU that has instructions like that (Hitachi H8), and it's "little-endian" when it comes to bit-ordering (bit 0 is LSB), even though it's "big-endian" when it comes to byte ordering (the most significant byte of a multibyte integeger has the lowest address). -- Grant Edwards grante Yow! We just joined the at civil hair patrol! visi.com
Reply by ●November 17, 20062006-11-17
Grant Edwards wrote:> On 2006-11-17, karthikbg <karthik.balaguru@lntinfotech.com> wrote: > >>> "<data, architecture> A computer architecture in which, >>> within a given multi-byte numeric representation, the most >>> significant byte has the lowest address (the word is stored >>> "big-end-first")." >> But, Why bits of a byte are of Big-Endian type in little-endian ? > > They aren't. You can't address bits[1]. Therefore, talking > about what order they're in is nonsensical. > >> Then, we could stick for Big-endian throughout all designs. >> Any specific reasons for the bits of a byte to be of >> big-endian format !!! Really Strange. Need clarifications >> regarding this. > > I've no idea what you're talking about. Are you referring to > the format that a byte is printed on your terminal? If you > don't like that, print it differently. It's got nothing to do > with "endianness". > > [1] There are some processors that can address bits within a > register with certain instructions. All the ones I've see > call the LSB bit "0". I've never seen such bit-addressing > made visible in a high-level language -- except possibly > PL/M-51 from Intel (I never actually wrote in PL/M-51, and > have rather vague memories of it). The 8051 had a nifty > feature where there was a block of memory that was > bit-addressible. I don't remember if the bit addressing > was big-endian or little-endian > > I have seen documentation (IBM?) where the register > desriptions label the MSB of a register as bit 0, but > I've not run into any hardware that works that way. >Yes, IBM refers to bit 0 as the MSB. Thus if you have a powerpc device (from IBM or Freescale), and look the pin numbering, D0 is the MSB of the databus and D31 is the LSB. It gets more fun with the address bus - if only 24 of the 32 bits are mapped to physical pins, then these are A8 down to A31. And if you really want to confuse yourself, try a 64-bit PPC device - the databus from MSB to LSB is numbered D-32 to D31, and an external 40-bit address bus would be from A-8 to A31.
Reply by ●November 17, 20062006-11-17
karthikbg wrote:> 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 >Little-endian and big-endian come from Lilliput.