This link is the easiest to understand resource I found. The algorithm is simple:
(decimal hex value) * 180 / 2^(n-1) //where n is the number of bits
The example in the reference is,
0000 0000 1010 0110
0 0 A 6
166 * 180 * 2^−15 = 0.9118 degrees
The code for this algorithm is so simple, I don't think I need to enumerate it here. Let me know, if someone feels this is incorrect.