Single volume gain math


I used the "Single Volume " for user gain. The user should be able to adjust the gain through our GUI.

It would be great if you let me know how to do the conversion from dB to "value" and to "hex".  The value for 0 dBu is "1" as it shown in the data captured window.  

Range is 0  to - 80 dB currently. 

Would the conversion be different for negative and positive gains? 

Thanks, Semi