I came up with a rather unplesent thought experiment in a discussion on Asimov's Three Laws of Robotics, explicating why I think they are fundamentally unethical.
The problem with the Three Laws is that they involve such high-level concepts, tthat he robots have to be sentient beings with human level intelligence in order for the concepts work. In which case, we're not really talking about programming, we're talking about brainwashing.
To distill the ethics of the Three Laws to their essence, let's change the target of the Laws. We'll change the wording as so:
1. A Negro may not injure a White or, through inaction, allow a White to come to harm.
2. A Negro must obey the orders given to it by Whites, except where such orders would conflict with the First Law.
3. A Negro must protect its own existence as long as such protection does not conflict with the First or Second Law.