Today, I will be discussing the applications of neural networks and how they can be used as logic gates. Logic gates form the basis of any complex calculations that we perform from addition to subtraction to integration and even derivation. Logic gates such as OR, NOR, AND, NAND and XOR are prevalent and a lot of us have come across with their respective truth tables at some point in our life.

Starting off with Neural Networks

Image for post

Neural Network

Above is the figure of a simple neural network. Here, we have 2 input neurons or x vector having values as x1 and x2. The input neuron with value 1 is for the bias weight. The input values i.e x1, x2, and 1 are multiplied with their respective weight matrix which is W1, W2, and W0 respectively. The corresponding value is then fed to the summation neuron where we have the summed value which is

Image for post
Feed to the sigmoid neuron

The value so obtained is fed to a neuron which has a non-linear function(sigmoid in our case) for scaling the output to a desirable range. The output range of sigmoid is 0 if the output is less than 0.5 and 1 if the output is greater than 0.5.

#machine-learning #artificial-intelligence #neural-networks #logic-gates #deep-learning #deep learning

Implementing Logic Gates using Neural Networks (Part 1)
5.50 GEEK