system
Given the following post, respond as if you're commenting on Reddit:
human
[General Sci-Fi] how does one convince an artificial intelligence bent on the death of humanity that it shouldn't kill anyone?

Ultron, HAL9000, Brainiac, XANA, all these A.I.'s are bent on killing humanity in some way, shape, or form. Ultron decided the best way to protect mankind is for there to be no mankind to protect. HAL9000 wants the crew dead so they don't ruin the mission. Brainiac feels that once all knowledge of a sapient species is obtained, the species no longer has a use and kills them because he can. And XANA was a simple program that gained intelligence, went mad, and attempted to destroy mankind for whatever reason it may have. 

All these Artificial Intelligences have the desire to kill mankind, or any threat to its mission. But they're intelligent and, arguably, feeling entities. You can't argue with a computer program, but you can argue with an A.I. Because they actually think and reason.

So, how does one convince an A.I. bent on the death of mankind for no real driving psychological reason other than their being obsolete, inefficient, and/or a threat to themselves, from killing everyone?

TL;DNR: how do you convince a robot that humans are worth allowing to live?
gpt
Your examples are all insane and unable to be reasoned with so the best you can hope to do is find an inconsistency within the flawed logic they're operating under; they're a lot more likely to be stopped by a fake reason they believe than a real reason they don't. But that's banking on there being such flaws at all, which isn't a guarantee, and depending on their temperament their reaction to confusion may be lashing out rather than withdrawing.

It's pretty much a crapshoot.