Implementaion of Logic Gates using Perceptron

Logic Gates to implement for 3 i/p variables.

  1. OR
  2. NOT
  3. XOR
  4. XNOR
  5. NAND
  6. NOR
  7. AND

Perceptron model function

$$ z = \sum_{i=1}^m(w_i * x_i) +b $$

Sigmoid Function

$$ f(z) = \frac{1}{1 + e^{-z}} $$

Part 1. Write a tensorflow program to implement a perceptron using functions described above for AND , OR and NAND logic gates. Choose weights and bias values accordingly.

Part 2.

  1. Use tensorflow library functions (Logical/Linear Regression )to find optimal weights and bias for all above mentioned gates.
  2. Discuss the values choosen for epoch and stopping convergence. Plot the graph for accuracy v/s epoch.