Author

Topic: Emulating OP_CAT (Read 41 times)

newbie
Activity: 1
Merit: 0
January 21, 2024, 01:55:31 PM
#1
I understand that it's possible to emulate concatenation for up to 32 bits by calculating:

x + y = x + (y << len(x)),

where the left shift (L_SHIFT) can be performed through multiple consecutive operations of OP_DUP and OP_ADD.

However, this method becomes ineffective once the 32-bit limit is reached, which is the ceiling for arithmetic operations conducted on the stack.

One alternative to circumvent this limitation might be to extend the operation to multiple 32-bit segments and incorporate a carry bit or a similar mechanism.

Is there another feasible method? If not, could you explain why?
Jump to: