Student 1: Abdulaziz Alhumaidy (9293646033) Student 2: Ezren Aldas (921321224)
The Project is complete, except for problem 3 where the circuit has a minor issue that affects the application of the circuit. The logic itself is clear and works well on paper. It was a matter of having no time to double check connections.
The issues are as mentioned above, specifically, the problem with problem 3 is that we need to store the values correctly in the register in which we didn't.
How do you create an XOR from only and/or/not gates?
To create an XOR (exclusive OR) gate using only AND, OR, and NOT gates, you can follow these steps. The XOR gate outputs true only when the inputs are different.
The truth table for XOR is:
| A | B | A XOR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The Boolean expression for XOR can be derived as:
A ⊕ B = (A ∧ ¬ B) ∨ (¬ A ∧ B)
This can be broken down into the following steps:
- Create (¬ A) and (¬ B) using NOT gates.
- Create (A ∧ ¬ B) and (¬ A ∧ B) using AND gates.
- Combine the results of the two AND gates using an OR gate.
Here is the step-by-step logic construction:
-
NOT gates to get (¬ A) and (¬ B):
NOT(A) → ¬ A
NOT(B) → ¬ B -
AND gates to get (A ∧ ¬ B) and (¬ A ∧ B):
A ∧ ¬ B → AND(A, ¬ B)
¬ A ∧ B → AND(¬ A, B) -
OR gate to get the final result:
(A ∧ ¬ B) ∨ (¬ A ∧ B) → OR(AND(A, ¬ B), AND(¬ A, B))
Putting it all together in a circuit diagram:
- Input (A) goes to a NOT gate to produce (¬ A).
- Input (B) goes to a NOT gate to produce (¬ B).
- Input (A) and the output of the NOT gate for (B) go to an AND gate to produce (A ∧ ¬ B).
- Input (B) and the output of the NOT gate for (A) go to an AND gate to produce (¬ A ∧ B).
- The outputs of the two AND gates go to an OR gate to produce the final output (A ⊕ B).
In terms of Boolean logic:
XOR(A, B) = (A ∧ ¬ B) ∨ (¬ A ∧ B)
This way, you have constructed an XOR gate using only AND, OR, and NOT gates.
I needed XNOR, so changed it to:
¬((A ∧ ¬ B) ∨ (¬ A ∧ B))
My other prompt...
The other response...
The other changes made...