Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Lift Supports and Punch Cards


Technology has a habit of hanging around well past its welcome, like a dinner guest who, despite their empty wine glass and the clatter of dishes being cleaned lingers until being handed their car keys.

To the left is a punch card with an VIN, Vehicle Identification Number.  All cars produced since 1981 must be uniquely identified with a standard VIN which means there must be some agreement as to what constitutes a VIN, and such a thing exists at ISO 3833. Wikipedia contains a reasonably good description of the standard if you don't want to shell-out for
Last model year: 2012
the official document.  According to the high priests at the Universal Church of ISO, the world ends in model year 2039, so we know when to schedule the turn-in date on that low-mileage leased car: 5,000 miles a year with a dollar per mile overage.  Who's going to collect when the earth disappears in an existential poof in 2040?  Just don't lease from Sallie Mae, because they'll still be around and they'll be looking for you.

Punch cards, like the one above, encoded data in BCD (binary coded decimal) form.  When stored in a computer, these punch marks were more or less translated to numbers based on the digits punched from the cards, eventuality morphing into EBCDIC.  Standardized in 1963ish by none other than IBM, EBCDIC assigns numeric codes to characters so the data could be manipulated by the CPU, transmitted electronically and stored magnetically.

VIN Punchcard Vestiges

Nice to know a bit of computer history, what does EBCDIC have to do with cars? This all relates quite directly the data stored in digit 9 of every VIN: the check digit.  The first-order check to test if a VIN is valid is a check of the digits of the VIN against a curious algorithm involving translation the alphabetic characters into what seemed to be odd numbers. 

Here's how one calculates a VIN checksum:
  1. Translate alphabetic characters into some number
  2. Multiply each digit by a weight (why? read on)
  3. Divide sum by 11
  4. The remainder from the integer division in step 3 (the modulo, if you want to sound all fancy-pants) is the check-sum
In Step 1, here's the translation:
 
ABCDEFGHJKLMNPRSTUVWXYZ 
12345678123457923456789
    Looking at the translation woke some deeply repressed memories of EBCDIC translation and several unpleasant incidents with reel-to-reel storage and a system called MUMPS.  Clearing the cobwebs and double checking, I was convinced I was seeing punch card encoding again.  Here's a punch card with the letters above punched.  Compare it to the translation table.  Do you see the pattern?

    Let's walk through an example: Pick a letter, let's use M, look at the punch card's top row to locate M, then trace downward to the numbers, notice 4 has been removed (or punched)?  The letter M is encoded to 2 in the table above.  All of the letters above work the same way -- meaning the translation table above maps to a 1960's era, plant-derived storage device.

    But, wait, there's more: encoded in EBCDIC, which is how this data would have been stored, "M" would be represented as D4 in hex or 11010100 in binary.  To do the translation above, the engineer would just need the lower four bits (0100) and to get those the operation is very easy, just need to clear the upper 4 bits with by "anding" (binary and, &, means the result is 1 when both values are 1) with 00001111 (0F in hex):

     11010100
    &00001111
     --------
     00000100

    The result is binary 100, or 4.  Just like what's in the translation table, which is based on lowly punch card.  A bit complex to write out in English, but for a computer, this "and" operation is baked into the CPU itself, typically one assembler instruction that runs in one clock cycle, and therefore executes quickly, which was very important when computers much slower than the phone in your pocket ran the Pentagon in the early 1980's.

    Positional Coefficient

    While we're dissecting the check digit, let's continue with the multiplier for each position in step #2.  This feature of the VIN helps with the common problem of transposition, or swapping two ajacent characters. Consider a three digit VIN

    123

    Now, calculate the check sum by adding the numbers 1+2+3 = 6.  Let's say you wrote the VIN incorrectly as

    132

    This also sums to 6.  Having a multiplier for each position will result in the sum being different (under most conditions...) in the case of transposition.  Clever!

    Last Step: Modulo

    Once we've done our translation and multiplication and summation, the last step is calculating the modulo, or the remainder of integer division.  In this case, we divide the sum by 11 and the remainder is our check digit.  But wait!  It's possible to get 10 as a remainder, but the check digit is just one character, then what?  In this case, the check digit appears as "X".  So not only do we have old-time punch card encoding sneaking around in the VIN, we also have a little influence from our Tiberian friends.

    Like the "and" operation, the CPU contains a "modulo" operator and the operation can be efficiently performed in one clock cycle, at least on modern computers, probably one cycle on old-timey CPUs as well.

    GitHub

    While experimenting with all of this, I ended-up creating some code to do the VIN validation.  Not wanting to leave any development to waste, this can now be found on GitHub here. The committed code contains a little extra, in that it will check the manufacturer code as well.  There's better VIN verification programs out there, but this is fairly simple for the reader who's interested in seeing the algorithm.

    Lift Supports

    Current lift support
    This article was about lift supports, right? That's what the title said, at least, maybe I should write about the lift supports and why I cared about my VIN in the process.  The lift supports, those things keeping the tailgate from dropping on your head, no longer do their job, having disintegrated in protest over the years. No problem, I need to buy some new ones. 

    For the Freestyle, the manufacturing line changed for the 2006 model year, and there's a different lift support depending on when the vehicle was built.  To find out the build date, one uses the VIN and the magic of the FordETIDS web site. When I was looking at the VIN, I began wondering. "What's in that number?" The digression above being the result.
    ETIS record for the Freestyle


    I found that my Freestyle was manufactured 19-Aug-2005, and probably more than I wanted to know thanks to FordETIDS.  With this information in hand, I ordered the right lift supports for a few cents under $40.  When the parts arrive, I'll cover the replacement process, which doesn't look too difficult.  The freestyle's an excellent "grocery getter": with the back seats folded down it's easy to load and unload and holds a huge amount of cargo.  Holding the tailgate with my head was becoming a drag, so I'm happy that will be a thing of the past in the near future.





    This post first appeared on 500 Dollar Car, please read the originial post: here

    Share the post

    Lift Supports and Punch Cards

    ×

    Subscribe to 500 Dollar Car

    Get updates delivered right to your inbox!

    Thank you for your subscription

    ×