Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Boolean math: Fill in the blanks.

by repellent (Priest)
on Oct 12, 2008 at 16:54 UTC ( #716686=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Boolean math: Fill in the blanks.
in thread Boolean math: Fill in the blanks.

But plug in

    (( R & R ) | R ) & R & R

into the OP code and it tends towards 5, which was how I was interpreting the expression:
    ( R & R | R & R ) & R

My mistake. Perl evaluates ( R & R | R & R ) & R as ( (R & R) | (R & R) ) & R and that, according to my hypothesis, results in 7 bits set on average.


Comment on Re^3: Boolean math: Fill in the blanks.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-30 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls