Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

a * b * c is only nonzero if all of a, b, c are nonzero. That's AND, and should be pretty intuitive.

a + b + c is nonzero if any of them are nonzero. (Remember each value is either 0 or 1.) So that's the intuition for OR.



a+b+c is nonzero if any of a or b or c are nonzero.


Yeah I just added that. I was hesitant initially cause you have to also note they're nonnegative, and that you're treating them like real numbers rather than mod 2.


Natural numbers are the natural numbers for me! (ISO 80000-2, of course)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: