Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | Endianness does not apply to byte

There are 92 messages in this thread.

You are currently looking at messages 10 to 20.

Re: Endianness does not apply to byte - karthikbg - 10:33 17-11-06

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




Re: Endianness does not apply to Bits in Byte - Why ? Strange !! - karthikbg - 10:35 17-11-06

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


Re: Endianness does not apply to byte - toby - 10:38 17-11-06

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.


Re: Endianness does not apply to Bits in Byte - Why ? Strange !! - Grant Edwards - 10:45 17-11-06

On 2006-11-17, karthikbg <k...@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?

Re: Endianness does not apply to byte - Grant Edwards - 10:46 17-11-06

On 2006-11-17, karthikbg <k...@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 --

Re: Endianness does not apply to byte - rickman - 11:19 17-11-06

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?


Re: Endianness does not apply to Bits in Byte - Why ? Strange !! - rickman - 11:27 17-11-06

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


Re: Endianness does not apply to byte - Grant Edwards - 11:28 17-11-06

On 2006-11-17, David Brown <d...@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            

Re: Endianness does not apply to byte - David Brown - 11:30 17-11-06

Grant Edwards wrote:
> On 2006-11-17, karthikbg <k...@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.

Re: Endianness does not apply to Bits in Byte - Why ? Strange !! - David Brown - 11:30 17-11-06

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.

previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next