(JP Mangalindan FORTUNE) Apple and Microsoft's relationship has had more twists and turns than Liz and Dick's. The two have been bitter rivals, vital partners -- even coolly indifferent. Microsoft's new Surface tablet could change things again. Apple's iPad has some 55% of the market. Amazon (AMZN) and Google (GOOG) have largely offered cheaper alternatives to compete. But Microsoft (MSFT) is taking Apple (AAPL) on directly: The Surface sells for a premium price. And analysis by firm IHS iSuppli suggests that Microsoft's -- not Apple's -- device has higher margins. If things go well, Microsoft could capture some 9% of sales by 2016, Gartner Research estimates. That's still far behind Apple, but not bad for a latecomer. Here's a look at what goes into making the two devices.
Note: Microsoft Surface RT with 32GB of storage and third-generation Apple iPad with 32GB of storage pictured. Cost of parts includes prices of components not listed, but not cost to manufacture. Source: IHS iSuppli