Complementary resistive switch-based arithmetic logic implementations using material implication