Consciousness appears to be an emergent phenomenon from sufficiently complex reflexive information processing systems.
We see examples all the time about how inert matter, when carefully arranged, gains the ability to do things that even a small rearrangement will destroy. A car's engine is merely inert metal, unable to move, but arrange that inert matter in just exactly the right way and now suddenly that inert, unmoving matter can move all by itself. Computer chips are made from silicon. A pile of sand, of and by itself, can neither process nor store information, but arrange it in exactly the right way and now all of a sudden it can.
It used to be believed that life was magical, but as we learned more about the molecular machinery of like, we discovered it's not Magic at all--living cells are basically machines. Extraordinarily tiny, exquisitely complex machines, but machines nonetheless. We are really close to being able to build simple single-called organisms in the lab; in fact, there's even a name for this kind of science (synthetic biology). Franklin Veaux