I want to create a program, where I could convert a decimal number to binary number and fill the array with 0 and 1.
For instance:
byte array={0, 0, 0, 0, 0, 1};
Now I would like to change first 3 values in array with decimal number 3 which is 011 in binary. so the array would look now
byte array={0, 1, 1, 0, 0, 1};

is it possible?
Also how would I get decimal back from that array? (for instance I would like to get last 3 values from array ({0, 0, 1}) and convert them to decimal, which would then be 1.)