2 2 OP_MUL 3 3 OP_MUL OP_ADD
the IDE is a great tool
My code
3 3 OP_MUL 2 2 OP_MUL OP_ADD
Result is: 0xD.
If my memory does not fails me, i should go FILO, so 1st operator is the 3x3 operation then 2x2 and then summatory. The result is on hexadecimal, so 0xD = 13.
PD: in the wiki it says operators for multiply and division are disabled, it means you cannot do this kind of operations on the mainnet right? why is that?
2 2 op_mul
3 3 op_mul
op_add
or (playing around)
2 4 op_mul
4 5 op_mul
op_max
10 10 op_add
op_sub
1 op_negate
op_add
op_negate
2 2 OP_MUL 3 3 OP_MUL OP_ADD (in the script bar)
Then proceed to click the “step” button in the Bitcoin IDE until each calculation has been made which leaves in the stack:
OxD
answer: 2 2 OP_MUL 3 3 OP_MUL OP_ADD
3 3 OP_MUL (9)
2 2 OP_MUL (4)
OP_ADD (4 + 9)
= 0xD (13)
Here’s my ‘Stack Programming Assignment’ answer.
Put the following to the stack: 2 2 OP_MUL 3 3 OP_MUL OP_ADD
And then run, to give the result of 0xD (13 in hexadecimal) as the single element remaining on the stack.
Stack programming assignment code:
2 2 op_mul 3 3 op_mul op_add
returns 13 decimal (0xD hexidecimal)
2 2 op_mul
3 3 op_mul
op_add
return 0xD (not sure what D means, but looking at others’ answers it’s 13 in hexadecimal)
2 2 OP_MUL 3 3 OP-MUL OP_ADD
Thanks for all who posted the link to BTC IDE!
I got
2 2 Op_Mul 3 3 Op_Mul Op_Add
I keep getting 0xD not 13? Is 0xD correct? If so why?
I just got an education on hexadecimals via wikipedia. Thank you to everyone who has gone before me on this. I did it correctly, D is the hexadecimal for 13.
Hi there
2 2 OP_MUL 3 3 OP_MUL OP_ADD
Answer:
2 2 OP_MUL 3 3 OP_MUL OP_ADD
This is what I got : 2 2 OP_MUL 3 3 OP_MUL OP_ADD
Result : 0xD
Answer: 2 2 op_mul 3 3 op_mul op_add
Also for fun: 2 op_dup op_mul 3 op_dup op_mul op_add
OxD is hexadecimal (or base 16) for 13. In Hexadecimal counting it would go 8…9…A…B…C…D…E…F
and then 10 would be 16 in our standard base 10.
Here is a website to give you a better understanding for Hexadecimal numbers, Math Is Fun.
Carlos Z.
Answer
2 2 OP_MUL 3 3 OP_MUL OP_ADD
Not showing or seeing any Stack Programming Assignment - There is no assignment posted on that lesson page