Hello

logical operation between x and y give z

there are three column R1, R2, R3Code:X Y Z 0 0 0 0 1 1 1 0 1 1 1 1

if R1 is 1, R2 should be 1

if R1 is 0 , R2 will be unchanged

How to write c program for above logic operation ?

OR Logic

AND LogicCode:0 | 0 = 0 0 | 1 = 1 1 | 0 = 1 1 | 1 = 1

Code:0 & 0 = 0 0 & 1 = 0 1 & 0 = 0 1 & 1 = 1