Programming languages can be split into two types: high-level and low-level languages
Some examples of high-level languages include Python, Java, Thunno, and Go.
The only low-level languages are assembly language and machine code.
Machine code is written in binary, and is the only form of code that a computer can understand.
Each instruction in assembly language represents one instruction of machine code.
Example 1 (Python), Example 2 (x86-64 assembly language), and Example 3 (x86-64 machine code) show exactly the same algorithm in different languages.
Example 1
a = int(input())
print(a * a)
Example 2
mov al, 0
mov bl, [num]
mult:
add al, [num]
dec bl
jnz mult
Example 3
10110000 00000000 10001010 00011101 00000000 00000000 00000000 00000000 00000010 00000101 00000000 00000000 00000000 00000000 11111110 11001011 01110101 11110110
You do not need to be able to understand or explain the code in Examples 2 and 3.
Advantages of high-level languages:
Advantages of low-level languages:
Why might a programmer prefer assembly language over machine code?
Assembly language resembles English more closely than machine code, and is therefore easier to program in.