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

  • Home
  • SEARCH
  • 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 6208739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:51:35+00:00 2026-05-24T05:51:35+00:00

As is well known, any real in [0,1] can be written as a binary

  • 0

As is well known, any real in [0,1] can be written as a binary expansion in base 1/2:

x = b1 * 1/2^1 + b2 * 1/2^2 + ...

I would like an efficient way to get bi for a given x and index i, and I don’t think there’s any built-in way to do that in Mathematica. IntegerDigits and RealDigits don’t seem to be able to help, and none of the related functions are pertinent.

The obvious solution is to do the manual conversion, but I was hoping to avoid that. Am I missing something?

EDIT: for future reference, what I was looking for can be done this way,

BinaryExpansionBit[p, j] := RealDigits[p, 2, 1, -j][[1]][[1]]

where

BinaryExpansionBit[x, i]

gives the bi I was talking about.

  • 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-05-24T05:51:36+00:00Added an answer on May 24, 2026 at 5:51 am

    It depends on what you mean by “efficient”. Mathematica can easily convert to binary, as this Wolfram Alpha example shows.

    Otherwise what you are looking for is the parity of the integer part of x * 2^i.

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

Sidebar

Related Questions

Is there any well-known algorithm (or obvious solution) for transforming a list from order
I am wondering if there are any well-known algorithms that I should be aware
Its well known that we can store DATA in dynamically allocated memory. However, I
As well-known, C++ has steeper learning curve than most of the mainstream languages, which
LAMP is a well-known acronym for the software/technology bundle/stack representing Linux , Apache ,
It is a well known problem to every web developer. As far as I
It's a well known fact, that Oracle treats empty strings as null. However, I'm
Is there a well-known, portable, good library for C++ process management? I found a
The following is a well known implementation of singleton pattern in C++. However, I'm
It seems to be well-known there is a bug when using JMenuItem.getRootPane(). I read

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.