All files are only a sequence of number. All files are "pure binary" as you define it.
The meaning of the numbers in a file depends on how you choose to translate it.
Let's do an example: the file helloworld.c is a simple C program. Not an executable but a source code file.
The od -t c
program translate the numbers in "characters" using a convention called "ASCII":
~ $ od -t c helloworld.c
0000000 # i n c l u d e < s t d i o .
0000020 h > \n \n i n t m a i n ( i n t
0000040 a r g c , c h a r * * a r
0000060 g v ) { \n \t p r i n t f ( " h
0000100 e l l o w o r l d " ) ; \n } \n
0000120
The od -t x1z
program translate the numbers of the file as exadecimal numbers and as characters (in the last column):
~ $ od -t x1z helloworld.c
0000000 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f 2e >#include <stdio.<
0000020 68 3e 0a 0a 69 6e 74 20 6d 61 69 6e 28 69 6e 74 >h>..int main(int<
0000040 20 61 72 67 63 2c 20 63 68 61 72 20 2a 2a 61 72 > argc, char **ar<
0000060 67 76 29 20 7b 0a 09 70 72 69 6e 74 66 28 22 68 >gv) {..printf("h<
0000100 65 6c 6c 6f 20 77 6f 72 6c 64 22 29 3b 0a 7d 0a >ello world");.}.<
0000120
The xdd -b
program translate the numbers of the file as binary numbers and as characters (in the last column):
~ $ xxd -b helloworld.c
00000000: 00100011 01101001 01101110 01100011 01101100 01110101 #inclu
00000006: 01100100 01100101 00100000 00111100 01110011 01110100 de <st
0000000c: 01100100 01101001 01101111 00101110 01101000 00111110 dio.h>
00000012: 00001010 00001010 01101001 01101110 01110100 00100000 ..int
00000018: 01101101 01100001 01101001 01101110 00101000 01101001 main(i
0000001e: 01101110 01110100 00100000 01100001 01110010 01100111 nt arg
00000024: 01100011 00101100 00100000 01100011 01101000 01100001 c, cha
0000002a: 01110010 00100000 00101010 00101010 01100001 01110010 r **ar
00000030: 01100111 01110110 00101001 00100000 01111011 00001010 gv) {.
00000036: 00001001 01110000 01110010 01101001 01101110 01110100 .print
0000003c: 01100110 00101000 00100010 01101000 01100101 01101100 f("hel
00000042: 01101100 01101111 00100000 01110111 01101111 01110010 lo wor
00000048: 01101100 01100100 00100010 00101001 00111011 00001010 ld");.
0000004e: 01111101 00001010 }.
The first number of the file can be shown as 35 (in decimal), as 00100011 (in binary), as "#" (in UTF-8). It depends on how do you choose to translate it.
a.out
file? Where did you find it? What are it's contents? More information please. – jesse_b Jul 20 '18 at 13:35cat
on it, the terminal tries to display it as text. That is, probably in groups of eight bits at a time, interpreted as characters. – Kusalananda Jul 20 '18 at 15:01cat
to display a text file as a sequence of human-readable characters. Why is that? – ilkkachu Jul 20 '18 at 15:21gcc
a C compiler. – ctrl-alt-delor Jul 20 '18 at 16:51