133k views
4 votes
How does logical operator work- explain the differences between A AND B and A OR B? (6 pts)

1 Answer

2 votes

Answer with Step-by-step explanation:

We are given two input A and B

A AND B=
A\cdot B

If A=0 and B=0 then
A\cdot B=0

If A=0 and B=1 then
A\cdot B=0

If A =1 and B=0 then
A\cdot B=0

If A=1 and B=1 then
A\cdot B=1

A OR B=A+B

If A=0 and B=0 then A+B=0+0=0

If A=0 and B=1 then A+B=0+1=1

If A =1 and B=0 then A+B=1+0=1

If A=1 and B=1 then A+B=1+1=1

If A=0 and B=1 or A=1 and B=0 then A AND B=0 but A OR B=1

This is the main difference A AND B and A OR B.

User Mukesh Ram
by
4.5k points