The output of logic circuit given below is 0 only when

output of the top OR gate is A+B
output of the bottom AND gate is B(since B.1=B)
now these two are the inputs fed to final OR gate whose output is A+B+B
which is equal to A+B
Now A+B is 0 only when both A=0 and B=0