How does the brain know where a signal came from? What is the addressing system
The brain knows where a sensory signal came from by what neuron is doing the signalling.  The incoming neuron is dedicated to signals from one source and, since it is not shared by other sources, does not need to have an encoding as to what the source was. When your toe touches something, the sensation causes a pulse which, amazingly, travels along a single nerve cell (neuron) up to the brain stem.  That neuron has its nucleus at a dorsal root ganglion located by the spinal cord, and has a fiber (axon) that extends to the source (toe) and another extending up to the brain stem.  This pathway is called the PCML pathway and the Wikipedia article has some readable details.  This page has a schematic and tabular summary, while this site has a good descriptive overview.

If a robot were built along the same sort of design, to determine what was happening at 1000 places in its body, it would have 1000 wires running to its central computer.  You probably wouldn't choose to use such a design, but then you probably wouldn't be designing a robot that has to build itself from raw materials.