I notice this in looking at other peoples source that hex and decimal notation is used interchangably.
P.S.
I have 80% of my hardware completed and mounted in 2 cardboard boxes so I have something to write software to before I decide on the front panel design.
It’s very exciting to see my project come together and even more so when I can almost tweak every audible characteristic of the matrix sounds with my knobby programmer.
I’ve ordered some more parts from SmashTV and those will allow me to complete the 5 point tracking/reshaper, ramps and portamento section of the front panel.
I’ve also ordered a larger LCD (2x20) which I havn’t added yet which is part of the final electronic component, the programmer section.
0x10 has the decimal value of 16 ( 0x10 = (2*8 + 1*0) )
hex gets counted from 0 to 7 (as the name implies),
I´m sorry, but this is not correct. Hex gets counted from 0 to 15 - as the name implies, because the full name is “hexadecimal” which means 16. From 0 to 7 would be the octal system which is not used in programming (or nearly anywhere else ).
About hex to decimal conversion: Just as decimal e.g. 25 means 2*10 + 5*1, hex 0x10 means 1*16 + 0*1. The digits from right to left in all systems mean (number * (base to the power of the digit )) - the digit is counted from 0. So with hex it is
so e.g. a 4 digit hex value of 0x3A20 means (3*4096 + 10*255 (A hex=10 dec) + 2*16 + 0*1) = 14870
The reason why hex is often used in programming is that it converts quite nicely to binary. Each binary “Nibble”, that is 4 bit, is represented by one hex digit, that´s because 4 digits binary also represent numbers from 0 to 15. So you can calculate the binary value of large hex numbers in your head and don´t have to use a calculator all the time.