Output either 0 or 1 for every 24 frames using animation nodes
Here is an example,

1) Repeat node is giving values from 0 to 47 i.e 48 when the rate is 48.

2) Because repeat node also count 0, so I have substracted 1 from frame.

3) Then using compare boolean and switch nodes we can choose 0 for 0-23 frames (24) and for next 24-47 (24) frames, 1.

4) Last I use float text node to convert float to text and text object output to text-object.