Mar 09


100 million lines of code in your car,
100 million lines of code,
If one of the lines develops a bug…

An article by IEEE indicates that a premium-class automobile “contains close to 100 million lines of software code.”  The software executes on 70-100 microprocessor-based electronic control units (ECUs) networked throughout the body of your car.  Even low-end cars have 30-50 ECUs embedded in the body, doors, dash, roof, trunk, seats, etc.  Software controls just about everything from your brakes to the volume of your radio.

“Automobiles are no longer a battery, a distributor or alternator, and a carburetor; they are hugely modern in their complexity,” says Thomas Little, an electrical engineering professor at Boston University who is developing intelligent transportation systems. “The goals to save energy, reduce [emissions], and improve safety have driven the specialization and adoption of electronics in particular.”

And like its PC counterpart, software in automobiles continues to grow in size and complexity.  For example, BMW has announced that its 2009 models will be equipped with BMW Assist system, which can notify emergency personnel not only where an accident occurred, but also the likelihood of passengers being severely injured.



The first production automotive microcomputer ECU was a single-function controller used for electronic spark timing in the 1977 General Motors Oldsmobile Toronado.  In 1978, GM introduced the Cadillac Trip Computer, a modified Motorola 6802 microprocessor chip that displayed fuel, trip, and engine information.  GM also used the chip to test how well a microprocessor could control critical system functions such as port fuel injection, electronic spark timing, and cruise control.

Read the IEEE article.

This story reminds me of an old joke…

If GM had developed technology like Microsoft, we would all be driving cars with the following characteristics:

  1. For no reason whatsoever, your car would crash twice a day.
  2. Every time they repainted the lines in the road, you would have to buy a new car.
  3. Occasionally your car would die on the freeway for no reason. You would have to pull to the side of the road, close all of the windows, shut off the car, restart it, and reopen the windows before you could continue. For some reason you would simply accept this.
  4. Occasionally, executing a maneuver such as a left turn would cause your car to shut down and refuse to restart, in which case you would have to reinstall the engine.
  5. Macintosh would make a car that was powered by the sun, was reliable, five times as fast and twice as easy to drive — but would run on only five percent of the roads.
  6. The oil, water temperature, and alternator warning lights would all be replaced by a single “This Car Has Performed An Illegal Operation” warning light.
  7. The airbag system would ask “Are you sure?” before deploying.
  8. Occasionally, for no reason whatsoever, your car would lock you out and refuse to let you in until you simultaneously lifted the door handle, turned the key and grabbed hold of the radio antenna.
  9. Every time a new car was introduced car buyers would have to learn how to drive all over again because none of the controls would operate in the same manner as the old car.
  10. You’d have to press the “Start” button to turn the engine off.
Share and Enjoy:
  • Twitter
  • Facebook
  • Reddit
  • LinkedIn
  • Digg
  • DotNetKicks
  • StumbleUpon
  • Slashdot
  • Technorati
  • Google Bookmarks
  • Print
  • email

Article published on March 9, 2009




10 Responses to “100 Million Lines of Code in Your Car”

  1. Paul Says:

    I was surprised to learn there was that much code in a car.

    Separately, and picking nits, this line really set me off: “If one of the lines develops a bug”

    The days of insects and mechanical switches being the problem are far behind us — these days, it should be called a defect and the programmer should take responsibility for it, rather than the “Oh, software has bugs”-attitude that prevails. :(

  2. Saif AL-Khuraisat Says:

    Me also, I was surprised to know this much of code is available in cars.

  3. Tim Says:

    It amazed me that cars run so well with this much code.

    I’ve had a copy of the “if Microsoft built cars” joke for more than a decade now. I still think some of it is reality. For example:
    4. I had a car that started to die in a left turn. The engine stayed, but a sensor was replaced.
    6. “This Car Has Performed An Illegal Operation” is too long for the dashboard. Most cars use “Check Engine” or an engine shaped icon. I have yet to find where a Dr. Watson log or system dump is stored.
    8. My wife was at an exercise class. Another woman there had the same make of car. My wife grabbed her keys (both sets were identical), and inserted the key in the ignition, which was then disabled. The locksmith showed her the key combination to reset the ignition.
    9. No, just have different manufacturers. I consistently turn on wipers because the same control turns on lights in the other car.
    10. Funny, I used the ignition to turn the car on and off. Same switch does both.

  4. Steve Perham Says:

    The main issue on this subject is that the motors manufactures keep all these codes to themselves. What makes matters worse is that there are different languages within the cars so all makes have to be retro-engineered. The ECU market is the domain of Delphi. Bosch, Valeo, Siemens and others and is very specialised. Specialised garage tools allow the data to be decoded and displayed on computers however with condition based servces around the corner the average vehicle will now service themselves when logged on to the home computer, Fact or fiction ? Actually its happening now – see http://www.airmaxremote.com

  5. Friday Links #42 | Blue Onion Software * Says:

    [...] 100 Million Lines of Code in Your Car – An article by IEEE indicates that a premium-class automobile “contains close to 100 million lines of software code.”  The software executes on 70-100 microprocessor-based electronic control units (ECUs) networked throughout the body of your car.  Even low-end cars have 30-50 ECUs embedded in the body, doors, dash, roof, trunk, seats, etc.  Software controls just about everything from your brakes to the volume of your radio. [...]

  6. 100 Million Lines of Code in Your Car - Nick Berardi’s Coder Journal Says:

    [...] was reading over on DevTopic today about how 100 Million Lines of Code is pretty common in cars today.  We have come a really long way since 1977 when the first micro-chip was introduced [...]

  7. oldsmobile engine Says:

    What’s worse with 100 million lines of code is that most of these are coded in Assembly language – the syntax closest to what machines could understand and one of the hardest ones to debug.

  8. eeyrsja Says:

    Not quite accurate about the assembly language. Actually most auto-software is actually written in very high level languages like Simulink nowadays, which is then automatically coded into C. There is still some assembly hand written for i/o drivers, etc. (shudders!)

  9. A Complexity Crisis Says:

    [...] are more than 100,000,000 lines of code running over dozens of processors in a contemporary automobile. That programming controls [...]

  10. Timm Says:

    This article has been translated with permission into Serbo-Croation language at http://science.webhostinggeeks.com/100-miliona-linija

Leave a Reply