Skip to content

Endianness section is wrong/misleading #54

@roshanrags

Description

@roshanrags

Bytes.md has a section which says "Ethereum uses the big endian format when working with strings/bytes, and little endian when working with other types (such as numbers and addresses)." and proceeds to give examples of the same, but it doesn't match conventional use of the term endianness.

  • A 32-byte number 0x61626364 in little endian format would be represented as 0x64636261000..., the example given is actually the big endian representation.
  • (Minor nitpick) Endianness is usually specified for multibyte values while UTF-8 strings are usually considered an array of single byte values. Don't think it is the right term to use for strings.

I'm not sure if there's an ideal term for what its trying to demonstrate (something around padding maybe?), perhaps someone more knowledgeable can chime in here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions