Binary: How to see the 1's and 0's

This might be good for teachers or Comp Sci 101.

Let's look at the word Hello typed twelve times and saved as plaintext file in Linux (left), and in Windows (right). (You can download this pair of files at the link above.)

Even though the files both contain the same 12 hellos, the filesize on the left is smaller. Interesting! To see what's going on, check the same files using a HexCompare session. (From a FolderCompare session rightclick the files and do OpenAs->HexCompare. Or do from the pulldown menu: Session->NewSession->HexCompare and drag over with a mouse two files of twelve_hellos.txt)

On the left, hex compare shows us what the machine sees in your file (0123456789abcdef to represent the 001011010101110100011101010101010110!) And on the right, in pink, for the benefit of humans, we see a UTF translation of this into actual characters. I apologize: this is the Windows file. It got switched while I was making the image examples.

When you start learning how to use BC it becomes like a magnifying glass. It's like a magnifying glass because it gives you a license to walk around and inspect things (or even set them on fire in sunlight?). This has obvious applications as digital forensic tools and in minute scanning of sectors for malware and security problems.

Last updated