Imagine a future in which a machine can scan your brain and migrate the essentials of your mind to a computer. It’s called mind uploading—preserving a person’s consciousness in a digital afterlife. As a neuroscientist, I’m convinced that mind uploading will happen someday. There are no laws of physics that stand in the way. It depends, however, on technology that has not yet been invented, so nobody knows when mind uploading might become available.

The brain relies on an elegant, underlying principle: A simple working part,...