Bitcoin Forum
May 21, 2024, 12:15:52 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Emulating OP_CAT  (Read 43 times)
ms21 (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 21, 2024, 05: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?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!