If date in column A or B is falling in either lower date or upper date from Row 1 or Row 2 dates then populate 1 else populate 0.
In any case result will be 0 or 1.
A3 is more than or equal to C1 that is why C3 = 1.
A3 is less than D1 that is why D3 = 0
A3 is less than E1 that is why E3 = 0
A4 is more than C1 and B4 is more than C2 so C4 = 0
A4 is more than D1 that is why D4 = 1
A4 is less than E1 by B4 is more than E1 so E4 = 1