In ID4 it's implied that our computers are based on technology we've been slowly reverse engineering from the Roswell crash. There's also a deleted scene with a throwaway line about how he's able to write the virus so quickly.
See also the official CERT Advisory [1] on vulnerabilities in the ID4 Alien/OS, warning of potential denial of service attacks by inferior life forms and recommending various workarounds in the event that planetary takeover is necessary (yes, it's a joke, but having been published within hours of the first screening of the movie this may well have been the fastest CERT vulnerability response in history)