Profile picture
, 28 tweets, 15 min read Read on Twitter
Quick thread (not for geeks!)🔥🔥
1/ Remember that Y2K problem? Yeah that one that was over-hyped in 1999?
It will recur in 2038, LOL.
@alexmarufu @Auzqn @Stella_grooves @Techzim @garweh2011 @xandatoto @daddyhope @Busisa74 @Min_of_IC @FinanceZim @GGuvamatanga @Mavhure @Duke18n
2/ Millenium bug was because of whats known INTEGER OVERFLOW in computer science. It was due to fact that decades ago when computers systems were designed, the year was set a as a 2-digit code, eg, 99, not 1999. The computer roll back to 00 instead of 2000 @daddyhope @DMusaru
3/ This overflow of integers in a 2-digit format was feared to cause banking systems and other systems like power, etc to roll bank and crash.
Many Gvts set up huge committees to implement a simple solution of just expanding the memory to 4 digits. @tafadzwamarere
4/ In the end, there was no major catastrophe, except that a nuclear plant in Japan had some of its systems fail, and US detected missile launches in Russia but simply attributed it to the bug.
5/ While some countries invested lots of money to fix the problem, Russia & South Korea did not. They simply ignored the issue.

In Zimbabwe, Mugabe appointed Chombo to lead a committee to deal with the issue (I don't know why he chose Chombo).
6/ Now to the 2038 problem!

The 2038 problem will be caused again by integer overflow. This is most systems (Unix) were designed to store dates it as a signed 32-bit binary integer post 1 January 1970.
7/ AS a result, some computer clocks are expected to wrap around in 2038 because the signed 32-bit integer time format will be 03:14:07 UTC on Tuesday, 19 Jan 2038 -> (231-1 = 2,147,483,647 secs after 1 Jan 1970).

A 32 bit design will either wrap it around to negative of zero.
8/ When I studied CS many years ago, my interest was in aerospace related stuff. So the integer overflow issue creates real problems and here are some examples:
9/ Got too lazy to finish my thread on computer engineering & integer overflow. But now that Boeing 737 MAX 8 is having issues, some examples

@alexmarufu @Auzqn s @Techzim @garweh2011 @xandatoto @daddyhope @Busisa74 @Min_of_IC @FinanceZim @GGuvamatanga @Mavhure @Duke18n
10/ It seems the Boeing 737 MAX8 issue is software related.
Example 1: CNES
France's equivalent of Nasa is called Centre National d'études Spatiales. Its Ariane 5's first test flight Flight 501 failed & self-destructed in June 1996 after the control software mal-functioned.
11/ Problem? - A bug in the software.
It was supposed to convert data from 64-bit to 16-bit signed integer value to be stored as a variable. But the 64 bit floating point value was too large to be represented by a 16-bit signed integer - self-destructing it 37 seconds mid-air.
12/ It had cost the Europeans $7 billion and 10 years to produce Ariane 5 for launching a pair of three-ton satellites into orbit to gain foothold in the commercial space business.

All the $7 billion went kaput 37 seconds after launch due to the software bug.
13/ In simple terms, the rocket exploded because the control softwar tried to convert one piece of data from a 64-bit format to a 16-bit format. The 64 bit was too large for the 16bit causing an overflow error!

The New York Times then described the fatal accident as follows:
14/ Example 2 - Patriot Missile Failure.
During the Gulf War in 1991, the US planned to use the Patriot ballistic missile system to shoot down Saddam's SCUD missiles.

But the first use dramatically failed due to a software bug arising from the same problem.
15/ In 1991 on February 25, the Patriot Missile battery in Dharan, Saudi Arabia, failed to track and intercept an incoming Iraqi Scud missile. The Scud struck an American Army barracks, killing 28 soldiers and injuring around 100 other people. How did this happen?
16/ It happened due to a problem called floating point impression in software design which tracked the timestamp. The system had operated for 100 hours prior. The computer's registers were 24 bits long. The longer the system ran, the more inaccurate its timing became.
17/ It was designed to track time to an accuracy of about a tenth of a second, performed using a 24 bit fixed point register. This meant that the system chopped numbers at 24 bits after the radix point.
18/ This chopping error, when multiplied by the large number giving the time in tenths of a second, led to a significantly magnified error in timing.

After running for a 100 hrs, this truncation error would increase to 0.34 seconds. For missiles, that's an error of life & death.
19/ The 0.34 seconds 1/10th error computed this way = 1/24+1/25+1/28+1/29+1/212+1/213+....
This makes the binary expansion of 1/10 as 0.0001100110011001100110011001100....

But the 24 bit register stored instead 0.00011001100110011001100 creating the 0.34 seconds error.
20/ A simple way to understand the floating-point imprecision related to the Patriot is to think of a fraction like two thirds. In decimals, that is 0.666666666.....∞. The 666 keeps going. When u fit that into bits, you loose precision due to chopping off some of the 666666..
21/ Saddam's scuds traveled at Mach 5. His engineers had knocked off some weight from warheads to gain more speed, making them wobble as they traveled.

At that speed, the error of 0.34 seconds was as large as 600 meters.

So the scud hit Dharan On Feb 25, 1991, killing 28.
22/ You can view an explanation video by History Channel of the integer overflow and the floating point rounding off error here

This video helps bring computer speak to something much more easy to understand.
23/ Example 3 (illustration) - odometers.
When the Isuzu twin cab first came to Zimbabwe in mid 90s, it had a mechanical odometer like many cars. It was very popular with white farmers. Eventually there would be a cascade of numbers setting all digits to 0 after 9999...
25/ In April 2015, the FAA ordered operators of Boeing 787 Dreamliners to shut down the plane’s electrical power periodically. They had discovered a software error that could result in a total loss of power.
This problem was discovered in lab/simulation tests.
26/ The simulation tests showed that the plane’s power control units could shut down power generators if they were powered non-stop for 248 days, or about eight months.
Generators on a plane power things like the plane’s avionics, de-icing wing parts & pressurizing the cabin.
27/ Lets end the thread with an interesting example.
Example 5. Gangnam Style!

Youtube initially had a signed 32-bit integer design. That was until Psy's video Gangnam style breached the max number of views the system cld handle of 2,147,483,647 (two billion views) on Dec 2014.
28/ Youtube was forced to redesign its view numbers function to a 64 bit system to avoid the integer overflow problem.

A Youtube spokesperson then said: "We never thought a video would be watched in numbers greater than a 32-bit integer, but that was before we met Psy"

(Fin)
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to mmatigari
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!