HAL became operational in Urbana, Illinois, at the HAL Plant (the University of Illinois' Coordinated Science Laboratory, where the ILLIAC computers were built). The film says this occurred in 1992, while the book gives 1997 as HAL's birth year.[2] In 2001: A Space Odyssey, HAL is initially considered a dependable member of the crew, maintaining ship functions and engaging genially with its human crew-mates on an equal footing. As a recreational activity, Frank Poole plays against HAL in a game of chess. In the film the artificial intelligence is shown to triumph easily. However, as time progresses, HAL begins to malfunction in subtle ways and, as a result, the decision is made to shut down HAL in order to prevent more serious malfunctions. The sequence of events and manner in which HAL is shut down differs between the novel and film versions of the story. In the aforementioned game of chess HAL makes minor and undetected mistakes in his analysis, a possible foreshadowing to HAL's malfunctioning.

In the film, astronauts David Bowman and Frank Poole consider disconnecting HAL's cognitive circuits when he appears to be mistaken in reporting the presence of a fault in the spacecraft's communications antenna. They attempt to conceal what they are saying, but are unaware that HAL can read their lips. Faced with the prospect of disconnection, HAL decides to kill the astronauts in order to protect and continue its programmed directives, and to conceal its malfunction from Earth. HAL uses one of the Discovery's EVA pods to kill Poole while he is repairing the ship. When Bowman uses another pod to attempt to rescue Poole, HAL locks him out of the ship, then disconnects the life support systems of the other hibernating crew members. Dave circumvents HAL's control, entering the ship by manually opening an emergency airlock with his service pod's clamps, detaching the pod door via its explosive bolts. Bowman jumps across empty space, reenters Discovery, and quickly repressurizes the airlock.

The novel explains that HAL is unable to resolve a conflict between his general mission to relay information accurately, and orders specific to the mission requiring that he withhold from Bowman and Poole the true purpose of the mission. (This withholding is considered essential after the findings of a psychologic experiment, "Project Barsoom", where humans were made to believe that there had been alien contact. In every person tested, a deep-seated xenophobia was revealed, which was unknowingly replicated in HAL's constructed personality. Mission Control did not want the crew of Discovery to have their thinking compromised by the knowledge that alien contact was already real.) With the crew dead, HAL reasons, he would not need to lie to them. He fabricates the failure of the AE-35 antenna-steering unit so that their deaths would appear accidental.

In the novel, the orders to disconnect HAL come from Dave and Frank's superiors on Earth. After Frank is killed while attempting to repair the communications antenna—his oxygen hose gets disconnected and he is pushed away into deep space—Dave begins to revive his hibernating crewmates, but is foiled when HAL vents the ship's atmosphere into the vacuum of space, killing the awakening crew members and almost killing Dave. Dave is only narrowly saved when he finds his way to an emergency chamber which has its own oxygen supply and a spare space suit inside.

In both versions, Bowman then proceeds to shut down the machine. In the film, HAL's central core is depicted as a crawlspace full of brightly lit computer modules mounted in arrays from which they can be inserted or removed. Bowman shuts down HAL by removing modules from service one by one; as he does so, HAL's consciousness degrades. HAL regurgitates material that was programmed into him early in his memory, including announcing the date he became operational as 12 January 1992 (in the novel, it's 1997). When HAL's logic is completely gone, he begins singing the song "Daisy Bell" (in actuality, the first song sung by a computer).[3][4] HAL's final act of any significance is to prematurely play a prerecorded message from Mission Control which reveals the true reasons for the mission to Jupiter.

In the sequel 2010: Odyssey Two, HAL is restarted by his creator, Dr. Chandra, who arrives on the Soviet spaceship Leonov.

Prior to leaving Earth, Dr. Chandra has also had a discussion with HAL's twin, the SAL 9000. Like HAL, SAL was created by Dr. Chandra. Whereas HAL was characterised as being "male", SAL is characterised as being "female" (voiced by Candice Bergen) and is represented by a blue camera eye instead of a red one.

Dr. Chandra discovers that HAL's crisis was caused by a programming contradiction: he was constructed for "the accurate processing of information without distortion or concealment", yet his orders, directly from Dr. Heywood Floyd at the National Council on Astronautics, required him to keep the discovery of the Monolith TMA-1 a secret for reasons of national security. This contradiction created a "Hofstadter-Moebius loop", reducing HAL to paranoia. Therefore, HAL made the decision to kill the crew, thereby allowing him to obey both his hardwired instructions to report data truthfully and in full, and his orders to keep the monolith a secret. In essence: if the crew were dead, he would no longer have to keep the information secret.

The alien intelligence initiates a terraforming scheme, placing the Leonov, and everybody in it, in danger. Its human crew devises an escape plan, which unfortunately requires leaving the Discovery and HAL behind, to be destroyed. Dr. Chandra explains the danger, and HAL willingly sacrifices himself so that the astronauts may escape safely. In the moment of his destruction, the monolith-makers transform HAL into a non-corporeal being, so that David Bowman's avatar may have a companion.

The details in the book and the film are nominally the same, with a few exceptions. First, in contradiction to the book (and events described in both book and film versions of 2001: A Space Odyssey), Heywood Floyd is absolved of responsibility for HAL's condition; it is asserted that the decision to program HAL with information concerning TMA-1 came directly from the White House. In the film, HAL functions normally after being reactivated, while in the book it is revealed that his mind was damaged during the shutdown, forcing him to begin communication through screen text. Also, in the film the Leonov crew lies to HAL about the dangers that he faced (suspecting that if he knew he would be destroyed he would not initiate the engine-burn necessary to get the Leonov back home), whereas in the novel he is told at the outset. However, in both cases the suspense comes from the question of what HAL will do when he knows that he may be destroyed by his actions.

The basic reboot sequence initiated by Dr. Chandra in the movie 2010 is voiced from HAL as, "HELLO_DOCTOR_NAME_CONTINUE_ YESTERDAY_TOMORROW" (which in the novel 2010 is a longer sequence).

Clarke noted that the film 2001 was criticized for not having any characters, except for HAL and that a great deal of the establishing story on Earth was cut from the film (and even from Clarke's novel).[5] Early drafts of Clarke's story called the computer Socrates (a preferred name to Autonomous Mobile Explorer–5), with another draft giving the computer a female personality called Athena.[6] This name was later used in Clarke and Stephen Baxter's A Time Odyssey novel series.

The earliest draft depicted Socrates as a roughly humanoid robot, and is introduced as overseeing Project Morpheus, which studied prolonged hibernation in preparation for long term space flight. As a demonstration to Senator Floyd, Socrates' designer, Dr. Bruno Forster, asks Socrates to turn off the oxygen to hibernating subjects Kaminski and Whitehead, which Socrates refuses, citing Asimov'sFirst Law of Robotics.[7]

In a later version, Poole is killed outside the spacecraft, triggering the need for Bowman to revive Whitehead. The revival does not go according to plan, and after briefly awakening, Whitehead dies. Athena announces "All systems of Poole now No–Go. It will be necessary to replace him with a spare unit."[8] After this, Bowman decides to go out in a pod and retrieve the antenna, which is moving away from the ship. Athena will not originally let him go, citing a "Directive 15", but eventually relents.[9]

During rehearsals Kubrick asked Stefanie Powers to supply the voice of HAL 9000 while searching for a suitably androgynous voice so the actors had something to react to. On the set, British actor Nigel Davenport played HAL.[10][11] When it came to dubbing HAL in post-production, Kubrick had originally cast Martin Balsam, but as he felt Balsam "just sounded a little bit too colloquially American", he was replaced with Douglas Rain, who "had the kind of bland mid-Atlantic accent we felt was right for the part."[12] Rain was only handed HAL's lines instead of the full script, and recorded them across a day and a half.[13]

HAL's point of view shots were created with a Cinerama 160-degree Fairchild-Curtis wide-angle lens. This lens is about 8 inches (20 cm) in diameter, while HAL's prop eye lens is about 3 inches (7.6 cm) in diameter. Stanley Kubrick chose to use the large Fairchild-Curtis lens to shoot the HAL 9000 POV shots because he needed a wide-angle fisheye lens that would fit onto his shooting camera, and this was the only lens at the time that would work. The HAL 9000 faceplate, without lens, was discovered in a junk shop in Paddington, London, in the early 1970s by Chris Randall.[14] Research[who?] revealed that the original lens was a Nikon Nikkor 8mm F8.[citation needed] This was found along with the key to HAL's Brain Room. Both items were purchased for ten shillings (£0.50) The collection was sold at a Christies auction in 2010 for £17,500.[15]

Although it is often conjectured that the name HAL was based on a one-letter shift from the name IBM, this has been denied by both Clarke and 2001 director Stanley Kubrick.[1] In 2010: Odyssey Two, Clarke speaks through the character of Dr. Chandra (he originally spoke through Dr. Floyd until Chandra was awakened), who characterized this idea as: "[u]tter nonsense! [...] I thought that by now every intelligent person knew that H-A-L is derived from Heuristic ALgorithmic".[16][17]

Clarke more directly addressed this issue in his book The Lost Worlds of 2001:[6]

As is clearly stated in the novel (Chapter 16), HAL stands for Heuristically programmed ALgorithmic computer. However, about once a week some character spots the fact that HAL is one letter ahead of IBM, and promptly assumes that Stanley and I were taking a crack at the estimable institution ... As it happened, IBM had given us a good deal of help, so we were quite embarrassed by this, and would have changed the name had we spotted the coincidence.

Also, IBM is explicitly mentioned in the film 2001, as are many other real companies. IBM is given fictional credit as being the manufacturer of the Pan Am Clipper's computer, and the IBM logo can be seen in the center of the cockpit's instrument panel. In addition, the IBM logo is shown on the lower arm keypad on Poole's space suit in the scene where he space walks to replace the antenna unit, and may possibly be shown reflected on Bowman's face when he is inside the pod on his way to retrieve the body of Poole (there is speculation as to whether or not the reflection is that of the letters "IBM" or the letters "MGM", the film studio).

HAL has inspired some designs of intelligent computers in some science fiction films, like "Mother" (MU-TH-R 182 model 2.1 terabyte AI Mainframe) in Alien, VIKI in I, Robot, and AUTO in Wall-E.[19]

HAL's capabilities, like all the technology in 2001, were based on the speculation of respected scientists. Marvin Minsky, director of the MIT Computer Science and Artificial Intelligence Laboratory (CSAIL) and one of the most influential researchers in the field, was an adviser on the film set.[20] In the mid-1960s, many computer scientists in the field of artificial intelligence were optimistic that machines with HAL's capabilities would exist within a few decades. For example, AI pioneer Herbert A. Simon at Carnegie Mellon University, had predicted in 1965 that "machines will be capable, within twenty years, of doing any work a man can do",[21] the overarching premise being that the issue was one of computational speed (which was predicted to increase) rather than principle.