This is a simple problem, but I've spent way too long trying to solve it.
I want to start with an irrational number, convert it to base 2, and then get a list of the individual digits in the number. Attached below is a screenshot with an example. The problem occurs because BaseForm output is not just the binary string, but also includes the subscript 2 at the end. But when this is used in RealDigits to get the list of digits, it objects. The last line in the screenshot gives the output I want, but I had to cut-and-paste the base 2 number (minus the subscript) to get it to work.
Any ideas? Thanks. Very much appreciated.
Gary
RealDigits[N[Sqrt[2] - 1, 6], 2]
yields
{{1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1}, -1}
My brain seizure is gone; what a relief. Thanks John!