A memristor-based architecture for neuromorphic computing is proposed. With memristors mimicking key characteristics of synapses and neurons, such nanoscale neural networks exhibit learning and memory effects with high integration density and scalability. Simulations demonstrate important features including adjustable spike generation, spike-timing and spike-rate dependent plasticity.