An artist's impression of a young star surrounded by a protoplanetary disc in which planets are forming is seen in this handout image provided by European Southern Observatory (ESO) on November 6, 2014. Concentric rings of gas, with gaps indicating planet formation, are visible in this artist's impression and were predicted by computer simulations. Some of the most detailed images ever taken of new planets being born around a star were published on Thursday, which astronomers said could transform theories about planet formation. REUTERS/ESO/Handout via Reuters (CHILE - Tags: SCIENCE TECHNOLOGY)   ATTENTION EDITORS - THIS PICTURE WAS PROVIDED BY A THIRD PARTY. REUTERS IS UNABLE TO INDEPENDENTLY VERIFY THE AUTHENTICITY, CONTENT, LOCATION OR DATE OF THIS IMAGE. FOR EDITORIAL USE ONLY. NOT FOR SALE FOR MARKETING OR ADVERTISING CAMPAIGNS. THIS PICTURE IS DISTRIBUTED EXACTLY AS RECEIVED BY REUTERS, AS A SERVICE TO CLIENTS. NO SALES. NO ARCHIVES
End of the world as we know it? (Picture: Reuters/ESO)

The world as we know it might end in 2038.

That’s because billions of computer systems, internet providers, mobile phones, and other services have a built-in numerical threshold, meaning some systems may fail when their memory counts reach a certain number.

This conundrum means that computer systems may be completely wiped out in 24 years – specifically on January 19, 2038 – due to this new type of millennium bug. This is called the ‘Year 2038 Problem’.

The ‘Year 2038 Problem’ has long been theorised but after Psy’s Gangnam Style almost broke YouTube earlier this month – experts now believe this issue could be more than just a theory.

Gangnam Style, a music video featuring a South Korean pop star jiggling around in a rodeo-style dance, almost broke the social network after viewing was poised to exceed 2,147,483,647 plays on Dec 3.

After this number YouTube was unable to count higher – a problems that have broken the Google-owned site had the companies vast number of geeks not come up with a quick fix.

The reason behind the near meltdown involves the nuts and bolts of computer memory: i.e. bits and bytes.

In binary – where digits are represented as either 0 or 1 – the maximum number a 32-bit system (four bytes) can represent is 4,294,967,295. Split that in half (to allow both positive and negative values) and your total number of plays is 2,147,483,647. A 16-bit system has two bytes where each byte represents an eight-digit binary number.

When YouTube was set up, the site, as with many other systems, used this 32-bit system meaning its threshold was 2,147,483,647 views per video.

MORE : Beast of Bodmin mystery finally solved: It’s a cat.

MORE: Stray cat sneaks under gourmet fish counter, gorges himself on nearly £1,000 of marine delicacies

Glenn Fleishman, a writer for the Economist, said: ‘When YouTube was set up, its programmers decided to use a 32-bit number to store the number of views, which seemed a very reasonable choice at the time.’

Luckily for YouTube, the company was able to issue a quick fix to increase systems to 64-bits, meaning they can now count to a huge 9,223,372,036,854,775,808.

But for other 32-bit systems, the fear is that they won’t be able to issue a patch and will therefore fail when they hit the threshold.

National Security Agency, spies, secret bugging device, Cottonmouth II, Edward Snowden, Russian army, China foreign ministry, Saudi Arabia, India, Pakistan
Computers may be wiped out in 2038 (Picture: Alamy)

This has led to concerns that by 2038 time will ‘run out’ for these systems… leading to technological failure on a mass scale.

Among those affected is anything with a Unix operating system. This includes Android and Apple phones, iMacs, and most internet servers.

The exact date for this has been set at January 19, 2038 at around 3.14am (and seven seconds) GMT.

Mr Fleishman said: ‘By default, Unix counts time in seconds from midnight GMT on January 1, 1970, using a 32-bit signed integer, which means it cannot count more than 2,147,483,647 seconds past that time, thus creating what is known as the “Year 2038 Problem”, akin to the Millennium Bug.

‘Modern versions of the operating system have solved this problem by moving to a 64-bit signed integer to count seconds, but some ancient devices or those running ancient software may fail unpredictably.’

Perhaps Psy may have even caught up on those 9 quintillion YouTube views by then as well.