Hebbian Learning - Understanding Simultaneous Firing I'm beginning to write a neural network simulator in Java and thinking of Hebbian Learning but I'm stuck at one thing:

What causes two neurons to fire at the same interval while only one of them is input and the other is not? Does it fire itself? 

Hebbian Learning rule says "those fire together will wire together" but since I'm activating only input neuron, what makes the other interior neuron fire? Do I need to make them fire randomly at times instead of just using weights matrix $W_{ij}$?

I'm a fan of unsupervised learning and need to start with a simple case such as I give one of 3-5 neurons a "1" and expect from another one a "0" as a "NOT" operator.
You basically have 2 options:


Manually fire both neurons together that you want to pair - do this as many
times as needed to pair them.  After learning, it should be
sufficient to fire only one neuron for the second neuron to fire as
desired.
Assign a starting weight to the connection between the
neurons such that firing one will trigger the other.  This is
basically shortcutting the above learning process.


Normally, the learning process in neural networks is based on multiple simultaneous inputs - not just one.  The network learns the statistical probability of input neurons firing together, and is eventually able to predict them without them firing.  So a test case of a single neuron firing can be used after learning is complete (the first option) or when you restore a previously saved matrix of a trained network (the second option).