1 Replies - 2567 Views - Last Post: 23 May 2013 - 02:49 AM

#1 cooliok3   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 21-May 13

Conversions of decimal to binary fixed point and IEEE floating point

Posted 22 May 2013 - 10:10 PM

Just wondering if im doing this right

133.75 base 10

133 = 1000 0101
.75 = 0011


Binary fixed point no exponent representation
1000 0101 . 0011 => 1000 0101 . 0011 * 2^0

IEEE floating point
2^7 is the largest int before 133
1 . 000 0101 0011 * 2^3
exponent addition
133 + 127 + 3 = 160 = 1010 0011
1000 0101 . 0011 = 1.000 0101 0011 2^3
0 | 1010 0011 | 000 0101 0011 = (in hexadecimal) 0x61A53

Is This A Good Question/Topic? 0
  • +

Replies To: Conversions of decimal to binary fixed point and IEEE floating point

#2 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6260
  • View blog
  • Posts: 24,030
  • Joined: 23-August 08

Re: Conversions of decimal to binary fixed point and IEEE floating point

Posted 23 May 2013 - 02:49 AM

Moved to Computer Science; there is no C/C++ question here.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1