Script - Bitcoin Programming Discussion

Assignment Solution:

3 3 OP_MUL 2 2 OP_MUL OP_ADD
1 Like

2 2 op_mul 3 3 op_mul op_add

1 Like

Assignment Answer:

  1. 2 2 OP_MUL
  2. 3 3 OP_MUL
  3. OP_ADD

*I understood the assignment, but I’m a little confused why BitcoinIDE shows the execution 0xD, shouldn’t it show 13?

0xD is 13 in HEX. :slight_smile:

1 Like

Thankyou! https://www.wikihow.com/Understand-Hexadecimal
Here’s a link for anyone that’s doesn’t understand HEX, the video helped me. :sweat_smile:

4 Likes

2 2 op_mul 3 3 op_mul op_add

3 Likes

The answer ist the following.

2 2 OP_MUL 3 3 OP_MUL OP_ADD

3 Likes

The code for [(2x2)+(3x3)] is as follows:
2 2 op_mul 3 3 op_mul op_add

4 Likes

2 2 op_mul 3 3 op_mul op_add

2 Likes

Answer:
2 2 OP_MUL 3 3 OP_MUL OP_ADD

3 Likes

Answer: 3 3 OP_MUL 2 2 OP_MUL OP_ADD

2 Likes

Answer
2 2 OP_MUL 3 3 OP_ADD OP_ ADD

3 Likes

2 2 op_mult 3 3 op_mult op_add

2 Likes

Answer
2 2 OP_MUL 3 3 OP_MUL OP_ADD

3 Likes

(2x2) + (3x3) = 2 2 OP_MUL 3 3 OP_MUL OP_ADD

3 Likes

Assignment exercise:
2 2 op_mul 3 3 op_mul op_add

3 Likes

Assignment Answer ! Bitcoin IDE :

2 2 OP_MUL 3 3 OP_MUL op_ADD

2 Likes

Answer : 2 2 OP_MUL
3 3 OP_MUL OP_ADD

2 Likes

Assignment Answer

2 2 OP_MUL 3 OP_ADD 3 OP_ MUL

1 Like

This would not give the correct result. The program would execute 2 * 2 (= 4), then add 3 which would result in 7 and then multiply with 3. The formula would end up being (2 * 2 + 3) * 3.

You are close, try again :wink:

1 Like