Script Bitcoin represent number > 16 Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I read a script? How does the processor separate “data” from “commands”?Maximum number of op_codes in scriptAny Innovations in altcoin tech for Bitcoin’s Script language?Bitcoin library vs script to develop applicationConvert plaintext script into hex-encoded script in pythonWhy does this script return an error ?Decode Input-Script NumberBitcoin's script expressivityError while sending transaction with script OP_TRUE (Script evaluated without error but finished with a false/empty top stack element)Sending P2SH transaction with non-standard script

How do I mention the quality of my school without bragging

Is there a service that would inform me whenever a new direct route is scheduled from a given airport?

∞ symbol in external pdf disappears when used as figure

Models of set theory where not every set can be linearly ordered

What is the longest distance a 13th-level monk can jump while attacking on the same turn?

What happens to sewage if there is no river near by?

Why was the term "discrete" used in discrete logarithm?

Should I discuss the type of campaign with my players?

What is the correct way to use the pinch test for dehydration?

Antler Helmet: Can it work?

I am not a queen, who am I?

How to bypass password on Windows XP account?

Is the Standard Deduction better than Itemized when both are the same amount?

Is 1 ppb equal to 1 μg/kg?

G-Code for resetting to 100% speed

Java 8 stream max() function argument type Comparator vs Comparable

How discoverable are IPv6 addresses and AAAA names by potential attackers?

Do I really need recursive chmod to restrict access to a folder?

"Seemed to had" is it correct?

How can I make names more distinctive without making them longer?

Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?

The logistics of corpse disposal

3 doors, three guards, one stone

Why did the IBM 650 use bi-quinary?



Script Bitcoin represent number > 16



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How do I read a script? How does the processor separate “data” from “commands”?Maximum number of op_codes in scriptAny Innovations in altcoin tech for Bitcoin’s Script language?Bitcoin library vs script to develop applicationConvert plaintext script into hex-encoded script in pythonWhy does this script return an error ?Decode Input-Script NumberBitcoin's script expressivityError while sending transaction with script OP_TRUE (Script evaluated without error but finished with a false/empty top stack element)Sending P2SH transaction with non-standard script










2















I'm studying Script language, but I don't understand How can I rappresent the number > 16, for instance 210



I want to do a simple sum



OP_10 210 OP_ADD


how I have to represent 210?
I'm trying with OP_PUSHDATA1 without lucky.










