rebetiko
Member
Hi every one.
I am trying to verify the following:
A DINT can be converted to a POINTER by simply shifting the double word left by 3 bits.
i want to prove that DINT 160 results in P#20.0 after a SHL3 on 160.
can some1 prove it by means of an example?
its doing my head ?
1010 0000 = 160 (DINT)
if i do a SHL3 in the above , i get 0000 0000 (?)
but if i do a SHR3 i get 0001 0100 which is 20 (for P#20.0)
so
is it a SHL3 or a SHR3 that converts DIN160 into P#20.0 ?
Many thanks 2 all
I am trying to verify the following:
A DINT can be converted to a POINTER by simply shifting the double word left by 3 bits.
i want to prove that DINT 160 results in P#20.0 after a SHL3 on 160.
can some1 prove it by means of an example?
its doing my head ?
1010 0000 = 160 (DINT)
if i do a SHL3 in the above , i get 0000 0000 (?)
but if i do a SHR3 i get 0001 0100 which is 20 (for P#20.0)
so
is it a SHL3 or a SHR3 that converts DIN160 into P#20.0 ?
Many thanks 2 all