Machine code.
Machine code is also called as op code.
Uh, this is the language which CPU understands.
So OP code or it is also known as operation code.
Uh, is a machine language instruction that specifies the operation to be performed.
So OP is operation.
So what operation you want to perform in the machine level language is given by machine code or op code.
This is an instruction to the processor informing what operation needs to be performed.
Each OP code or each instruction is made up of an OP code, which is an operation code and an operand.
So every instruction which we give to CPU has an OP code, which is an operation code and an operand
or operands.
So if you look into the instruction set of uh, a CPU like ARM or x86, it will give you a list of OP
codes available for the processor.
The output of assembly code and other programming languages will be finally converted to this op code
or machine code.
So for example, this is the thing which CPU understands.
Ones and zeros.
It's in a binary format.
If you convert this binary format into hex format, this is what it comes out.
It will be like 100 is eight and 01011 is three.
Like this and this.
Finally, when you convert, this assembly is like this one.
When you do a disassemble this will come like this.
But normally how we do, how we write, we write a C a equals to a plus ten or something like that,
that will convert into ad ab ten that will be converted into machine code.
And the same.
This is the same actually this is in hex format and this is ones and zeros format.
And this will be executed on the computer, on the computer or on the processor.
On the actual machine.
This will not be executed.
This and this will be executed.
So how people used to do in the very initial days, they used to use a lot of switches and the switches
used to generate a sequence of ones and zeros.
And this was used in the early days of computing, like once we since the 1970s, this was not used
like switches.
They had a hex editor, so they used to type opcodes instead of the number of command, like instead
of the switches they directly used to type the opcodes after the 1970s.
And then came assembler.
Assembler was in a human readable format, but it is uh, so assembler took the assembly format and
convert it to opcode.
And then that opcode used to be executed.
Then this got little difficult to uh assembler was also not easy.
So then started using high level programming languages which are which is very easy to write and read.
So uh, this is like C language and C plus plus.
And this programs will be converted to assembly first and then into the actual OP code of the machine
code.
So this was the history of how we got to C language.
First people used to execute sequence of ones and zeros.
Then they directly used to execute OP codes like this.
And then they used to execute uh.
Then came assembly language which converts this code into this.
And then came C language which converts into assembly.
Then this converts into the machine code.
This is the best background of what is an opcode and how we are now generating opcodes and all.
We are not writing opcodes directly now.
We are just using a high level language and giving this to a toolchain or a compilation tool, which
actually generates us the machine code or a opcode.