# Perceptron Primitive Boolean Functions

I understand the AND but I'm still not so sure how OR can be represented.

For example, if the inputs are:

$$X_1 = +1$$

$$X_2 = -1$$

In that case, using his logic for OR we would end up with the perceptron actually outputting -1, because:

$$1*0.5 + -1*0.5 - .3 = -.3$$

The function would give us a negative number. Is he wrong about the OR function? How would a single perceptron act as an OR?

Thank you!

• I agree with your logic. However, notice that even if the value of -0.3 is mistyped, the construct is still possible. Consider setting w_0=0.3 in order to achieve the desired OR effect. Dec 17 '18 at 16:43
• @mapto that makes sense, he just messed up the sign. Thank you! On a completely different note, do you happen to know if the book mentioned above is a good book for learning, or have any recommendations? Dec 17 '18 at 17:15
• I'm sorry, I can't help. Notice, however, that Mitchell's book is more than 10 years old and the field has developed a lot. Unless there is a new updated edition, I'd prefer something more recent. Dec 18 '18 at 8:05

I interpret it as the input takes binary value $$0$$ (false) and $$1$$ (true) while the output take $$-1$$ (false) and $$1$$ (true).

The map is $$sign\left(\sum_{i=1}^nw_ix_i+w_0\right).$$

If we let $$w_i=0.5, i \ge 1$$, then we have the mapping rule to be

$$sign\left(\frac12\sum_{i=1}^nx_i+w_0\right).$$

For the AND operator, if we set $$w_0=-0.8$$, for it to take positive value both $$x_i$$ has to be $$1$$.

For the OR operator, if we set $$w_0=-0.3$$, we just need one of them to take positive value for it to be true.

• Siong you're awesome. I'm just going to tag you in a comment now every time I ask a question!! Jan 23 '19 at 4:05