everyone say start with basics learn some basic things
so my another effort for learning about micro controller
I know about basic gates like AND, NOT and OR,
we can make following circuits with help of basic gates
Addition
Subtraction
Division
Multiplication
Logical AND
Shift Left
Shift Right
suppose we want to add two 8 bit number
we have to implement 8 bit adder
example 6+ 2 =8
00000110
+00000010
------------
00001000
...
so we can develop many circuit
Addition
Subtraction
Division
Multiplication
Logical AND
Logical NOT
Logical OR
Logical XOR
Shift Left
Shift Right
now we have many operation so we want use them
we want to tell the CPU what operation to do. So, we encode the operations in some bit pattern,
for example:
0001 Perform NOT
0010 Perform AND
0011 Perform OR
0100 Perform Addition
0101 Perform Subtraction
0110 Perform Multiplication
0111 Perform Division
1000 Move bits from memory into registers
...
...
Now, suppose we want the CPU to perform addition of 6 and 2,
the number 6 (0110) and the number 2 (0010), so something like:
0100 0110 0010
Now we can start talking about a sequence of operations:
0100 0110 0010
01010 010 0010
0100 0110 0110
0010 1000 0010
1000 1010 0010
machine language is hard to understand so we developed assembly language
Mov (1000)
6 (0110)
mov A, # 6 ( assembly language )
1000 0110 ( machine language )
another
Mov (1000)
2 (0010)
mov R1#2 ( assembly language )
1000 0010 ( machine language )
8=6+2
Add A, R1
0100 0110 0010
machine language
1000 0110
1000 0010
0100 0110 0010
assembly language
mov A, #6
mov R1,#2
add A,R1
I have tried to understand in very low level
can some explain with example how to convert machine code into assembly code
I know assembly code convert into machine code but for low level understanding how we developed assembly language to understand machine language
so my another effort for learning about micro controller
I know about basic gates like AND, NOT and OR,
we can make following circuits with help of basic gates
Addition
Subtraction
Division
Multiplication
Logical AND
Shift Left
Shift Right
suppose we want to add two 8 bit number
we have to implement 8 bit adder
example 6+ 2 =8
00000110
+00000010
------------
00001000
...
so we can develop many circuit
Addition
Subtraction
Division
Multiplication
Logical AND
Logical NOT
Logical OR
Logical XOR
Shift Left
Shift Right
now we have many operation so we want use them
we want to tell the CPU what operation to do. So, we encode the operations in some bit pattern,
for example:
0001 Perform NOT
0010 Perform AND
0011 Perform OR
0100 Perform Addition
0101 Perform Subtraction
0110 Perform Multiplication
0111 Perform Division
1000 Move bits from memory into registers
...
...
Now, suppose we want the CPU to perform addition of 6 and 2,
the number 6 (0110) and the number 2 (0010), so something like:
0100 0110 0010
Now we can start talking about a sequence of operations:
0100 0110 0010
01010 010 0010
0100 0110 0110
0010 1000 0010
1000 1010 0010
machine language is hard to understand so we developed assembly language
Mov (1000)
6 (0110)
mov A, # 6 ( assembly language )
1000 0110 ( machine language )
another
Mov (1000)
2 (0010)
mov R1#2 ( assembly language )
1000 0010 ( machine language )
8=6+2
Add A, R1
0100 0110 0010
machine language
1000 0110
1000 0010
0100 0110 0010
assembly language
mov A, #6
mov R1,#2
add A,R1
I have tried to understand in very low level
can some explain with example how to convert machine code into assembly code
I know assembly code convert into machine code but for low level understanding how we developed assembly language to understand machine language