Question: use 8086 assembly language and write comments Q.10. Suppose an infix equation is presented as (3+4) x (5+6). If this infix equation is presented in
use 8086 assembly language and write comments
Q.10. Suppose an infix equation is presented as (3+4) x (5+6). If this infix equation is presented in postfix notation, it will be ((3 4) + (5 6) +) x. You are required to compute the same postfix notation using stack as presented below by writing 8086 assembly code. (Marks 20)
| Operation |
|
| + |
| + | x |
|
|
|
|
|
|
| 6 |
|
|
|
|
| 4 |
| 5 | 5 | 11 |
|
|
| 3 | 3 | 7 | 7 | 7 | 7 | 77 |
|
| Stack | Stack | Stack | Stack | Stack | Stack | Stack |
Sample Execution:
Enter the postfix notation of the given equation: 3 4 + 5 6 + x
The answer to the equation is 77
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
