d output is set to [0,1023] and Bias was added