# Resistor Encoding Revealed

The ohmage of a resistor is encoded in four, or sometimes three, bands of color that encircle the resistor. The first two bands of the resistor encode the first two digits of the ohmage rating. The meaning of the colors are:

```<ul>
<li> 0  Black
<li> 1  Brown
<li> 2  Red
<li> 3  Orange
<li> 4  Yellow
<li> 5  Green
<li> 6  Blue
<li> 7  Violet
<li> 8  Gray
<li> 9  White
</ul>
```

The third color band is a multiplier. Use the above chart to translate the color to a number, n. The multiplier is 10^^n, that is 10 to the n'th power. Multiple the two digit number obtain from the first two bands by this power of 10. If a fourth band is present, it encodes a "slop" factor expressed as a precentage. The meaning of these colors are:

```<ul>
<li> 5%  gold
<li> 10% silver
<li> 20% no band
</ul>
```

Now, let's try an example. Suppose the four bands are

```<ul>
<li> yellow     4
<li> violet     7
<li> green      5
<li> silver     10%
</ul>
```

then the ohmage of the resistor is within 10% of 47*10^^5, or 4700000, ohms.

## This is a RESISTOR CALCULATOR

Enter Color for first band.

Enter Color for second band.

Enter Color for third band.

Enter Color for fourth band.

## Author

This is Jake Millspaugh's answer to problem 1.