Floating Point binary calculations

This is a discussion on Floating Point binary calculations within the Tech Board forums, part of the Community Boards category; Would someone check my calculations? I just want to make sure it's not all wrong. http://i49.tinypic.com/10dtjk4.png The first one is ...

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    2

    Floating Point binary calculations

    Would someone check my calculations? I just want to make sure it's not all wrong.

    http://i49.tinypic.com/10dtjk4.png

    The first one is 4 3/8, the second is just 1.

    Basic info:
    - Held in 16 bits.
    - 1 sign bit.
    - 7 bit exponent in Excess 63.
    - 8 bit significand, normalised to 1.x with only the fractional part stored (like IEEE 754).

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,558
    Looks OK.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Dec 2012
    Posts
    2
    Thanks.

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,832
    Exponent required is +2. If the bias is 63 then you do 2+63. But perhaps I misunderstand "excess" vs. bias.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary to 32 bit floating point
    By TenTierHook in forum C++ Programming
    Replies: 6
    Last Post: 10-14-2010, 06:23 AM
  2. floating point binary
    By ytaipsw in forum C Programming
    Replies: 2
    Last Post: 04-30-2006, 05:40 PM
  3. floating point binary program, need help
    By ph34r me in forum C Programming
    Replies: 4
    Last Post: 11-10-2004, 06:10 AM
  4. Floating point numbers in a binary file
    By frenchfry164 in forum C++ Programming
    Replies: 6
    Last Post: 07-31-2003, 10:04 AM
  5. Floating point faster than fixed-point
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-08-2001, 10:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21