# How much gas will be needed to evaluate this expression 5 * 2 + 4 -3 ? (Take the help of ethereum opcode gas cost list.)

Created by Kshitij about a year ago

No description provided

## 15 Comments

This question was confusing.

Please correct the expression. When we see this: (- 5 * 2 + 4 -3 ?) -> It seems like first one is Minus symbol make it (5 * 2 + 4 -3 ?) -> Here minus not included because it's not minus. Please change it. Creating confusion.

"5"3"3"0 TOTAL = 11

There is no confusion it's very clear

question is not clear

I am unable to find the slides used in lecture (only 1 mentioned in resource is of Solidity), I would appreciate if anyone could tell me where do I find the same. Thank you.

This content was deleted by the author

For those who find this question confusing š¤ We don't have to evaluate the expression, meaning we don't have to multiply, add and then subtract the given values ā (5 * 2 + 4 -3) = ____

Instead, we have to calculate the gas for the given operators i.e. multiply() has a gas value, add(+) has a gas value and subtract(-) has a gas value. We have to calculate the total gas value required for the above mentioned expression. āļø ( * ) ā ( + ) ā ( - ) = ____

guys the Gas will use an expression command don't be confused here in maths just open the opcode and see the Gas cost on "*" + "+" + "-" which is in our question 5 "*" 2 "+" 4 "-" 3 so the answer is 5(*)+3(+)+3(-)=11 is your answer

sir then ,gas for equal sign..?

but which party is this gas fees paid to

Check current gas price on https://ethgasstation.info