You are essentially a computer program. You, your family, your friends, your dog, you are all computer programs. This isn’t to say you aren’t “real,” (that’s a topic for another conversation) but everything that can be considered “you” is a complicated organic computer program which processes input and produces output. Think about it – if one could magically produce several exact copies of you and place them all in the exact same situation, would any of the copies act differently? How could they? The material factors in all of these scenarios are identical in every case. This would dictate an identical outcome. To deny this would be to deny materialism on a very deep level: for this to not be the case, there would have to be some sort of immeasurable and imperceptible qualities to the universe.
This system of inputs and outputs is your consciousness. It is you. It’s extremely complicated, but it’s essentially a mathematical machine that responds to stimuli. Of course this software can examine itself, self-adjust, and change based on external and internal stimulus, so it isn’t exactly the same as a piece of software running on a computer as we know it.
In addition, if we accept that information (in this case, software) “exists” regardless of its being encoded into physical media, then any conceivable person “exists,” including humanity’s wide range of gods, heroes, fictional characters, and the like. In fact, I would wager that many ancient humans understood this to a degree, even if they didn’t articulate it as such. Many early Christian discussions of “the Divine” and its presence in humans are reminiscent of this. When people say things like “that’s the spirit,” they are in essence congratulating you for running the correct software (perhaps a subroutine of some sort) within the main software loop of your consciousness. When a person says something like “an evil spirit hangs over that place,” this does not necessarily mean anything supernatural is occurring – simply that this place will encourage sub-optimal software to run within one’s consciousness.
Likewise, this ensures that our consciousnesses, that which make us ourselves, survives the end of our physical bodies. You leave pieces of your code in the consciousness programs of everyone you meet, especially those with whom you share particularly intimate relationships. These pieces of you survive the death of your body. When people say a deceased love one “will always be with you,” or something of the sort, this is not simply a platitude designed to make you feel better. It is literally true. Large pieces of their consciousness are within you and can even be called upon when required. Have you ever imagined how a deceased person would react to a stimulus that occurred after their death? This is what you are doing – you are calling up parts of their code and running them against the stimulus. Of course this may be an incomplete model and the result may be incorrect, but you are running stimuli through this person’s consciousness program when you do this.
When our bodies die, the code that constituted our personhoods is diffused among all the people we knew, then ultimately to the people they know, until these pieces of code are no longer associated with our names and our code becomes simply part of general human consciousness.