I have a file with 1 line of text, called output. I have write access to the file. I can change it from an editor with no problems.
output
$ cat output
Since this is an incredibly simple file, sed may actually be overkill. It sounds like you want the file to have exactly one character: a '0' or a '1'.
It may make better sense in this case to just overwrite the file rather than to edit it, e.g.:
echo "1" > output
or
echo "0" > output