What is Reverse Polish Notation (AKA Postfix Notation)? Why is it Important?

  Рет қаралды 6,426

Gary Explains

Gary Explains

Күн бұрын

Пікірлер: 31
@shanehebert396
@shanehebert396 9 ай бұрын
Back when I was in engineering school, HP calculators were the rage. The HP-28C was released but I couldn't afford one then. When the -28S was released, I saved up my money and bought one and was very happy with it... but then the -48SX was released just a couple months after I got the -28S. Luckily for me, HP had a trade-in program so I got the -48SX. It has been a good calculator. It still sits on my desk and I use it occasionally to this day. I remember writing all kinds of programs for it... teachers usually had the stance of "if you can write a program to do it, you probably understand the problem well enough".
@akarimsiddiqui7572
@akarimsiddiqui7572 8 ай бұрын
That's a good attitude from teachers
@jeraldgooch6438
@jeraldgooch6438 9 ай бұрын
HP introduced the HP35 as the “ electronic slide rule” in about ‘73, while is was studying engineering. With much scrimping and saving I was able to buy on late that year. The RPN was diff at first but very soon became second nature. That device made a huge difference in that I was more able to focus on understanding the material rather than the mechanics of the computations. Thanks for the video!
@dono42
@dono42 9 ай бұрын
When I was in high school in the mid 90s I had a HP48G calculator. It was RPN, which quickly became my preference. I still have it today.
@antinatalope
@antinatalope 9 ай бұрын
Can't program in forth without RPN. And considering forth is one of the three best languages to work in, I'm super grateful for it.
@Louise-b9k
@Louise-b9k 9 ай бұрын
I first came across RPN back in the early 80;s when I had a fig-Forth implementation on my Dragon 32 computer. The 6809 was a great processor for running RPN as it had SSP & USP as well as X & Y index registers...... Happy days
@jk-mm5to
@jk-mm5to 9 ай бұрын
Still have my HP 48 and I love Droid 48. Rpl is an easy stack language.
@G4GUO
@G4GUO 9 ай бұрын
My first computer was a Wireless World Comp 80 kit which used BURP (Basic Using Reverse Polish).
@randreas69
@randreas69 9 ай бұрын
Got myself the HP-48 SX at school. The Droid48 app for Androids gets my friends a chuckle, "oh you're on top of things"..
@petermainwaringsx
@petermainwaringsx 9 ай бұрын
I must try that for the nostalga.
@randreas69
@randreas69 9 ай бұрын
@@petermainwaringsx Not only my life my everything, uh I'll add to it the nostalgia. My real machine got overheated by all the example files. I've made two fractals per battery change.
@SurfinScientist
@SurfinScientist 9 ай бұрын
That is why HP used to have RPN calculators.
@johng7rwf419
@johng7rwf419 9 ай бұрын
Used RPN when I wrote Forth programs for safety systems in the 1980's...
@lv_woodturner3899
@lv_woodturner3899 9 ай бұрын
I have an HP 32SII which may be almost 30 years old. It is now my the calculator I use in my shop. It took awhile to get used to HP's RPN but once learned, it was easy to use. No parenthesis. This was an interesting explanation of RPN. I did not know the terms Infix or Postfix before so a lot to be learnt in this video.
@mrhickman53
@mrhickman53 9 ай бұрын
While I had gotten through college with a slide rule I receive a Sinclair calculator from my younger brother who could not abide by Reverse Polish Notation RPN. However, I was sold immediately. A few years later, when I obtained my first computer with the CPM operating system I purchased an interpreter for SL5, a dialect of Forth, which is a computer language built around RPN. Forth dominated my next 10-15 years of programming. Even today, I use the GNU Galculator in RPN mode. Fossils like me will pass on eventually, leaving the world to the infix crowd. The primary drawback of postfix, or RPN, is the software writer must pay attention to the order of the parameters pushed to the stack. A lot of POP, SWAP and ROTATE actions are in one's future if the order of pushing is not carefully considered.
@GaryExplains
@GaryExplains 9 ай бұрын
That is what the shunting yard algorithm deals with very neatly.
@Chalisque
@Chalisque 9 ай бұрын
In some sense, postfix is how a CPU evaluates things. Consider load r1, [100] load r2,[200] add r3,r1,r2 so the operation instruction comes _after_ the instructions to fetch the operands.
@GaryExplains
@GaryExplains 9 ай бұрын
With a RISC CPU, yes. That is in fact one of the main features of RISC CPUs.
@mohsenzare2511
@mohsenzare2511 Ай бұрын
Thanks for this video! this make a lot easier everything for me! Very good explanation thanks again!
@GaryExplains
@GaryExplains Ай бұрын
Glad it helped!
@muddyexport5639
@muddyexport5639 9 ай бұрын
Thanks! Fun example.
@danielcookeb90
@danielcookeb90 9 ай бұрын
Hi Gary, very interesting. First time hearing infix and post/polish fix. Is there a danger with these systems of someone interpreting these completely wrongly? Or a way of seeing code and knowing its one system and not the other. Clearly no "brackets " is a big giveaway? Love your knowledge and desire to up-skill. Thanks for all you do.👍👍
@test40323
@test40323 9 ай бұрын
CSC101...that brings me down memory lane. :-)
@taipo101
@taipo101 9 ай бұрын
The Sinclair scientific had rpn back in 1978s
@petermainwaringsx
@petermainwaringsx 9 ай бұрын
I'd forgotten about RPN.
@christiantheophanegasore3786
@christiantheophanegasore3786 9 ай бұрын
HP vs texas instruments calculator in sciences school!😂
@byronwatkins2565
@byronwatkins2565 9 ай бұрын
How about 1 2 3 + * ?
@GaryExplains
@GaryExplains 9 ай бұрын
That would be 2+3, and then 5 * 1, so 5.
@GaryExplains
@GaryExplains 9 ай бұрын
But yes, now looking back (as I am preparing the next video) the way that the shunting yard algorithm would convert 1+2*3 is 1 2 3 * + But not 1 2 3 + * as you wrote.
@paulw987
@paulw987 4 күн бұрын
​@@GaryExplainsYes. Preferred to keep operands in the order they appear in the original expression.
@tonifasth
@tonifasth 9 ай бұрын
The answer in your thumbnail is 42...I mean 7. 😂
Reverse Polish Notation and The Stack - Computerphile
13:32
Computerphile
Рет қаралды 308 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 38 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 37 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
Floating Point Numbers - This is Where Things Get Weird!
15:11
Gary Explains
Рет қаралды 5 М.
Machine Learning vs AI vs Deep Learning - The Differences Explained
13:14
Car Management System: Complete GO Lang Project
4:40:00
Code Alley with Anurag
Рет қаралды 2,6 М.
Why You Should Use ZRAM on Your Raspberry Pi
20:20
Gary Explains
Рет қаралды 20 М.
Reverse Polish Grows on Trees - Computerphile
9:51
Computerphile
Рет қаралды 94 М.
5 Tips to Help You Learn Windows PowerShell
18:34
Gary Explains
Рет қаралды 45 М.
Fixed Point Decimal Numbers - Including Fixed Point Arithmetic
11:24
DIY Programming Language #1: The Shunting Yard Algorithm
37:10
Learn Big O Notation In 12 Minutes
12:18
Web Dev Simplified
Рет қаралды 191 М.