Firstly, “binary” does not mean what you think it means (any data on the computer, including the text is already binary, it’s just the way we decide to display and process is different).
Secondly, compilation is not a simple conversion to funny characters (if that were the case, we do not need different compilers for different languages). To have some understanding of machine code, you need to understand the architecture it is aimed at. There are many computer architectures; your computer is just one of them. This is a very broad question and requires a clear understanding of computer architecture.
I will show an example of MIPS instructions. If you're interested, you can read and get some factual knowledge about the subject, try the links at the end of my post.
MIPS is a popular introductory subject, as its training format is one of the most digestible. MIPS instructions are 32 bits wide. There are three kinds of instructions in MIPS: "R", "I" and "J". We will go through the "I" instructions.
(32 ), , . "I" :
|
opcode rs rt immediate
6 5 5 16 (the numbers show how wide are each part)
:
- opcode , (: , , ). ( "R" "J" ) 6- , .
- rs rt - , , 32- . MIPS 32 , . , , .
- - . , " " , .
, :
001000 00001 00010 0000000000000011
, . :
- :
001000 addi " ". - rs:
00001 1 , , 1 rs. - rd:
00010 2 , , rs. - :
0000000000000011 3 .
addi : , rs, . rd. , , rd 3 + 2 = 5.
, , . , , , runnable.
MIPS :