Let's say I have a list called 'solution', I'm converting these numbers into binary form
solution = {0, 6, 4, 7, 1, 3, 5, 2}
solutionbinary = IntegerDigits[solution, 2]
Output like:
{{0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}, {1}, {1, 1}, {1, 0, 1}, {1, 0}}
My expectation:
{{0,0,0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}, {0,0,1}, {0,1, 1}, {1, 0, 1}, {0,1, 0}}
All of them must be 3 digits binary form.
solutionbinary = IntegerDigits[solution, 2, 3]– Syed Feb 17 '22 at 17:51