I am trying to teach how a computer operates using binary information. To showcase this, I would like to take a string of bits: 011010000110010101101100011011000110111100100000011101110110111101110010011011000110010000001010 and write it to a file.
I can do it using HEX: echo -n -e \\x48\\x65\\x6c\\x6c\\x6f\\x20\\x57\\x6f\\x72\\x6c\\x64\\x0a > text.txt but haven't been able to figure out how to do it using binary numbers.
Is it possible to write raw bits to a file using a Linux terminal?