B-4 was a prototype android constructed by Doctor Noonian Soong on Omicron Theta in the 2330s. He was one of three failed prototypes before the construction of Lore was successful. (TNG: "Inheritance") Although B-4 was outwardly identical to both Data and Lore, the two final androids built, B-4 was not equipped with a positronic brain as sophisticated as those of his brothers, with the result that he asked simple questions such as "Why does the tall man have a furry face?", and describing engineering as being simply "A room... with lights."
The existence of B-4 was not known to Starfleet until 2379, when the disassembled pieces of the android were found by the crew of the USS Enterprise-E on Kolarus III. The pieces had been planted there by Shinzon as part of an elaborate scheme to lure Jean-Luc Picard near Romulus in order to capture him. B-4 was also used as an unwitting spy; he was equipped with a second memory port that contained subversive programming that compelled him to download vital data about the positions of all Federation starships and their coded communications frequencies.
Although he recognized B-4's limitations, Data wished to give his brother the opportunity to expand his capabilities, much in the same way that he himself had in years past. Towards that end, Data willingly copied all of his memories to B-4, hoping that the added experiences would help B-4 to expand beyond his original programming. However, soon afterward, B-4 had to be deactivated because of the danger he posed to the Enterprise crew, as a result of Shinzon's tampering.
A short time later, Data was killed while destroying the Scimitar, having voluntarily sacrificed himself to save his crewmates. B-4 was reactivated so that Picard could tell him of his brother's death, but Picard sadly departed the meeting when his attempts to explain what Data meant to them only confused B-4. Although some of Data's memories began to surface as Picard left the android in his ready room, B-4 beginning to sing the song that Data had sung at Riker and Troi's wedding shortly before B-4's discovery, his future was uncertain. (Star Trek Nemesis)
Background information Edit
B-4 was played by actor Brent Spiner.
According to the original Star Trek Nemesis script, the android B-4 ("before") was named "B-9" ("benign"). Also according to the script, the android was taken from its homeworld by the Pakleds and traded to the Bolians. He ultimately encountered some Cardassians, who tossed him into a garbage chute and out into space, where he was found by Talosians. It was also revealed that Shinzon had learned of the prototype android through a Cardassian historian. None of this, however, made it to the final version of the script. The novelization names him as "Be-Fore".
Captain Picard's interactions with B-4 after Data's destruction at the end of Nemesis hint at the possibility of a Spock-like rebirth of Data through B-4, although actor Brent Spiner has called this unlikely due to the fact that he himself has "visibly aged out of the role" of an android who supposedly does not age. Of course, this is not necessarily true since the TNG episode "Inheritance" states that Data does, indeed, have the capability to age.
B-4 is deactived and sent off to the Daystrom Institute for Analysis in the novel Resistance, Picard and La Forge having come to accept that the moments where B-4 acts like Data are merely random sparks rather than any sign that B-4 has significantly progressed as a sentient being.
In the novel Cold Equations: The Persistence of Memory, Doctor Bruce Maddox is contemplating deleting Data's memory engrams from B-4, who is kept in storage along with the remains of Soong's other prototype, Lore, and Lal, Data's daughter, when they are stolen by the Breen. Doctor Soong – who survived his death by transferring his mind into an android body far more Human in appearance than Data's – manages to recover his "children", and transfers Data's memories from B-4 into his own body, unable to complete the new body he had been attempting to construct for his "son".
The comic book series Star Trek: Countdown (a tie-in to the 2009 Star Trek film) and the timeline established for the Star Trek Online game depict Data as alive in 2387. Sometime prior, Geordi La Forge installed Data's emotion chip into B-4's neural net. This caused the uploads to B-4 by Data to fully activate, allowing Data's full memory and personality to assert itself, essentially resurrecting him. Starfleet decided to reinstate the android to service, and by the time of Countdown Data had become captain of the USS Enterprise-E.
The "Guardians" story in Strange New Worlds VII dealt with the Horta culture being transplanted to the planet where the Guardian of Forever resided. The Crystalline Entity visited the world almost a thousand years after the events of Nemesis and described an encounter where it was forced to destroy B-4.