An invocation is_numeral tm, where tm is a HOL term with 
the following form
     <numeral> ::= 0 | NUMERAL <bits>
     <bits>    ::= ZERO | BIT1 (<bits>) | BIT2 (<bits>)
The system prettyprinter will print a numeral as a string of digits.