Skip to content

Abdulaziz318/Project2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Project 2 README

Student 1: Abdulaziz Alhumaidy (9293646033) Student 2: Ezren Aldas (921321224)

Project Status

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.

Known Issues

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.

Prompt 1

How do you create an XOR from only and/or/not gates?

Response 1

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:

  1. Create (¬ A) and (¬ B) using NOT gates.
  2. Create (A ∧ ¬ B) and (¬ A ∧ B) using AND gates.
  3. Combine the results of the two AND gates using an OR gate.

Here is the step-by-step logic construction:

  1. NOT gates to get (¬ A) and (¬ B):
    NOT(A) → ¬ A
    NOT(B) → ¬ B

  2. AND gates to get (A ∧ ¬ B) and (¬ A ∧ B):
    A ∧ ¬ B → AND(A, ¬ B)
    ¬ A ∧ B → AND(¬ A, B)

  3. 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:

  1. Input (A) goes to a NOT gate to produce (¬ A).
  2. Input (B) goes to a NOT gate to produce (¬ B).
  3. Input (A) and the output of the NOT gate for (B) go to an AND gate to produce (A ∧ ¬ B).
  4. Input (B) and the output of the NOT gate for (A) go to an AND gate to produce (¬ A ∧ B).
  5. 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.

Changes 1

I needed XNOR, so changed it to:
¬((A ∧ ¬ B) ∨ (¬ A ∧ B))

Prompt 2

My other prompt...

Response 2

The other response...

Changes 2

The other changes made...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published