This reaper or signal limiter can be used to convert a sinusoidal signal into a square. The circuit is from a Raytheon documentation from the 60s.