Problems
•Problem7:ComputeORgateusingsingleperceptrontrainingrule.
•Solution:
Y=ቊ
1����+�>0
0����+�≤0
•Assumew1=1,w2=1andbias=-1
•Perceptrontrainingrule:y=w1x1+w2x2+b
•Ifx1=0,x2=0,then0+0-1=-1
0 1 0+1-1=0
Butoutputy=0andtarget=1,misclassification,letuschangethew1=1,w2=2.
Then,y=w1x1+w2x2+bandw1=1,w2=2,b=-1
For(0,0),y=0+0-1=-1
(0,1),y=1x0+2x1-1=1
(1,0),y=1x1+2x0-1=0,Butoutput=0andtarget=1,
misclassification,soletuschangethew1=2andw2=2
(0,0),y=0+0-1=-1
(0,1),y=2x0+2x1-1=1
(1,0),y=2x1+0x2-1=1
(1,1),y=2x1+2x1-1=3
7/19/2024 24Dr. Shivashankar, ISE, GAT
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
OR
b
x1
x2
2
2
Y=1
-1