I was getting tired of using tables to decode those resistors, so I wrote a Perl script which takes the 3-symbol code and spits out its corresponding resistance value. It is probably mainly of interest to Linux users, because you just put it in your ~/bin and call it from terminal like any other program, but nothing stops one from porting the algorithm to some other language and/or platform. I verified one full decade of its output against
this table. If somebody knows a more authoritative source, I will re-check.
$ eia96 01b
1000
You can even call it with an incorrect code or no argument at all and it will print some nonsense.
$ eia96 hello
98
Full code below. Straightforward stuff. The int(xxx + 0.5) part is rounding to nearest integer.
#!/usr/bin/perl -l
my $d = substr($ARGV[0], 0, 2);
my $e = lc(substr($ARGV[0], -1));
my $v = int(100 * 10**(($d-1)/96) + 0.5);
$v *= 0.001 if $e eq "z";
$v *= 0.01 if $e eq "y" || $e eq "r";
$v *= 0.1 if $e eq "x" || $e eq "s";
$v *= 1 if $e eq "a";
$v *= 10 if $e eq "b" || $e eq "h";
$v *= 100 if $e eq "c";
$v *= 1000 if $e eq "d";
$v *= 10000 if $e eq "e";
$v *= 100000 if $e eq "f";
print $v;