Filmed as Blade Runner, Do Androids Dream of Electric Sheep? (1968) is a science fiction novel by Philip K. Dick. It tells the story of bounty hunter Rick Deckard, stalking almost-human "Nexus-6" androids (referred to derogatorily as "andys") through the gloomy, partially deserted streets of a future San Francisco.
Warning: Wikipedia contains spoilers.
The plot and characterization of Do Androids Dream of Electric Sheep? is different in a number of ways from that of Blade Runner. The novel is both more surreal and complex than the movie, as the movie was based on the themes rather than the plot of the novel.
The future portrayed is a bleak one, in which the Earth is dying after a nuclear war, and many people have emigrated "off-world" to the space colonies. Animals are extremely rare, and hence extremely valuable. In fact, owning an animal is something of a status symbol. For many, an artificial animal is the only affordable alternative. Rick Deckard himself owns an electric sheep.
The androids are given as slaves as an incentive to colonizers of Mars, but are illegal on Earth. They can be differentiated from true humans in only two ways: the Voigt-Kampff empathy test, and a bone marrow scan. Strictly speaking, the term android is not an accurate one as the term suggests mechanical composition whereas the beings in the novel are organic.