Hello guys,
This is my first post so sorry if I misspell anything.
I need to make a program which will calculate a logical gates equation like
A.(B^C)
which means A AND ( B NOT C) for binary values and to print the result, if it is either 0 or 1.
How can I define . as && or AND , and ^ as ! or NOT?
Also, how can I make the program calculate integers like the variables A,B,C into a string like A.B^C?
Thank you very much!
P.S. The equation will be read from a file, but I'll figure that out after I know how to do this.