with xxd, you can use the -b flag
echo 'hello world' | xxd -b
which will output
0000000: 01101000 01100101 01101100 01101100 01101111 00100000 hello
0000006: 01110111 01101111 01110010 01101100 01100100 00001010 world.
you can redirect that to a file where you can edit it
echo 'hello world' | xxd -b > dumped_bits.txt
and then, leaving the coumns in place you can convert back with this (albiet hacky) script
#!/bin/bash
# name this file something like `bits_to_binary.sh`
# strip anything that's not a bit string like `0000000:` or `world`
bits=`sed -ze 's/\w*[^ 01]\w*//g' -e 's/ //g' -e 's/\n//' $1`
# and convert the bit representation to binary
printf "obase=16;ibase=2;${bits}\n" | bc | xxd -r -p
and with those steps in combination, you can
echo 'hello world' | xxd -b > dumped_bits.txt
# edit dumped_bits.txt
./bits_to_binary.sh dumped_bits.txt
# hooray! the binary output from the edited bits!