3

for example, I have these opcodes:

PUSH60
PUSH40
SUB

for sub operations, I believe that the second stack item is subtracted from the first stack item (60 - 40) which would equal to -20 being the new first stack item. I know this would be stored as hexadecimal, but does the stack store negative numbers? Thanks

1 Answer 1

2

Found it, sorry was quite simple, it would be stored as uint, as -20 modular (%) 2^256

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.