What's new

Tutorial MW3 Hex converter

  • Thread starter DGz a Hack3r
  • Start date
  • Views 1,575
DGz a Hack3r

DGz a Hack3r

Enthusiast
Messages
43
Reaction score
5
Points
55
Sin$
0
Cant find a program that converts the hex values.
What is used to convert "999.0" to "44 79 C0 00" ?
 
U

Unnamed

Enthusiast
Messages
39
Reaction score
7
Points
55
Sin$
0
Cant find a program that converts the hex values.
What is used to convert "999.0" to "44 79 C0 00" ?

Code:
44 79 C0 00 in hex is equivalent to 0100 0100 0111 1001 1100 0000 0000 0000 in binary.
IEEE has defined a standard for representing float numbers in a fixed number of bits, the bit layout is as follows:
bit 1: sign bit 0 is positive 1 is negative
bit 2-9: exponent excess 127
bit 10-32: fraction bits
So your number, would be broken down as follows:
bit 1: positive number
bit 2-9: 100 0100 0= 136 decimal 136 - 127 = 9 = exponent
bit 10-32: 111 1001 1100 0000 0000 0000 = fraction
scientfic notation of that = 1.111100111 x 2^9
normal notation 1111100111.00
1111100111 = 999 decimal
.00 = .0 obviously
Final number = 999.0

Incase you were looking for a full explanation, but i use http://babbage.cs.qc.edu/IEEE-754.old/ to go back and forth quickly.
 
Top Bottom
Login
Register