Gee63:

Am i on the right track ??

Yes

I'm trying to adjust the gain on a ADJD-S311 color sensor which the capacitors have a range of 00H to 0FH but don't know how to write that into 0x?? format. Is there a table to covert it?

There's nothing to convert. The 'H' and the '0x' are just two different ways of expressing the fact that we are dealing with a hexadecimal number. A third method is to use a leading '$'. So 0x74, 74H, and $74 are three different ways to indicate that this particular number 74 is a hexadecimal number.

Why use hexadecimal? Well you have to understand that you are dealing with a binary device that only understands '0's and '1's. The actual number here is 01110100. In dealing with with a bunch of binary numbers, particularly large ones, the system becomes unwieldy for us mere mortals. The hexadecimal system is just a means to make those number smaller and (believe it or not) easier to deal with. The binary number 01110100 is broken into two groups of 4 digits, 0111 and 0100, and each group is converted to it's hexadecimal equivalent. So 0111 --> 7 and 0100 --> 4.

The binary number 01110100 could also have been converted to it's decimal equivalent of 116 but, to a programmer this doesn't help things. A programmer can look at the hex number 74 and mentally convert it back to it's binary equivalent 0111 0100 without resorting to a chart or a calculator. A conversion from decimal back to binary is not so simple.

If you would like such a chart you can follow the link to "A handy

Decimal - Binary - Octal - Hex - ASCII Conversion Chart" at http://web.alfredstate.edu/weimandn. Note that this chart only covers the decimal numbers 0 - 127 and takes up a full sheet of paper.

Don