What is consciousness?

I was watching I, Robot last night and i got to thinking about consciousness. They talked about random segments of code that could in the future simulate a conscious mind, the ghost in the machine. I got to thinking that what if consciousness what just the random order of atoms, and when looked at a whole, created some sort of mind.

On to another point, while watching the movie, seeing this robot with the beginnings of a conscious mind in an artificial body. What must it feel like to have an artificial consciousness, and is this where humanity could ultimately end up?