An XOR network of your own

Design a network with two hidden threshold units that computes XOR using different weights from the two solutions above, for example by using NAND and OR in the hidden layer. Give the truth table.

Use NAND and OR in the hidden layer and AND at the output:

h_1=f(-2x_1-2x_2+3),\qquad h_2=f(2x_1+2x_2-1),\qquad o=f(h_1+h_2-1.5).

The first hidden unit is 0 only for (1,1). The second is OR. The output is AND of the two hidden units.

(x_1,x_2) (h_1,h_2) net input of o o
(0,0) (1,0) -0.5 0
(0,1) (1,1) 0.5 1
(1,0) (1,1) 0.5 1
(1,1) (0,1) -0.5 0

This is \mathrm{XOR}=(x_1\vee x_2)\wedge\neg(x_1\wedge x_2).