Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to get float values for armv7-il2cpp

SliceCast

Active Member
Joined
Oct 24, 2017
Messages
36
Step 1: Go to this site
IEEE-754 Floating-Point Conversion from Floating-Point to Hexadecimal

Step 2: Once opening, find "Decimal Floating-Point".

Step 3: Beside that, type in the number you want through 1-2000.

Step 4: Click "Rounded" or "Not Rounded", it doesn't matter which is which. Just choose one.

Step 5: Find "Single precision (32 bits):", DO NOT USE THE 64 BIT!!

Step 6: Above "Single precision (32 bits):", you should find "Hexadecimal".

Step 7: you should now find the Hexadecimal, if the numbers or letters is not there, then you haven't done STEP 3 yet.

Step 8. You should see a 2 Byte Hexadecimal, copy the 2 Byte.

Example: I chose the number 100 and clicked "Not Rounded", I scrolled down and found "Hexadecimal" above "Single precision (32 bits):"
You should see the Hexadecimal that has letters or numbers. The number I chose 100 and the Hexadecimal for that is 42C8. After that, copy that Hexadecimal.

Step 9: After copying the Hexadecimal... Go to armconverter.com.

Step 10: Make sure the page is Arm To Hex.

Step 11: Choose the architecture of Armv7.

Step 12: Now go into the text box and type in "Movt r0, #0x42C8" and you should find the hex value for it.

Congratulations, you now have the hex value of float 100.

Thank you for understanding and learning.

I hope that this tutorial will help you guys. :)

Armconverter: ARM To HEX Converter Online
 
Last edited:

PixelYT

Member
Joined
Aug 10, 2018
Messages
32
Does this really give a float value, because I type the hex code in the ARM instruction in a calculator and the value was a whole number
 

Ruit

Adminstrator
Adminstrator
Joined
Oct 13, 2017
Messages
728
Does this really give a float value, because I type the hex code in the ARM instruction in a calculator and the value was a whole number
@SliceCast movt accepts a 16 bit integer (2 bytes), Means its range from 0x0000 to 0xffff.
0x42c8 is 2 bytes not 4.

I made some tests with this and found
Code:
movt r0, #0x55bc
bx lr
Returns 2.59394e+13 which is 2147483647 when you cast it to integer.
So, you can try your luck with any random two bytes and see the outcome : )
 

SliceCast

Active Member
Joined
Oct 24, 2017
Messages
36
@SliceCast movt accepts a 16 bit integer (2 bytes), Means its range from 0x0000 to 0xffff.
0x42c8 is 2 bytes not 4.

I made some tests with this and found
Code:
movt r0, #0x55bc
bx lr
Returns 2.59394e+13 which is 2147483647 when you cast it to integer.
So, you can try your luck with any random two bytes and see the outcome : )
Oh, haha. Thanks for the information
 
Top Bottom