The short answer is that they used a 4-function calculator chip with just 320 words of ROM and managed to reprogram it into a cheap scientific calculator, a remarkable feat. The tradeoff was that the calculator was very slow and inaccurate.