Using two MuxShields with one library

Ok I am not quite understanding you, what is an AND gate and an OR gate? I thought D10, D11, and D12 were just for selecting weather you want that particular row to be inputs or outputs. I actually do not even have those three pins connected to my arduino. On the back of these shields their are jumpers that give you the ability to manually select weather you want the rows to be inputs or outputs, thus freeing up D10, D11, and D12.