Smart Logic-in-Memory Architecture For Ultra-Low Power Large Fan-In Operations