Let?s start with the three fundamental Rules of Robotics....
We have: one, a robot may not injure a human being, or,
through inaction, allow a human being to come to harm.
Two, a robot must obey the orders given it by human beings
except where such orders would conflict with the First Law.
And three, a robot must protect its own existence as long as
such protection does not conflict with the First or Second Laws.