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 0 to 10.

Endianness does not apply to byte - karthikbg - 05:37 17-11-06

Hi,

I find that regardless of what the byte Endian order is, the bits
within
bytes are always in Big-Endian format.

For instance, 1 is always stored in a byte as 000000012 no matter what
platform.

But, this is in violation to the Endianness concept as little endian
internally a big-endian. (Bits within Bytes)

So, this implies that Big-Endian is the better concept and why did they
introduce this little-endian ?

Strange !!! :(

Thx in advans,
Karthik Balaguru




Re: Endianness does not apply to byte - Richard Pennington - 06:11 17-11-06

karthikbg wrote:
> Hi,
> 
> I find that regardless of what the byte Endian order is, the bits
> within
> bytes are always in Big-Endian format.
> 
> For instance, 1 is always stored in a byte as 000000012 no matter what
> platform.
> 
> But, this is in violation to the Endianness concept as little endian
> internally a big-endian. (Bits within Bytes)
> 
> So, this implies that Big-Endian is the better concept and why did they
> introduce this little-endian ?
> 
> Strange !!! :(
> 
> Thx in advans,
> Karthik Balaguru
> 

How can you tell the endianess of a byte if a byte is the smallest 
addressable unit of memory? I don't think you can.

I think the endianess of the smallest unit of memory is unknowable to 
the processor. In fact the processor couldn't detect how the memory is 
wired for the smallest addressable unit, i.e. it can't tell if d0 is 
connected to d0 or d8 of the memory chip. Nor does it care.

Fun to think about, though. ;-)

-Rich

Re: Endianness does not apply to byte - larwe - 07:41 17-11-06

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


Re: Endianness does not apply to byte - 09:15 17-11-06

"karthikbg" <k...@lntinfotech.com> writes:
> I find that regardless of what the byte Endian order is, the bits
> within bytes are always in Big-Endian format.

Sorry, Data General and IBM mainframes have the MSB numbered '0'.

And GCC also has a setting for whether bits are big or little endian;
it determines which end of a byte bitfields are allocated at.
I.e:

        struct {
          int i1:3;
          int i2:3;
          int i3:2;
        } foo;

Which bits are for i1?

Re: Endianness does not apply to byte - NewsGroup - 09:50 17-11-06

"karthikbg" <k...@lntinfotech.com> wrote in message 
news:1...@e3g2000cwe.googlegroups.com...
> Hi,
>
> So, this implies that Big-Endian is the better concept and why did they
> introduce this little-endian ?
>
> Strange !!! :(

Little endian make perfect sense when you have a processor that can handle 
multiple variable sizes such as the 80386.

On a 80386 you would declare your variable as

Var    DW    1234h,5678h

And access it as
    mov    al,Var    ;    byte size access
or
    mov    ax,Var    ;   word
or
    mov    eax,Var  ;   long word

if it had have been big endian then the same code would be
    mov    al,Var+3
    mov    ax,Var+2
    mov    eax,Var
Yuk.
So, little endian wins in my book.

But then again, it's been a long time since I worked in assembler. I might 
have even mixed up processors above!!

Mike. 



Re: Endianness does not apply to byte - karthikbg - 09:53 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")."

But, Why bits of a byte are of Big-Endian type in little-endian ?
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.

Thx in advans,
Karthik Balaguru


Re: Endianness does not apply to byte - larwe - 09:56 17-11-06

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.


Re: Endianness does not apply to byte - Paul Burke - 10:06 17-11-06

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!

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

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 - 10:25 17-11-06

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.
    
-- 
Grant Edwards                   grante             Yow!  If our behavior is
                                  at               strict, we do not need fun!
                               visi.com            

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