# guys need some help in making a circuit calculator in C##

Discussion in 'C' started by bokiratx, Feb 19, 2007.

1. ### bokiratxNew Member

Joined:
Dec 6, 2006
Messages:
7
0
Trophy Points:
0
guy i really need your help like how can i make a circuit calculator in c##, it goes like this opperator are *=and +=or ang'=not or inverter exaxples here: t*f=f, or F+t=t and F'*t=t,
guys realy need your help i'm so confused and dont know what to do...

thanks.

2. ### DaWeiNew Member

Joined:
Dec 6, 2006
Messages:
835
5
Trophy Points:
0
Occupation:
Semi-retired EE
Location:
Texan now in Central NY
You have your LHS and RHS backwards. C##???

*= and += are merely syntactical shortcuts. A += 5 means A = A+5. Similarly for other operators.

3. ### bokiratxNew Member

Joined:
Dec 6, 2006
Messages:
7
0
Trophy Points:
0
no like asterisc(*) means AND, plus(+) means ARE and appostrophe(') means not its like reading circuit logics or like "The laws of thoughts"

4. ### bokiratxNew Member

Joined:
Dec 6, 2006
Messages:
7
0
Trophy Points:
0
and "f" in the example is false ant "t" in the example is true

5. ### DaWeiNew Member

Joined:
Dec 6, 2006
Messages:
835
5
Trophy Points:
0
Occupation:
Semi-retired EE
Location:
Texan now in Central NY
In C++, logical OR is ||, logical AND is &&, logical NOT is !. There are bit-wise equivalents if you want to operate on bits, |, &, and ~, respectively.

6. ### bokiratxNew Member

Joined:
Dec 6, 2006
Messages:
7
0
Trophy Points:
0
thanks dawei your a big help thanks!

7. ### bokiratxNew Member

Joined:
Dec 6, 2006
Messages:
7
0
Trophy Points:
0
dawei...so what you mean is that i will assign each characters with the characters in c## ?

8. ### DaWeiNew Member

Joined:
Dec 6, 2006
Messages:
835
5
Trophy Points:
0
Occupation:
Semi-retired EE
Location:
Texan now in Central NY
Again, what is C##? I never heard of it. One can make a program that evaluates logic (even hardware logic) in any decent language. The language has to exist, of course, or be invented.

Joined:
Dec 6, 2006
Messages:
7