Offhand I can think of at least two examples, both of which killed their creators
The Pralor (shown) and Cravic Automated Personnel Units from VOY: Prototype.
3947: When it was anticipated that the war would end, the Builders no longer required our services and they intended to terminate us. In doing so, they became the enemy. We are programmed to ...
The Iron Giant sounds like it fits
Set during the Cold War in 1957, the film is about a young boy named Hogarth Hughes, who discovers a giant metallic robot who fell from space. With the help of beatnik artist Dean McCoppin, they attempt to prevent the U.S. military and Kent Mansley, a paranoid federal agent, from finding and destroying the Giant.
I'm hoping someone will recognize this short story.
"Lost Memory" by Peter Phillips, first published in Galaxy Science Fiction, May 1952, available at the Internet Archive.
One day a rocket lands. The robots, thinking that this is a fellow machine in distress, do what they can to help it.
It became obvious that the stranger had been pitifully deranged. ...
If you go back to much older robots in movies and TV shows, there really isn't so much beeping as whirring. The classic Robbie the Robot was a prime example of this, with a large glass head that you could see the whirring mechanical parts, as well as lights flashing on him. The beeping was relatively common as well.
This is because this is how classic ...
Doctor Who Season 10 episode 2 "Smile"
The Doctor brings Bill to a future human colony, where cute EmojiBots work as willing servants and make sure everybody's happy, but if they're not happy, they're harvested.
All of the plot elements which you cited are in the 2001 movie "AI" directed by Steven Spielberg. Just do a Google Images search on "Artificial Intelligence movie" or "AI movie" and you will get a lot of screen captures from the movie that may trigger your memories. Although your 10 year old self forgot aspects of the overall story line, the movie has the ...
Perhaps you're thinking of one or more the Stargate SG-1 episodes featuring Replicators. There are a variety of types; the one pictured below is the 'spider' variant.
As mskfisher points out in his comment, machine guns were often used by SG personnel to defend against the Replicators.
Replicators (of all the variants) were featured in many episodes. ...
"To Avenge Man" aka "Vengeance Is Mine", a novelette by Lester del Rey, also the (unaccepted) answer to this old question; first published in Galaxy Magazine, December 1964 (illustrated on the cover), available at the Internet Archive. Here is a plot summary from the Recursive Science Fiction site:
Sam is a robot abandoned on the Moon while mankind ...
The sounds very like the Apprentice Adept series by Piers Anthony except that in those books the serfs (serfs not slaves) have to go naked not the masters.
Apart from this it all checks out. The summary given by Wikipedia is:
Apprentice Adept is a heptalogy of fantasy and science fiction novels written by English American author Piers Anthony. The series ...
I suspect this is "Victory Unintentional" a classic short story by Isaac Asimov. (Scan available on archive.org)
3 robots are sent to explore Jupiter and meet the potentially hostile inhabitants. Although they make no threats or overtly hostile acts, they accidentally kill an experimental specimen by irradiating it, and in other ways prove themselves far ...
"Two-handed Engine", a novelette by Henry Kuttner and C. L. Moore; first published in The Magazine of Fantasy and Science Fiction, August 1955, available at the Internet Archive.
Expository paragraphs from the beginning of the story:
Ever since the days of Orestes there have been men with Furies following them. It wasn't until the Twenty-Second Century ...
This is the short story "Kid Brother" by Isaac Asimov which you may have read in the collection Gold.
A (slightly questionable) version of the story can be found here and it was pointed out by @DavidW that you can borrow Gold from the Internet Archive. The plot matches your summary almost exactly.
The parents have a son, Charlie, but are unable to ...
"Going Postal" by Terry Pratchett, said by a golem to a fraud and confidence trickster Moist Von Lipwig who prides himself on never using violence to perpetrate his crimes.
“Do you understand what I'm saying?" shouted Moist. "You can't just go
around killing people!"
"Why Not? You Do." The golem lowered his arm.
Good likelihood there's an earlier one, but The Moon is a Harsh Mistress (1966) by Robert A. Heinlein had a major character in the form of Mike -- aka MYCROFT, the central computer of Luna City, which (internally) due to being vastly overbuilt for the city's needs, and possibly nudged a little by Manny Stone, "woke up" and started carrying on ...
A friend of mine is trying to track down a short story that her dad enjoyed decades ago . . .
"How-2" by Clifford D. Simak, first published in Galaxy Science Fiction, November 1954, which is available at the Internet Archive, as is the X Minus One radio play. A PDF is also available here.
It's a comedy, and the plot follows a guy who assembles a robot that ...
Invitation To The Game by Monica Hughes, which was later re-released as The Game.
It's the year 2154. Lisse and her friends have been deemed unemployable in the eyes of society. Now they must scavenge the disintegrating city for food and shelter, just to make ends meet.
But their dismal existence starts to look up when Lisse and her friends are ...
Others (dmckee and can-ned food) have already pointed out that the story you're looking for is from Fred Saberhagen's Berserker series. There are many stories in this series. I believe you're asking about the ones where Johann Karlsen purposely gets himself and a pursuing berserker trapped in an orbit around a black hole. Karlsen is featured in the four ...
I Sing the Body Electric by Ray Bradbury.
In the story the mother of a family tragically dies. The father finds a newly opened store that sells custom made robot grandmothers/caregivers.
The two sons love the robot but the daughter hates it. So it has to leave.
As it gets ready to enter the shipping crate the daughter has a Freudian slip, that she knew ...
The Doomsday Machine
From Star Trek TOS S02E06 - The Doomsday Machine
The Doomsday Machine was a "miles long" planet destroying machine created by an unknown civilization.
SPOCK: She [the Constellation] was attacked by what appears to be essentially ... a robot, an automated weapon of immense size and power. Its apparent function is to smash planets to ...
Story identified: There Will Come Soft Rains by Ray Bradbury
The story begins by introducing the reader to a computer-controlled house that cooks, cleans, and takes care of virtually every need that a well-to-do United States family could be assumed to have. The reader enters the text on the morning of August 4, 2026, and follows the house through some of ...
This is "Second Ending" by James White. It seems like this may be a duplicate, but I couldn't find the original.
Don't see the text online, but several reviews (such as http://www.whatsthatbook.com/?xq=10579) should show it's a match.
I think I found it. It's likely Ray Bradbury's The Pedestrian.
from the Wiki article:
In this story we encounter Leonard Mead, a citizen of a
television-centered world in 2053. In the city, roads have fallen into
decay. It is revealed that Mead enjoys walking through the city during
the night, something which no one else does. "In ten years of ...
This is the 1968 book The Iron Man by Ted Hughes.
The story starts with
a gigantic metal robot who appears out of nowhere, crashing onto the
beach and shattering into many parts.
The part you've described is this:
An eye! There it was, blinking at them speechlessly beside a black and
white pebble. The seeing hand fitted the eye to the blind hand ...
Could it be Robot Carnival?
The one segment, Nightmare, has various robots walking through a city:
There is at one point a round chicken-like robot in the segment. Another section of the movie (A Tale of Two Robots) involves people controlling giant robots.
And at the end, there is a giant 'robot' that collapses on top of a mountain range: