Excel formula to search 2 conditions

I have he following table.
I’m trying to find formula to check the value in Column A and if it is the same to check if column B is non zero, if it is zero in column D for each cell put o and if it is <>0 i put 1.
The corect answer is in Column C

Column A      Column B   Column C    Column D
1-0-1         4444          1
1-0-2                       0
1-0-2                       0
1-0-2                       0
1-0-2                       0
1-0-3         4444          1
1-0-4                       0
1-0-4                       0
1-0-4                       0