What was the operating income for AMD in Q4 2020 
s to cloud and HPC customers.
We are very pleased with the performance of Milan. We conducted the first public preview of Milan at CES, highlighting 68% better performance compared to two of the highest and dual-socket processors from our competition when running a compute-intensive weather modeling simulation. We're on track to publicly launch our third-gen EPYC Milan processors in March with very strong ecosystem support. In summary, our strong 2020 results and 2021 guidance demonstrate the growing momentum for our leadership product portfolio and the robust demand for high-performance computing.
In the last year, we have all seen firsthand the essential role high-performance computing now plays in our daily lives. And we expect adoption to accelerate over the coming years as we enter a high-performance computing megacycle, driven by the growing adoption of cloud computing services, accelerating digital transformation of industries and experiences, the transition to exascale supercomputing, and the mainstream adoption of AI. Against this backdrop, we are very confident we have the right long-term strategy and capabilities to deliver a strong cadence of leadership products and make AMD the premier technology growth franchise. Longer term, our strategic acquisition of Xilinx further strengthens our technology capabilities and positions us well for growth across a broader set of markets.
We passed several important regulatory milestones to date and remain on track to close the transaction by the end of 2021. I am very proud of what AMD has accomplished over the last few years as our talented and dedicated employees established a new pace for innovation in the high-performance computing industry. I'm even more excited about what we can accomplish over the coming years based on our roadmaps and the strong opportunities we see to play an even larger strategic role with our customers and partners. Now, I'd like to turn the call over to the Devinder to provide some additional color on our fourth-quarter and full-year financial performance.
Devinder.
Devinder Kumar -- Executive Vice President, Chief Financial Officer, and Treasurer
Thank you, Lisa, and good afternoon, everyone. 2020 was an outstanding year for AMD. Our industry-leading product portfolio and market share gains drove record annual and quarterly revenue with full-year revenue growth of 45%. We also achieved record annual net income and free cash flow.
We are pleased with our strong performance and the leverage in our financial model. Fourth-quarter revenue was $3.24 billion, up 53% from a year ago and up 16% from the prior quarter, driven by strong sales of Ryzen and EPYC process and semi-custom game console SoCs. Gross margin was 45%, approximately flat year over year. Operating expenses was $789 million, up 45% year over year, driven by increased investments in R&D, go-to-market activities, and higher variable employee compensation-related expenses.
Operating income was $663 million, up $258 million or 64% from a year ago, driven by significant revenue growth. And operating margin was 20%, compared to 19% a year ago. Net income was $636 million, up $253 million or 66% from a year ago. And diluted earnings per share was $0.52, compared to $0.32 per share a year ago.
Now, turning to the business segment results. Fourth-quarter computing and graphics segment revenue was $1.96 billion, up 18% year over year, primarily driven by a significant Ryzen processor growth. Computing and graphics segment operating income was $420 million, or 21% of revenue, compared to 360-- $360 million a year ago, driven by higher revenue. Enterprise, embedded, and semi-custom segment revenue was $1.28 billion, up 176% year over year, driven by strong semi-custom product sales and continued EPYC server processor momentum across the cloud and enterprise markets.
EPYC processor revenue grew sequentially, including early shipments of third-generation EPYC Milan processors. EESC segment operating income was $243 million, or 19% of revenue, compared to an operating income of $45 million a year 
s to cloud and HPC customers.
We are very pleased with the performance of Milan. We conducted the first public preview of Milan at CES, highlighting 68% better performance compared to two of the highest and dual-socket processors from our competition when running a compute-intensive weather modeling simulation. We're on track to publicly launch our third-gen EPYC Milan processors in March with very strong ecosystem support. In summary, our strong 2020 results and 2021 guidance demonstrate the growing momentum for our leadership product portfolio and the robust demand for high-performance computing.
In the last year, we have all seen firsthand the essential role high-performance computing now plays in our daily lives. And we expect adoption to accelerate over the coming years as we enter a high-performance computing megacycle, driven by the growing adoption of cloud computing services, accelerating digital transformation of industries and experiences, the transition to exascale supercomputing, and the mainstream adoption of AI. Against this backdrop, we are very confident we have the right long-term strategy and capabilities to deliver a strong cadence of leadership products and make AMD the premier technology growth franchise. Longer term, our strategic acquisition of Xilinx further strengthens our technology capabilities and positions us well for growth across a broader set of markets.
We passed several important regulatory milestones to date and remain on track to close the transaction by the end of 2021. I am very proud of what AMD has accomplished over the last few years as our talented and dedicated employees established a new pace for innovation in the high-performance computing industry. I'm even more excited about what we can accomplish over the coming years based on our roadmaps and the strong opportunities we see to play an even larger strategic role with our customers and partners. Now, I'd like to turn the call over to the Devinder to provide some additional color on our fourth-quarter and full-year financial performance.
Devinder.
Devinder Kumar -- Executive Vice President, Chief Financial Officer, and Treasurer
Thank you, Lisa, and good afternoon, everyone. 2020 was an outstanding year for AMD. Our industry-leading product portfolio and market share gains drove record annual and quarterly revenue with full-year revenue growth of 45%. We also achieved record annual net income and free cash flow.
 We are pleased with our strong performance and the leverage in our financial model. Fourth-quarter revenue was $3.24 billion, up 53% from a year ago and up 16% from the prior quarter, driven by strong sales of Ryzen and EPYC process and semi-custom game console SoCs. Gross margin was 45%, approximately flat year over year. Operating expenses was $789 million, up 45% year over year, driven by increased investments in R&D, go-to-market activities, and higher variable employee compensation-related expenses.
Operating income was $663 million, up $258 million or 64% from a year ago, driven by significant revenue growth. And operating margin was 20%, compared to 19% a year ago. Net income was $636 million, up $253 million or 66% from a year ago. And diluted earnings per share was $0.52, compared to $0.32 per share a year ago.
Now, turning to the business segment results. Fourth-quarter computing and graphics segment revenue was $1.96 billion, up 18% year over year, primarily driven by a significant Ryzen processor growth. Computing and graphics segment operating income was $420 million, or 21% of revenue, compared to 360-- $360 million a year ago, driven by higher revenue. Enterprise, embedded, and semi-custom segment revenue was $1.28 billion, up 176% year over year, driven by strong semi-custom product sales and continued EPYC server processor momentum across the cloud and enterprise markets.
EPYC processor revenue grew sequentially, including early shipments of third-generation EPYC Milan processors. EESC segment operating income was $243 million, or 19% of revenue, compared to an operating income of $45 million a year 