Convert to base 2 then split in an array : <p>I want to convert my base 10 number to base 2 and then store parts in an array. </p>

<p>Here are two examples:</p>

<p>my value is 5 so it will be converted to 101 then I have an array like this: {1,0,1}</p>

<p>or my value is 26 so it will be converted to 11010 then I will have an array like this: {0,1,0,1,1}</p>

<p>Thank you in advance for your time and consideration.</p>
