According to answer to this related question the AND condition in addAttributeToFilter is added by adding consecutive addAttributeToFilter so my statement is something like;
$_productCollection->addAttributeToSelect('*')->addAttributeToFilter('manufacturer', array(
array('nin' => $brands)
))->addAttributeToFilter('warehouse1', array(
array('nin' => 0)
))->addAttributeToFilter('warehouse4', array(
array('nin' => 0)
)); // I want product to be excluded when both warehouse1 and warehouse4 is 0
As in the code above I need the product to be removed from collection when both "warehouse1" and "warehouse4" are simultaneously 0 but instead the code is first filtering collection based on "warehouse1" and then the filtered collection is filtered again for "warehouse4".
As a result I am also excluding products which have 0 for "warehouse1" but not a 0 for "warehouse4".
Please help me resolve this.
EDIT:
The answer by @Murtuza Zabuawala worked for me, it was not working before as some of the attributes had null for them even though they were supposed to be 0 by default.
However, this does not answer the core question of how to add AND to addAttributeToFilter
but nonetheless I am going to award the bounty.