Preserving Empty Lines while Replacing Numbers

Greetings,

I am using tcsh to write a script that will replace the numbers in a file with a single number, the caveat is that this file has blank lines which are necessary for another step down the line so I need to preserve the blank lines. I have tried sed and awk but both will collapse the blank lines or write the replacing number over blank lines. Here is an example:

File1.............File2................Finish Product
1..................(blank).............1
(blank)...........2....................0
3..................(blank).............1
(blank)...........4....................0
etc.................etc.................etc.

The finish product is what I would like to have, but I don't need to get to that point right away, unless you can help provide an easy method. All I need it for the numbers in File1 to be replace by 1's and preserve line order and the same for file 2, but replaced by 0's.

Thanks for any help or guidance you could provide.

Please paste a sample I/P file content and the expected O/P.