Guess you should spend some time on studying 8051 architecture and instruction set.
0x02 in direct addressing refers to R2, register bank 0. MOV A, 0x2 is the same as MOV A, R2 with Bank 0 selected.
- - - Updated - - -
If you want float calculations with 8051, you'll use a C compiler to generate the machine instructions. It's possible, but no fun due to the limited data and program memory capacity of most 8051 processors.
Why did you choose 8051 in 2017? Why assembly coding?
You can do it with any processor that has certain memory capacity for code and data. That's serial terminal output of a 8051 processor. PIC or arm can do as well.