Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Generate a truth table from input string

by Anonymous Monk
on May 14, 2008 at 11:29 UTC ( [id://686495]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #my $bool_func = "((S0'*B)|((!S0)|A))'";
    my $bool_func = "(a'+b'+c')";
    ...
        my $result = eval $perl_expr & 1;
    print join(",    ", map { "$val{$_}" }keys %val),"  =$result\n";
    }
    
  2. or download this
    equivalent expression: (~a|~b|~c)
    c,      b,      a,      out
    ...
    1,      1,      0       = 1
    1,      0,      1       = 1
    1,      1,      1       = 0
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://686495]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found