Can the shunting-yard algorithm handle logic processing ?

  • #1
synch
68
10
Looking at logic processing with 1 meaning true and 0 meaning false..an "OR" could be implemented using an addition operation , an "AND" using multiplication, and so on. I am wondering if the shunting yard algorithm would handle the sequences of logic based operations ? The precedence of the operators would have to be set appropriately of course..
 
Technology news on Phys.org
  • #2
The boolean operators are just like the arithmetic operators.
No distinction need be made between boolean or arithmetic operators.
They can all be processed in a stack based processor, and have been for the last 70 years.
 
  • Like
Likes QuarkyMeson

Similar threads

Replies
2
Views
1K
Replies
31
Views
6K
Replies
23
Views
2K
Replies
2
Views
2K
Replies
7
Views
3K
Back
Top