Your description doesn't match your example. You say you
want to fill the area between the 1's with zero's, but
in your example, there are three area's between 1's, and
out of the three, you replace two of them with 1's.
If your question is, "how do I replace the 0's with 1's",
use tr:
tr/0/1/
Abigail