Ash is the science officer aboard the Nostromo, and he ticks all the right boxes for a movie scientist. Humorless? Check. Intelligent? Double-check. Able to science any science regardless of field of study? You bet. In fact, Ash seems to embody the science fiction trope fans of the genre have lovingly called The Spock.
The Spock Abides
According to TVTropes.org, the Spock is "a character who will always think before acting [and] is an archetype that can be loosely summed up as the tendency to apply rules, reason and the greater good to all his/her decisions." While characters around him will operate with a normal range of human feelings and emotions, the Spock will out stoic the most stoic of Stoics (source).
We see this side of Ash several times during the first half of the film. When the unknown signal is discovered, he reminds everyone that they're contractually obligated to investigate. He's also the voice of reason in several scenes, as when Ripley reads part of the deciphered signal:
Ripley: Ash, that transmission, Mother's deciphered part of it. It doesn't look like an S.O.S.
Ash: What is it?
Ripley: It looks like a warning. I'm going to go out after them.
Ash: What's the point? I mean, by the time it takes to get there they'll know if it is a warning or not. Yes? (Alien)
Fair enough. Ripley may be worried about her crew members, but going out after them wouldn't actually help. You can almost hear Ripley think, "Why you green-blooded, inhuman, Vulcan!"
Unfortunately for fandoms everywhere, Ash starts doing some very un-Spock things as the story progresses. When the crew returns to the ship with Kane covered in unknown alien, Ash doesn't follow Ripley's orders despite the fact that she is senior officer on board and despite the fact that she's following very explicit protocol. In fact, he willingly breaks quarantine law and admits the away team.
So, did he forget the science division's basic quarantine law? According to him, no. Ash tells Ripley that Kane's only chance for survival was to get him aboard the ship and adds, "You do your job and let me do mine. Yes?" (ibid)
Hm, something seems a bit off with this logic. Ash's job is to follow the rules of the science division, like the quarantine law, right? And wasn't he the guy quoting the rule book to Parker when it came to investigating the unknown signal? As Mr. Spock would say, something here is "Highly illogical."
Domo Arigato, Killer Roboto
Of course, we eventually find out that Ash is a robot—okay, android—but first let's consider Ian Holm's performance. When you re-watch Alien, you can see that Holm gives us some sneaky little hits that all is not quite right with Ash.
Like his weird twitchy moments. Before sitting in his communications seat to monitor the away team, we see Ash run in place for no apparent reason. He also makes these odd mouth movements, right before he and Ripley have their talk about his admitting Kane and the others onto the ship. You can spy it right before he looks into the microscope.
These tiny little movements make Ash look uncomfortable in his skin, like it just doesn't fit right on him. (You could say they're like glitches in the matrix, if you didn't mind about being anachronistic.) In fact, in the follow-up flick Aliens, the android Bishop shouts out to this quality of Holm's performance, noting "The A2s always were a bit twitchy" (source).
Then there are subtle signs that Ash never quite fits in with the rest of the crew. In the opening breakfast scene, he is initially filmed away from the group before joining, and during Kane's last supper, he sits on the opposite side of the table from the rest of the crew. At another point in the film, he sits in Parker's seat and Parker asks him to move in a way that suggests, duh, he should have known better than to park his mechanical butt in Parker's precious seat. (Or whatever. We aren't Parker's biggest fans, okay?)
After Dallas's death, Ripley unlocks the mystery to Ash's subtle weirdness: the Company has provided Ash the secret mission of protecting the alien at all costs. One this secret is out, Ash attempts to murder Ripley in a suitably weird way: by choking her to death with a rolled-up porno magazine. When Parker and Lambert stop him, the struggle knocks his head off and reveals him to be an android.
This reveal is playing on the science fiction trope of the Spock. In classic science fiction, the scientist character will use reason and the power of science to provide a solution to the problems faced by the characters. Here, the science officer is part of the problem and, as per Jack P. Rawlins, "our defense against the nightmare proves to be another nightmare" (source)
And that nightmare is the rule of reason. According to Rawlins, "last desperate hope that the rule of reason will triumph is dashed when [Ash] tries to stuff a rolled magazine down Ripley's (Sigourney Weaver's) throat and is revealed to be a machine, indifferent to human survival" (source).
Does that sound like someone—or something—that you know? By the end of his character arc, Ash begins to take on several qualities that mirror the alien. The rolled up magazine he attempts to choke Ripley with looks an awful lot like the alien's deadly phallic mouth. After Parker hits him, Ash emits a milky substance from his mouth, which looks a lot like the substance in the alien's.
Finally, the qualities that Ash admires in the alien—that it is "unclouded by conscience, remorse, or delusions of morality" (Alien)—are apparently traits Ash himself contains. In the end, Ash is a nightmare version of human ruthlessness and reason in the same way the alien is.
Place Your Bets
Ash's final words to the crew are: "I can't lie to you about your chances but you have my sympathies" (ibid). First of all, lol. The machine can't possible compute the idea of sympathy, and his wry smile right before Ripley unplugs him suggests that he considers the very idea of sympathy a joke. That's some seriously dark humor.
From Ash's point of view, admiring the creature—and refusing to help the crew—makes sense. From a rational point of view, they don't stand a chance. He's calculated the odds and they're way, way stacked against the pitiful little humans.
But like most machines who have calculated the odds against humanity, Ash can't science the human spirit and its willingness to adapt and survive. Ripley ultimately and awesomely proves him wrong.