U.S. chipmaker Nvidia said on Monday it will buy Israeli chip designer Mellanox Technologies for $6.8 billion, beating rival Intel in a deal that would help the company boost its data center business.

"The data center has become the most important computer in the world," Nvidia CEO Jensen Huang told CNBC's "Squawk Alley" Monday. "The thing that's really exciting is that the computer no longer starts and ends at the server. The computer in the future would extend into the network. ... And what we want to do is, we want to extend our computing reach from the server, where we are today, out to the entire data center."

The all-cash offer of $125 per share represents a premium of 14 percent to Mellanox's Friday close. Shares of Mellanox rose more than 8 percent and Nvidia shares rose more than 4 percent Monday.

The deal follows a competitive bidding process, which according to sources familiar with the matter included rival chipmakers such as Intel. CNBC reported in November that Xilinx was also part of process.

Intel declined to comment on whether the company had bid for Mellanox, while Xilinx did not immediately respond to a request for comment.

Mellanox, based in Israel and the United States, makes chips and other hardware for data center servers that power cloud computing. The company had a market capitalization of about $5.9 billion at the end of trading on Friday.

Bernstein analyst Stacy Rasgon said Nvidia has been pushing more into networking and connectivity with its own tailored solutions and Mellanox would bring further expertise along these lines.

"But going out and buying an asset right now, immediately after the recent spate of guide downs may raise a few eyebrows," said Rasgon.

"It will probably spark questions as to whether NVDA sees anything changing regarding the growth trajectory of their core datacenter business."

Nvidia cut its fourth-quarter revenue estimate by half a billion dollars in January because of weak demand for its gaming chips in China and lower-than-expected data center sales.

Data center revenue accounts for nearly a third of Nvidia's sales. The chipmaker has grown at a rapid pace in the past few years under Chief Executive Officer Jensen Huang, but a slowdown in China and a fading cryptocurrency craze have started to weigh on its sales in recent quarters.

The deal is expected to close by end of 2019 and analysts do not see any regulatory hurdles. Rival Intel would have faced challenges as it along with Mellanox are dominant suppliers of InfiniBand technology, a networking standard commonly used in supercomputers.

The acquisition is also a win for the New York-based activist investor Starboard Value, which owns a 5.8 percent stake in Mellanox and had reached a deal with it last year over the composition of its board.

—CNBC's Sara Salinas contributed to this report.