If you have seen this part before, ignore the first part and jump to “Change of the algo here” section In this post I gave this following Algorithm to generate every element of $2^{\mathbb{N}}$ with given a value $x\in \mathbb{R}_{[0,1)}$ let $x\in \mathbb{R}_{[0,1)}$. If $x=1$, then note that $1_{10}=0.\dot{9}_{10}$ and $0.\dot{9}_{10}=0.\dot{1}_2$ Otherwise calculate $2x$, if […]

Actually here is a basic question, but i have a little problem about it. In binary system, for any number such as 1011001, can we say directly “it is end with 1, so it is an odd number”?, or firstly should we convert it to decimal form, then look for is it odd or even […]

Consider the set of binary functions that takes an N-bit input -> 1 bit output. There are 2^(2^N) elements in this set. Now potentially reduce this set by restricting to only considering functions which have a dependence on every input bit (ie. there is no bit such that inverting the bit on the input never […]

Ok, I know how to use long division by using regular numbers, but when comes to binary numbers I’m getting confused. In following calculation I can see the equation solved but I don’t understand where the top number came from. How to decide what bit goes on top while doing this? PS. We are doing […]

I’m not a math guy, so I’m kinda confused about this. I have a program that needs to calculate the floor base $2$ number of a float. Let say a number $4$, that base $2$ floor would be $4$. Other examples : $5 \to 4$ $6 \to 4$ $8 \to 8$ $12 \to 8$ $16 […]

I know it is possible to count the number of reinterpretations of ones and zeros in binary of any given digit using the simple law $2^n$, but I want to remove the duplicate count where $11$, or $111$ is present. Only $1010$, $01$, $0101$ but not $0110$. I mean no double $1$s should neighboring each […]

I first enumerate a list of all possible binary strings for a length $n$ (e.g., [“00”, “01”, “10”, “11”] for $n=4$). This leads to a list of $2^n$ binary strings. Within that list of $2^n$ elements, I’m principally interested in the $C_k^n$ combinations of strings, for example all binary strings with a single bit set […]

I saw this pattern of binary numbers with constraints first number should be 1 , and two 1’s cannot be side by side. Now as an example 1 = 1 10 = 1 100,101 = 2 1000,1001,1010 = 3 10000,10001, 10010, 10100, 10101 = 5 Strangely I see the numbers we can form of this […]

I am trying to learn binary long division, and I am confused. An example in my book gives that $10011010000/1101 = 11111001$ plus a remainder of $101$, which doesn’t make sense, since $1001$ is not divisible by $1101$, and so the first digit should be $0$. When I use an online calculator, it gives me […]

I want to convert $\frac{2}{7}$ to a binary number in a $32$ bit computer. That is, $1$ bit is assigned to the sign of the number, $8$ bits are assigned to the exponent, and $23$ bits are assigned to the mantissa. So $x = \pm q \times 2^{m}$ where $\frac{1}{2} \leq q < 1$ (if […]

Intereting Posts

Clever use of Pell's equation
The median minimizes the sum of absolute deviations
Angle between 2 points
If $p$ and $q$ are distinct primes and $a$ be any integer then $a^{pq} -a^q -a^p +a$ is divisible by $pq$.
Suppose that $f$ is a real valued function such that its second derivative is discontinuous.Can you give some example?
Relationships between bounded and convergent series
Expected number of people sitting in the right seats.
How do I find the cumulative distribution function of a binomial random variable?
Evaluating $\int_0^\infty \frac{dx}{1+x^4}$.
How many digits does the integer zero have?
Show that $k/(xy-1)$ is not isomorphic to a polynomial ring in one variable.
Minimal polynomial and diagonalizable matrix
Is there a closed form equation for fibonacci(n) modulo m?
Measurable functions and compositions
Two Strictly Convex Functions with Contact of Order 1