Debian jess 64Alright let me start out by saying this maybe a very stupid,uninformed question due to my lack of understanding of binary, but I guess that's what this site is for, questions. That being out of the way I was wondering if it is possible to view the binary of a file in the 00101000 form and edit it, I am able to view it but in the hex form and I am looking to view and edit it in a the 8 digit form, I have been able to view it in the correct form just not edit it so I believe it is possible, Thanks for any help, and sorry if it is a stupid question.So moral of the story trying to view the binary in the 8 digit form and edit it rather then the hex.Thanks for any help!
Viewing Binary not Hex
binary;hex
with xxd, you can use the -b flagecho 'hello world' | xxd -bwhich 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 itecho 'hello world' | xxd -b > dumped_bits.txtand 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 binaryprintf obase=16;ibase=2;${bits}\n | bc | xxd -r -pand with those steps in combination, you canecho '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!