Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:18:25+00:00 2026-06-15T08:18:25+00:00

Similar to decimal binary numbers can have represent floats too. Now I read that

  • 0

Similar to decimal binary numbers can have represent floats too. Now I read that it can have floats of the sort

0.5:0.1 , 0.25:0.01 , 0.125:0.001 … and so on. But then, for example, how is the 0.1(in decimal) represented in binary?

Also, given a decimal float, how to convert it to the decimal equivalent, (given it is not so straightforward).

Edit: So I understand that the better question would have been ; how to convert a decimal float to binary? Now i get it that we multiply the decimal part, till it becomes zero.
Now it is very much possible that two floating points can have the same representation right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:18:25+00:00Added an answer on June 15, 2026 at 8:18 am

    Given how many bits?

    0.1b:

    0.00011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011...
    

    As you can see it’s an approximation.

    Binary                                          Decimal
    0.1     == 1/2^1         == 1/2              == 0.5
    0.01    == 1/2^2         == 1/4              == 0.25
    0.11    == 1/2^1 + 1/2^2 == 1/2 + 1/4 == 3/4 == 0.75
    

    Each bit after the radix point represents 1/2^(position_after_bit_string).

    postion:   |1|2|3|4|5|6|7|
             0.|0|0|0|0|0|0|1|
    

    So 0.0000001 = 1/2^7 = 0.0078125

    Pseudocode:

    decimal_value = 0 
    for i, bit in enumerate(binary_string):
        if bit == 1
             decimal_value += 1/2**i
    

    For more info Why can't decimal numbers be represented exactly in binary?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Why can't decimal numbers be represented exactly in binary? i get very
The following query will display all Dewey Decimal numbers that have been duplicated in
We store a decimal(9,8) in our database. It can have any number of places
I have a class with a lot of Decimal properties that are used for
I have a text document that looks similar to this: R.D. P.N. X Y
Suppose that we have a System.Decimal number. For illustration, let's take one whose ToString()
I have a form that looks similar to the following (simplified for brevity): PRICING_PATTERN
I have query similar to this: DECLARE @value decimal(8,0) = 1 SELECT (CAST @value
I have 2 tables that have similar data and I need to compare the
Similar questions to this my have been asked a lot of times before. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.