Write an embedded C function to implement thefollowing truth table:
Out PI. I P2.5 0 0 Show transcribed image text Out PI. I P2.5 0 0Solution
int main ()
{
if (p1==0 && p3==0)
p2=1;p5=0;
else
if (p1==0&&p3==1)
p2 =1;p5=1;
return 0;
}
Write an embedded C function to implement thefollowing truth table:
Out PI. I P2.5 0 0 Show transcribed image text Out PI. I P2.5 0 0Solution
int main ()
{
if (p1==0 && p3==0)
p2=1;p5=0;
else
if (p1==0&&p3==1)
p2 =1;p5=1;
return 0;
}