truth tables 
Author Message
 truth tables

Hallo, I am an italian student and  I am looking for some routines,
written in C, which can solve boolean truth tables.
I home that someone can suggest me some good link.
Thank you.
Bye bye.

Marco.



Sat, 30 Oct 1999 03:00:00 GMT  
 truth tables

Quote:

>Hallo, I am an italian student and  I am looking for some routines,
>written in C, which can solve boolean truth tables.
>I home that someone can suggest me some good link.
>Thank you.
>Bye bye.

Actually I doubt there are any, I've never seen a need for it
myself since truth tables are pretty simple..

&& cooresponds to AND
|| to OR
== to equivalance.
! to NOT
and you can use ^ for XOR if you alter the arguements using a
! to ensure they are truth values.
ie ((!arg1) ^ (!arg2))

Let's see what is left, Implication which if I remember correctly
is the combination of logical not'ng the first argument and
logically or'ng it by the second arguement.
Actually I think you can logically not either argument.

((!arg1) || arg2)

Now just pass it and non zero value for true and 0 for false.



Sun, 31 Oct 1999 03:00:00 GMT  
 truth tables

Quote:

> Hallo, I am an italian student and  I am looking for some routines,
> written in C, which can solve boolean truth tables.
> I home that someone can suggest me some good link.
> Thank you.
> Bye bye.

> Marco.

Are you talking about evaluating big-ass truth tables containing
compound arguments?  Or are you simply looking for a general AND, OR,
IF-THEN, IFF (if and only if), etc.?  One thing I have not found in C is
a Boolean corresponding to the IF-THEN logical statement.  The only way
to get an equivalence is to evaluate IF A THEN B as NOT A OR B , i.e.
((!A) || B).
Until you answer this post, I can't help you any more.
--
Van Isaac Anderson



http://www.geocities.com/SiliconValley/Pines/8250/index.htm

"I stand by all the misstatements that I've made." -- Dan Quayle



Sun, 31 Oct 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Anyone happen to know about truth table?

2. truth table

3. " My " Truth table program.

4. Anyone happen to have a truth table sourc-code?

5. Programming Truths

6. It's the truth, honestly Bill!

7. how VB update Table A INNER JOIN Table B, Set A.co=B.ID

8. Lookup Table or Hash Table

9. NULL table entries to terminate tables

10. extern int table[] vs extern int *table;

11. Creating a table from VC++ using stored in Access import/export table specification

12. Select Table -- No Table

 

 
Powered by phpBB® Forum Software