Skip to content

Commit

Permalink
better explanation about how u256 is stored
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Sep 20, 2023
1 parent 09ece5b commit 1863515
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/book/src/reference/solidity_differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The underlying virtual machine targeted by Sway is the FuelVM, specified [here](

## Word Size

Words in the FuelVM are 64 bits (8 bytes), rather than the 256 bits (32 bytes) of the EVM. Therefore, all primitive integers smaller and including `u64` are stored in registers; and hashes (the `b256` type) are not stored in registers but rather in memory. A `b256` is therefore a pointer to a 32-byte memory region containing the hash value.
Words in the FuelVM are 64 bits (8 bytes), rather than the 256 bits (32 bytes) of the EVM. Therefore, all primitive integers smaller and including `u64` are stored in registers; `u256`, being bigger than the registers, and hashes (the `b256` type) are not stored in registers but rather in memory. They are therefore pointers to a 32-byte memory region containing the their data.

## Unsigned Integers Only

Expand Down

0 comments on commit 1863515

Please sign in to comment.