Randomization of 8 bits with constraint so that only 4 bits are set

In reply to kddholak:

Thank you very much kddholak.
I have also seen that you also changed the temp_var declaration before declaring new of class.