How to Implement AND Function using McCulloch Pitts Neuron?

Firstly, to implement AND function using McCulloch Pitts Neuron you must have some knowledge about McCulloch Pitts Neuron. But, if you don’t know what is McCulloch Pitts Neuron, don’t worry, I’ve already discussed it in this blog posts “What is McCulloch Pitts neuron?“.

So, first of all, we have to draw the truth table of AND function. Therefore, In AND function, the Output will be High or 1, if both the inputs are High.

Truth Table of AND Function


After that, we have to assume two weights w1 = w2 = 1 for the inputs.

Calculating Net Input

After that, we have to calculate the Net input, to calculate the net input we have a formula:

Net Input of Neuron

So, based on that above formula we are going to calculate the Net input for all the neurons.


For example for the first input (1, 1) the net input will be, yin = 1*1 + 1*1 = 2. Similarly, we have to calculate the rest of the inputs.

So now the question is when the neuron will fire? therefore, It is only possible if we know the threshold value. Therefore, we need to know the threshold value, after that, it will decide which neuron will fire and which will not.

Calculating Threshold Value

Θ ≥ nw – p

n = number of inputs, w = positive weights, p = negative weights.

For example, here, n = 2, w = 1, p = 0

So, the threshold value (Θ) will be Θ ≥ 2×1-1, Θ ≥ 2.

Defining the Activation Function

So, the activation function using threshold value will be look like this:

Acivation Function of AND Function using McCulloch Pitts Neuron

In short, the threshold Value is greater than or eqaual to 2.

Watch this tutorial on YouTube

In conclusion, watch this tutorial – AND function using McCulloch Pitts Neuron, easiest explanation, easy to implement on exams.

Sayan De

Sayan De is pursuing his M.Tech in CSE. His interest area of work is Machine Learning, Deep Learning, Deep NLP, Computer Vision, Data Science, Linux, and a little bit of Website Development.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.