if input A and B are 0 to 1 respectively