Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit b527c18

Browse files
committed
docs(Bytes): use padding instead of endianness
1 parent f44fe3b commit b527c18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/bytes/Bytes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
The `Bytes` library has functions for working with bytes.
1818

19-
#### Bytes, strings, numbers and endianness in Ethereum
19+
#### Bytes, strings, numbers and padding in Ethereum
2020

21-
Ethereum uses the big endian format when working with strings/bytes, and little endian when working with other types (such as numbers and addresses). As an example, this is how we would store the string "abcd" in one full word (32 bytes):
21+
In Ethereum, strings and bytes are padded on the lower-order (right) side with zero-bytes, while other types (such as numbers and addresses) are padded on the higher-order side. As an example, this is how we would store the string "abcd" in one full word (32 bytes):
2222

2323
`0x6162636400000000000000000000000000000000000000000000000000000000`
2424

@@ -96,4 +96,4 @@ What is the value of `b` after this code has been run?
9696

9797
The value will be `0`, but the internal representation would be `0x0000000000000000000000000000000000000000000000000000000000000054`, which lies outside of the allowed range so it is technically invalid.
9898

99-
Finally, these sections deal with bytes in memory and on the stack. For bytes packed in storage, things can be different.
99+
Finally, these sections deal with bytes in memory and on the stack. For bytes packed in storage, things can be different.

0 commit comments

Comments
 (0)