Computer Science, asked by csrkl10bmanwisingh, 4 months ago

c) if x1=true,x2=true, x3=false then find x4
X4= !(x1) && (x2|| !(x3))&&x1​

Answers

Answered by anindyaadhikari13
6

Required Answer:-

Given:

  • x1 = true
  • x2 = true
  • x3 = false

To Find:

  • x4 if x4 = !(x1) && (x2 || !(x3)) && x1

Solution:

Given,

!(x1) && (x2 || !(x3)) && x1

= not true && (true || not false) && true [Putting the values.]

= false && (true || true) && true [not true = false and not false = true]

= false && true && true [true or true is true as one condition is true]

= (false && true) && true

= false && true [false as one condition is false]

= false [Again false as one condition is false]

>> x4 = false

Answer:

  • x4 = false

Note:

  • Result is always true if any one condition is true (In case of logical or). If all condition is false, result is false.

  • Result is true if all the condition is true (In case of logical and). If any one condition is false, result is false.
Similar questions