Username or EmailPassword
Being able to think and to organize in societies implies some sort of "moral code". Even relatively primitive animals have it.
It will likely be different from human "moral code" but provided that machines have some interests in keeping us around (either for safety, as an effort to "preserve an environment", or simply as a farm stock) that doesn't automatically mean our extinction. Just like we didn't kill all species of animals.