Proposed by Dr. Hans Moravec in the book Mind Children, this describes how a human brain could be transformed into a mechanical structure made from nanobots, without the brain in question losing consciousness:

A neuron-sized robot swims up to a neuron and scans it into memory. A computer starts simulating the neuron. The robot waits until the neuron perfectly matches its simulation inside the computer, and then replaces the neuron with itself as smoothly as possible, sending inputs to the computer and transmitting outputs from the simulation of a neuron inside the computer.

This entire procedure has had no effect on the flow of information in the brain, except that one neuron's worth of processing is now being done inside a computer instead of a neuron. Repeat, neuron by neuron, until the entire brain is composed of robot neurons whose guts are inside the computer.

This description originally written by Eliezer Yudkowsky.