100% found this document useful (1 vote)
245 views2 pages

Ford M Serial Number Algorithm

This document describes the algorithm used by Ford to generate serial numbers in the format Mnnnnnn. It uses a lookup table to derive 7 digits (r1-r7) from the serial number. These digits are used to calculate 4 intermediate values (res1-res4) and then 4 final code values (code0-code3) by performing lookups and mathematical operations on the lookup table. For example, the serial number M763412 produces code digits of 9174.

Uploaded by

Mlaja Android
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
100% found this document useful (1 vote)
245 views2 pages

Ford M Serial Number Algorithm

This document describes the algorithm used by Ford to generate serial numbers in the format Mnnnnnn. It uses a lookup table to derive 7 digits (r1-r7) from the serial number. These digits are used to calculate 4 intermediate values (res1-res4) and then 4 final code values (code0-code3) by performing lookups and mathematical operations on the lookup table. For example, the serial number M763412 produces code digits of 9174.

Uploaded by

Mlaja Android
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 2

Ford M serial number algorithm.

(Test serial = M763412) & *M000000*

Serial in the form M,n6,n5,n4,n3,n2,n1

Find lookup table number as follows:

r1 := lookup[n1 x 10 + 5] (so if n1 = 2 then r1 = 25th in lookup which is 9) *7*


r2 := lookup[n2 x 10 + 3] (so if n2 = 1 then r2 = 13th in lookup which is 6) *4*
r3 := lookup[n3 x 10 + 8] (so if n3 = 4 then r3 = 48th in lookup which is 7) *1*
r4 := lookup[n4 x 10 + 2] (so if n4 = 3 then r4 = 32nd in lookup which is 4) *3*
r5 := lookup[n5 x 10 + 1] (so if n5 = 6 then r5 = 61st in lookup which is 8) *5*
r6 := lookup[n6 x 10 + 6] (so if n6 = 7 then r6 = 76th in lookup which is 5) *2*
r7 := lookup[n7 x 10 + 9] (n7 is always 0 and 9th in lookup is also 0) *0*

From the lookup table:

0123456789

00 9 5 3 4 8 7 2 6 1 0
10 2 1 5 6 9 3 7 0 4 8
20 0 4 7 3 1 9 6 5 8 2
30 5 6 4 1 2 8 0 9 3 7
40 6 3 1 2 0 5 4 8 7 9
50 4 0 8 7 6 1 9 3 2 5
60 7 8 0 5 3 2 1 4 9 6
70 1 9 6 8 7 4 5 2 0 3
80 3 2 9 0 4 6 8 7 5 1
90 8 7 2 9 5 0 3 1 6 4

The result is the 7 digits r1, r2, r3, r4, r5, r6, r7

Four more values res1,res2,res3 and res4 are then derived from the lookup table as follows:

res1 := lsd{(lookup[r2][r1] + 1) x (lookup[r6][r2] + 1) + (lookup[r4][r3] + 1) x (lookup[r7][r5] + 1) +


(lookup[r1][r4])}

res2 := lsd{(lookup[r2][r1] + 1) x (lookup[r5][r4] + 1) + (lookup[r5][r2] + 1) x (lookup[r7][r3] + 1) +


(lookup[r1][r6])}

res3 := lsd{(lookup[r2][r1] + 1) x (lookup[r4][r2] + 1) + (lookup[r3][r6] + 1) x (lookup[r7][r4] + 1) +


(lookup[r1][r5])}

res4 := lsd{(lookup[r2][r1] + 1) x (lookup[r6][r3] + 1) + (lookup[r3][r7] + 1) x (lookup[r2][r5] + 1) +


(lookup[r4][r1])}

where lsd is the least significant digit of the result.

so if serial = M763412 then r1..r7 = 9, 6, 7, 4, 8, 5, 0


(69th=6 + 1) x (56th=9 + 1) + (47th=8 + 1) x (08th=1 + 1) + (94th=5) = 93 and res1 = lsd'93' = 3
(69th=6 + 1) x (84th=4 + 1) + (86th=8 + 1) x (07th=6 + 1) + (95th=0) = 98 and res2 = lsd'98' = 8
(69th=6 + 1) x (46th=4 + 1) + (75th=4 + 1) x (04th=8 + 1) + (98th=6) = 86 and res3 = lsd'86' = 6
(69th=6 + 1) x (57th=3 + 1) + (70th=1 + 1) x (68th=9 + 1) + (49th=9) = 57 and res4 = lsd'57' = 7
so if serial = M000000 then r1..r7 = 7, 4, 1, 3, 5, 2, 0
(47th=8 + 1) x (24th=1 + 1) + (31st=6 + 1) x (05th=7 + 1) + (73rd=8) = 82 and res1 = lsd'82' = 2
(47th=8 + 1) x (53rd=7 + 1) + (54th=6 + 1) x (01st=5 + 1) + (72nd=6) = 120 and res2 = lsd'120' = 0
(47th=8 + 1) x (34th=2 + 1) + (12th=5 + 1) x (03rd=4 + 1) + (75th=4) = 61 and res3 = lsd'56' = 1
(47th=8 + 1) x (21st=4 + 1) + (10th=2 + 1) x (45th=5 + 1) + (37th=9) = 72 and res4 = lsd'72' = 2

Another four values are derived from the lookup table as follows:

xres1 := (lookup[res1][5] + 1) x (lookup[res2][1] + 1) + 105


xres2 := (lookup[res2][1] + 1) x (lookup[res4][0] + 1) + 102
xres3 := (lookup[res1][5] + 1) x (lookup[res3][8] + 1) + 103
xres4 := (lookup[res3][8] + 1) x (lookup[res4][0] + 1) + 108

so if serial = M763412 then


xres1 := (35th=8 + 1) x (81st=2 + 1) + 105 = 132
xres2 := (81st=2 + 1) x (70th=1 + 1) + 102 = 108
xres3 := (35th=8 + 1) x (68th=9 + 1) + 103 = 193
xres4 := (68th=9 + 1) x (70th=1 + 1) + 108 = 128

code(3) := lsd{xres1(1) + xres1(0) + r1 = 3 + 2 + 9} (=14) = 4


code(2) := lsd{xres2(1) + xres2(0) + r1 = 0 + 8 + 9} (=17) = 7
code(1) := lsd{xres3(1) + xres3(0) + r1 = 9 + 3 + 9} (=21) = 1
code(0) := lsd{xres4(1) + xres4(0) + r1 = 2 + 8 + 9} (=19) = 9

code = 9174

and if serial = M000000 then


xres1 := (25th=9 + 1) x (01st=5 + 1) + 105 = 165
xres2 := (01st=5 + 1) x (20th=0 + 1) + 102 = 108
xres3 := (25th=9 + 1) x (18th=4 + 1) + 103 = 153
xres4 := (18th=4 + 1) x (20th=0 + 1) + 108 = 113

code(3) := lsd{xres1(1) + xres1(0) + r1 = 6 + 5 + 7} (=18) = 8


code(2) := lsd{xres2(1) + xres2(0) + r1 = 0 + 8 + 7} (=15) = 5
code(1) := lsd{xres3(1) + xres3(0) + r1 = 5 + 3 + 7} (=15) = 5
code(0) := lsd{xres4(1) + xres4(0) + r1 = 1 + 3 + 7} (=11) = 1

code = 1558

You might also like