Skip to content

IntegerDigits

Returns the list of digits of an integer.

$ wo 'IntegerDigits[12345]'
{1, 2, 3, 4, 5}

With base 2 (binary):

$ wo 'IntegerDigits[255, 2]'
{1, 1, 1, 1, 1, 1, 1, 1}