Scalable Hardware Architecture For Memristor Based Artificial Neural Network Systems