Thursday, September 24, 2015

The Resistor Color Code

I use this color code as an example in my classes for writing branching clauses, loops, and functions.

0Black
1Brown
2Red
3Orange
4Yellow
5Green
6Blue
7Violet
8Gray
9White

The color code works like this: there are (at least) three color bands on the resistor. The first band indicates the first digit in the resistance. The second band indicates the second digit. The third digit is a multiplier. 

So, for example, if the bands were Yellow, Violet, and Orange, this translates to 4, 7, and 3. The  resistance value would be 47 × 1000 or 47 K Ω.

The computation would look like this:

R = ((10 * a) + b) * 10 c

where a, b, and c are the translated values of the three color bands, in order.


No comments:

Post a Comment