share|improve this question




























    2















    I'm studying Script language, but I don't understand How can I rappresent the number > 16, for instance 210



    I want to do a simple sum



    OP_10 210 OP_ADD


    how I have to represent 210?
    I'm trying with OP_PUSHDATA1 without lucky.










    share|improve this question


























      2












      2








      2








      I'm studying Script language, but I don't understand How can I rappresent the number > 16, for instance 210



      I want to do a simple sum



      OP_10 210 OP_ADD


      how I have to represent 210?
      I'm trying with OP_PUSHDATA1 without lucky.










      share|improve this question
















      I'm studying Script language, but I don't understand How can I rappresent the number > 16, for instance 210



      I want to do a simple sum



      OP_10 210 OP_ADD


      how I have to represent 210?
      I'm trying with OP_PUSHDATA1 without lucky.







      transactions development script






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 12 at 2:20









      G. Maxwell

      5,3862839




      5,3862839










      asked Apr 11 at 16:11









      monkeyUsermonkeyUser

      1637




      1637




















          2 Answers
          2






          active

          oldest

          votes


















          3














          You only need to use OP_PUSHDATA1 if you are trying to push more than 75 bytes of data onto the stack.



          For pushing smaller sized values onto the stack, you can use the opcodes 0x01 to 0x4b to indicate the number of bytes being pushed. Thus, to push a single byte of value 210 (0xD2) onto the stack, you would use the byte sequence 0x01 0xd2.



          To push a 16-bit number, such as 1000 onto the stack, you would use the sequence of bytes 0x02 0xe8 0x03. Note that little-endian byte ordering is used. You can do similarly for a 24-bit number, or 32-bit number.



          The minimum size should always be used when pushing a value - meaning the most significant byte of the pushed value should never be zero.



          The value pushed will internally be zero-extended to a represent a 32-bit signed integer. All of the numeric operations in bitcoin script are limited to 32-bit integers. The result returned by a numeric operation can be treated as a signed 64-bit value, but values which overflow the 32-bit integer range may not be used in subsequent numeric operation.




          On OP_PUSHDATA1, this is used for pushing arbitrary binary data onto the stack which may be used as arguments for operations such as OP_SHA256. This works by having the first byte of the sequence being OP_PUSHDATA1, the second byte being the length of the pushed data, and the remaining bytes being the content. For data more than 255 bytes, OP_PUSHDATA2 is used, where the second and third bytes of the sequence represent the length, and so on. The minimum size rule applies to all of the kinds of pushes, including that you should not try to push a single byte <=16 onto the stack using 2 bytes, but should instead use the OP_N single-byte opcodes.






          share|improve this answer























          • Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

            – monkeyUser
            13 hours ago



















          1














          To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:



          OP_10 0x01 210 OP_ADD
          ^ ^ ^ ^
          | | | | pop the top 2 items, add, and return result
          | | | Push number 210 to the stack
          | | The next 1 byte is pushed to the stack
          | Push 10 to the stack


          See https://en.bitcoin.it/wiki/Script#Constants






          share|improve this answer

























          • thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

            – monkeyUser
            16 hours ago












          • And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

            – monkeyUser
            16 hours ago












          • Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

            – JBaczuk
            14 hours ago












          • Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

            – monkeyUser
            13 hours ago











          • Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

            – JBaczuk
            13 hours ago












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "308"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f85989%2fscript-bitcoin-represent-number-16%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          You only need to use OP_PUSHDATA1 if you are trying to push more than 75 bytes of data onto the stack.



          For pushing smaller sized values onto the stack, you can use the opcodes 0x01 to 0x4b to indicate the number of bytes being pushed. Thus, to push a single byte of value 210 (0xD2) onto the stack, you would use the byte sequence 0x01 0xd2.



          To push a 16-bit number, such as 1000 onto the stack, you would use the sequence of bytes 0x02 0xe8 0x03. Note that little-endian byte ordering is used. You can do similarly for a 24-bit number, or 32-bit number.



          The minimum size should always be used when pushing a value - meaning the most significant byte of the pushed value should never be zero.



          The value pushed will internally be zero-extended to a represent a 32-bit signed integer. All of the numeric operations in bitcoin script are limited to 32-bit integers. The result returned by a numeric operation can be treated as a signed 64-bit value, but values which overflow the 32-bit integer range may not be used in subsequent numeric operation.




          On OP_PUSHDATA1, this is used for pushing arbitrary binary data onto the stack which may be used as arguments for operations such as OP_SHA256. This works by having the first byte of the sequence being OP_PUSHDATA1, the second byte being the length of the pushed data, and the remaining bytes being the content. For data more than 255 bytes, OP_PUSHDATA2 is used, where the second and third bytes of the sequence represent the length, and so on. The minimum size rule applies to all of the kinds of pushes, including that you should not try to push a single byte <=16 onto the stack using 2 bytes, but should instead use the OP_N single-byte opcodes.






          share|improve this answer























          • Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

            – monkeyUser
            13 hours ago
















          3














          You only need to use OP_PUSHDATA1 if you are trying to push more than 75 bytes of data onto the stack.



          For pushing smaller sized values onto the stack, you can use the opcodes 0x01 to 0x4b to indicate the number of bytes being pushed. Thus, to push a single byte of value 210 (0xD2) onto the stack, you would use the byte sequence 0x01 0xd2.



          To push a 16-bit number, such as 1000 onto the stack, you would use the sequence of bytes 0x02 0xe8 0x03. Note that little-endian byte ordering is used. You can do similarly for a 24-bit number, or 32-bit number.



          The minimum size should always be used when pushing a value - meaning the most significant byte of the pushed value should never be zero.



          The value pushed will internally be zero-extended to a represent a 32-bit signed integer. All of the numeric operations in bitcoin script are limited to 32-bit integers. The result returned by a numeric operation can be treated as a signed 64-bit value, but values which overflow the 32-bit integer range may not be used in subsequent numeric operation.




          On OP_PUSHDATA1, this is used for pushing arbitrary binary data onto the stack which may be used as arguments for operations such as OP_SHA256. This works by having the first byte of the sequence being OP_PUSHDATA1, the second byte being the length of the pushed data, and the remaining bytes being the content. For data more than 255 bytes, OP_PUSHDATA2 is used, where the second and third bytes of the sequence represent the length, and so on. The minimum size rule applies to all of the kinds of pushes, including that you should not try to push a single byte <=16 onto the stack using 2 bytes, but should instead use the OP_N single-byte opcodes.






          share|improve this answer























          • Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

            – monkeyUser
            13 hours ago














          3












          3








          3







          You only need to use OP_PUSHDATA1 if you are trying to push more than 75 bytes of data onto the stack.



          For pushing smaller sized values onto the stack, you can use the opcodes 0x01 to 0x4b to indicate the number of bytes being pushed. Thus, to push a single byte of value 210 (0xD2) onto the stack, you would use the byte sequence 0x01 0xd2.



          To push a 16-bit number, such as 1000 onto the stack, you would use the sequence of bytes 0x02 0xe8 0x03. Note that little-endian byte ordering is used. You can do similarly for a 24-bit number, or 32-bit number.



          The minimum size should always be used when pushing a value - meaning the most significant byte of the pushed value should never be zero.



          The value pushed will internally be zero-extended to a represent a 32-bit signed integer. All of the numeric operations in bitcoin script are limited to 32-bit integers. The result returned by a numeric operation can be treated as a signed 64-bit value, but values which overflow the 32-bit integer range may not be used in subsequent numeric operation.




          On OP_PUSHDATA1, this is used for pushing arbitrary binary data onto the stack which may be used as arguments for operations such as OP_SHA256. This works by having the first byte of the sequence being OP_PUSHDATA1, the second byte being the length of the pushed data, and the remaining bytes being the content. For data more than 255 bytes, OP_PUSHDATA2 is used, where the second and third bytes of the sequence represent the length, and so on. The minimum size rule applies to all of the kinds of pushes, including that you should not try to push a single byte <=16 onto the stack using 2 bytes, but should instead use the OP_N single-byte opcodes.






          share|improve this answer













          You only need to use OP_PUSHDATA1 if you are trying to push more than 75 bytes of data onto the stack.



          For pushing smaller sized values onto the stack, you can use the opcodes 0x01 to 0x4b to indicate the number of bytes being pushed. Thus, to push a single byte of value 210 (0xD2) onto the stack, you would use the byte sequence 0x01 0xd2.



          To push a 16-bit number, such as 1000 onto the stack, you would use the sequence of bytes 0x02 0xe8 0x03. Note that little-endian byte ordering is used. You can do similarly for a 24-bit number, or 32-bit number.



          The minimum size should always be used when pushing a value - meaning the most significant byte of the pushed value should never be zero.



          The value pushed will internally be zero-extended to a represent a 32-bit signed integer. All of the numeric operations in bitcoin script are limited to 32-bit integers. The result returned by a numeric operation can be treated as a signed 64-bit value, but values which overflow the 32-bit integer range may not be used in subsequent numeric operation.




          On OP_PUSHDATA1, this is used for pushing arbitrary binary data onto the stack which may be used as arguments for operations such as OP_SHA256. This works by having the first byte of the sequence being OP_PUSHDATA1, the second byte being the length of the pushed data, and the remaining bytes being the content. For data more than 255 bytes, OP_PUSHDATA2 is used, where the second and third bytes of the sequence represent the length, and so on. The minimum size rule applies to all of the kinds of pushes, including that you should not try to push a single byte <=16 onto the stack using 2 bytes, but should instead use the OP_N single-byte opcodes.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 11 at 17:12









          Mark HMark H

          1,01419




          1,01419












          • Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

            – monkeyUser
            13 hours ago


















          • Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

            – monkeyUser
            13 hours ago

















          Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

          – monkeyUser
          13 hours ago






          Thanks for your reply. I want to replicate 10+120=130. With your suggestions my script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL. But how can I replicate in hex or asm?

          – monkeyUser
          13 hours ago












          1














          To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:



          OP_10 0x01 210 OP_ADD
          ^ ^ ^ ^
          | | | | pop the top 2 items, add, and return result
          | | | Push number 210 to the stack
          | | The next 1 byte is pushed to the stack
          | Push 10 to the stack


          See https://en.bitcoin.it/wiki/Script#Constants






          share|improve this answer

























          • thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

            – monkeyUser
            16 hours ago












          • And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

            – monkeyUser
            16 hours ago












          • Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

            – JBaczuk
            14 hours ago












          • Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

            – monkeyUser
            13 hours ago











          • Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

            – JBaczuk
            13 hours ago
















          1














          To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:



          OP_10 0x01 210 OP_ADD
          ^ ^ ^ ^
          | | | | pop the top 2 items, add, and return result
          | | | Push number 210 to the stack
          | | The next 1 byte is pushed to the stack
          | Push 10 to the stack


          See https://en.bitcoin.it/wiki/Script#Constants






          share|improve this answer

























          • thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

            – monkeyUser
            16 hours ago












          • And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

            – monkeyUser
            16 hours ago












          • Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

            – JBaczuk
            14 hours ago












          • Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

            – monkeyUser
            13 hours ago











          • Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

            – JBaczuk
            13 hours ago














          1












          1








          1







          To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:



          OP_10 0x01 210 OP_ADD
          ^ ^ ^ ^
          | | | | pop the top 2 items, add, and return result
          | | | Push number 210 to the stack
          | | The next 1 byte is pushed to the stack
          | Push 10 to the stack


          See https://en.bitcoin.it/wiki/Script#Constants






          share|improve this answer















          To push data to the stack, if there is no opcode (i.e. there is no opcode for the number 210, but there are for the numbers 1-16: OP_1 - OP_16), you need to provide a push op. Since 210 can be represented in a single byte:



          OP_10 0x01 210 OP_ADD
          ^ ^ ^ ^
          | | | | pop the top 2 items, add, and return result
          | | | Push number 210 to the stack
          | | The next 1 byte is pushed to the stack
          | Push 10 to the stack


          See https://en.bitcoin.it/wiki/Script#Constants







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 12 at 0:26

























          answered Apr 11 at 17:10









          JBaczukJBaczuk

          4,8741322




          4,8741322












          • thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

            – monkeyUser
            16 hours ago












          • And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

            – monkeyUser
            16 hours ago












          • Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

            – JBaczuk
            14 hours ago












          • Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

            – monkeyUser
            13 hours ago











          • Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

            – JBaczuk
            13 hours ago


















          • thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

            – monkeyUser
            16 hours ago












          • And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

            – monkeyUser
            16 hours ago












          • Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

            – JBaczuk
            14 hours ago












          • Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

            – monkeyUser
            13 hours ago











          • Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

            – JBaczuk
            13 hours ago

















          thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

          – monkeyUser
          16 hours ago






          thanks for reply, but I don't understand a little thing. If i want to do 10+210, my Script is OP_10 0x02 0xD200 OP_ADD. Instead if I want to do 10+130, my script is OP_10 0x02 0x8200 OP_ADD why? I'm using this IDE for my tests ide.bitauth.com

          – monkeyUser
          16 hours ago














          And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

          – monkeyUser
          16 hours ago






          And again, If I want to 10+120=130, in Script is OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL and asm is 010A01789302820087 Can I test this in IDE online?

          – monkeyUser
          16 hours ago














          Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

          – JBaczuk
          14 hours ago






          Those scripts look correct, what do you not understand? 0xD200 is 2-byte little endian form of 210 and 0x8200 is little endian form of 130. I don't know if there is an online ide, I'm working on one, so I'll let you know when it's ready. You can also try btcdeb at GitHub.com/kallewoof/btcdeb

          – JBaczuk
          14 hours ago














          Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

          – monkeyUser
          13 hours ago





          Yes it is correct, I try on ide.bitauth.com. then every number is in hex and in little endian? with btcdeb, I try with ´btcc OP_10 0x01 0x78 OP_ADD 0x02 0x8200 OP_EQUAL`. Im in confusion. I'd like to know how the operation 10+120=130 is rapresent in asm and hex, and where can I try it. thanks :)

          – monkeyUser
          13 hours ago













          Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

          – JBaczuk
          13 hours ago






          Sorry maybe i don't understand your question, you already have it in ASM, to convert to hex, just look up the code for each word: en.bitcoin.it/wiki/Script

          – JBaczuk
          13 hours ago


















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Bitcoin Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f85989%2fscript-bitcoin-represent-number-16%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Sum ergo cogito? 1 nng

          419 nièngy_Soadمي 19bal1.5o_g

          Queiggey Chernihivv 9NnOo i Zw X QqKk LpB