Decoding demodulated signal from signal generator

Hey everyone,
I am a beginner user of Arduino MegaAT2560 and I searched my problem solution, but could not find anything useful and related.
The problem is I have project which is Underwater Acoustic Communication and the transmitted signal is mixed and after receiving it is demodulated and comparator circuit was used. I can see on oscilloscope signal changing from 0 to 1 as intended, but I do not know how to make arduino decode the signal, to show 0s and 1s on my computer.

What do you want to do with the signal?

I need to decode the obtained 0s and 1s using arduino, i.e. to show the 1 and 0 on my computer and also how to set the frequency on arduino to decode at needed frequency. Thanks a lot

You can measure the time between changes in the signal. The essential information will be the time of the changes, not the states of the signals, which only would result in an endless sequence of 01010101...