Bitcoin Forum
June 18, 2024, 06:15:14 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Emulating OP_CAT on: January 21, 2024, 05:55:31 PM
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?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!