Answer to question 1: There are many ways to solve this problem:
- A ⊕ B= (A ∨ ¬ B)∨ (¬ A ∧ B)
- A ⊕ B = (A ∨ B) ∧ ¬(A ∨ B)
- A ⊕ B = (A ∨ B) ∧ (¬ A ∨ ∧ B), and so on
If we go with the first approach, the resulting ANNs would look like this:
Now from computer science literature, we know that only two input combinations and one output are associated with the XOR operation. With inputs (0, 0) or (1, 1) the network outputs 0; and with inputs (0, 1) or (1, 0), it outputs 1. So we can formally represent the preceding truth table as follows:
X0 |
X1 |
Y |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
Here, each pattern ...