B A->YS YC 0 0 YS=0 YC=0 1 0 YS=1 YC=0 1 1 YS=0 YC=1 0 1 YS=1 YC=0 function: YS = !(!B && !A || B && A) function: YC = (B && A)