Chip Designing for ASIC/ FPGA Design engineers and Students
Digital-logic Design... Dream for many students… start learning front-end…
In digital computing, the location of memory which is set aside for holding data temporarily can be called as Stack. The order in which data is retrieved from stack is Last In First Out (LIFO) method.
LIFO:- It’s a method in which the last data entry written in stack is the first entry retrieved during read.
Stack Pointer :- The pointer which track’s the location of stack memory to write or read data from is know as Stack Pointer (SP)
PUSH and POP :- The operation of inserting a value in stack is called PUSH. On the contrary, the operation of retrieving a value is called POP.
In digital design, the stack can be implemented as a memory location or as a set of registers.
REVERSE POLISH NOTATION (RPN)
Different ways of representing an arithmetic expression is shown below.
A * B - Inflix notation, most common.
*AB - Polish Notation. Operator is placed before the operands.
AB* - Reverse Polish Notation. Operator is placed after the operand.
In RPN digital operations the expressions are operated from left to write and evaluated in accordance with operator precedence.
Role of stack in RPN digital:
During the procedure of conversion of arithmetic expressions into RPN, the operands are pushed into the stack in order of processing.
Examples of evaluating a reverse polish expression.
Equivalent arithmetic expression:-
Step 1:- (A*B)C+ .>> Step 2:- (A*B) + C
Next we are going to explain RPN digital for evaluating arithmetic equations.