Endian???

Discussion in 'Homework Help' started by mnunez021, Mar 29, 2009.

  1. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    Big Endian
    Location Contents (Byte)
    20:
     
    Last edited: May 19, 2009
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    What answers have you got?

    There are many sources of information on the internet that can help you answer this question. Google is a terrific tool for the purpose.

    hgmjr
     
  3. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    Big Endian
    Location Contents (Byte)
     
    Last edited: May 19, 2009
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Did you run across this presentation on "endianness" in Wikipedia?

    hgmjr
     
  5. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    yes and still made no sense... i even saw an example 1234567 stored in 0 ans still made no sense
     
  6. Ratch

    New Member

    Mar 20, 2007
    1,068
    3
    mnunez021,

    Big endian used in Motorola micros
    Location Contents (Byte)
    20: 00
    21: 00
    22: 08 hex
    23: 01 hex

    Little endian used by Intel micros.
    Location Contents (Byte)
    20: 01 hex
    21: 08 hex
    22: 00
    23: 00

    Endian describes the way a word is stored in memory. As a programmer, you usually don't have to worry too much about it unless you address a partial word with a byte instruction. Intel reverses the bytes, but not the bits within the bytes.

    Ratch
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214

    [​IMG]


    This figure from Wikipedia appears to spell out the technique fairly clearly.

    Are you still confused?

    hgmjr
     
    Last edited: Mar 29, 2009
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Do you see what you overlooked in your first attempt?

    hgmjr
     
  9. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    Big Endian
     
    Last edited: May 19, 2009
  10. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    Big Endian
    L
     
    Last edited: May 19, 2009
  11. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Sorry. The answer is incorrect. Keep in mind that the value as stated in the problem is expressed as a decimal value. You will need to do a bit of converting first before you tackle dealing with the endianness.

    hgmjr
     
  12. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    would i have to covert it to binary?
     
  13. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Yes. You may recall from your studies that memory contains values expressed in binary. Hexadecimal notation is commonly used when expressing 8-bit values so I would suggest you consider taking that conversion as your first step. Did your instructor mention that you would be dealing with hexadecimal values when this problem was assigned?

    hgmjr
     
  14. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    no and the section covers very little
     
  15. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Are you familiar with hexadecimal notation at all?

    hgmjr
     
  16. mnunez021

    Thread Starter Member

    Feb 27, 2009
    18
    0
    yes i am. i even have a cal just in cause
     
  17. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Then go ahead and convert it and then use that number in place of the number you used in reply #3. I think that will get you where you need to be.

    hgmjr