# Tagged Questions

Questions related with (base 2) representation of numbers and their unique properties arising out of number representation.

1answer
13 views

### float vector to binary integer vector transformation preserving dot product

Is there a transformation of a set of float vectors to a set of binary integer vectors that preserves the dot product. I found conformal transformations but I'm interested in large vectors (size 300) ...
0answers
81 views

### Number of sequences of 0s and 1s of length N such that k consecutive 1s are present [on hold]

How many different sequences of $0$s and $1$s of length $N$ are possible such that at least $k$ consecutive $1$s are present in them where $k\leq N$ exactly $k$ consecutive $1$s are present in ...
2answers
43 views

### How to find Bitwise AND of all numbers for a given range?

How can I find Bitwise AND of all numbers for a given range say from A to B, including both? I found a beautiful answer for finding XOR for such range. http://stackoverflow.com/a/10670524/2046703How ...
2answers
26 views

### Classification of numbers on the base of binary representation

The problem is the following. I would like to find a simple algorithm or principle of classification of numbers regarding their presentation in binary form. Let's consider an example. The numbers by ...
0answers
14 views

### An algorithm to binary division

there is some algorithms for binary division in computer architecture. first: resorting which is described in Computer Architecture of D. Patterson second: non-resorting which is described in Computer ...
4answers
931 views

### Is Cantor's diagonal argument dependent on the base used?

Applying Cantor's diagonal argument to irrational numbers represented in binary, one and only one irrational number can be generated that is not on the list. Wikipedia image: But if you change ...
2answers
40 views

### distribution probability question involving binary functions for certain n<2^10

For any positive integer n, let G(n) be the number of pairs of adjacent bits in the binary representation of n which are different. For example, G(10)=3 because the bits of $1010_2$ change at all ...
1answer
33 views

### Unfair coin probability (P) that results in 0.5% chance of getting x tails out of y tosses?

For an unfair coin toss that produces heads with probability P, what is the value of P that will result in 0.5% (i.e. 0.005) chance of getting exactly x tails out of y tosses? i.e. is there a general ...
0answers
30 views

### How to prove that all powers of two minus one have only 1's when in binary representation?

It just came to my mind that all powers of two, when represented in binary format, are composed of only 1's, not 0's. I can see some logic behind it, however I can't seem to come up with an actual ...
1answer
26 views

### XOR function over binary vectors

I didn't really know how to name this question, it has been bothering me for some time: You are given n binary vectors of dimension $d: x_1,\cdots,x_n$; $x_i = x_{i_1},\cdots,x_{i_d}$. You are also ...
3answers
21 views

### 4-bit number to decimal number

Juts like the title says: a code to convert a 4-bit number into a decimal equivalent number without using any fucntion from octave's library. Not a clue! We consider the input a binary number ...
1answer
15 views

### how binary quantile regression divides the dependent variable into quantiles

I am not very clear with binary quantile regression. As if it was ordinary quantile regression, it would divide the dependent variable's value by its ascending value into quantiles. But I cannot ...
6answers
60 views

### What is 6.5 in binary? [duplicate]

I just stumbled across a problem I never actually thought about before: decimals in binary. Can someone explain how to do it? Thanks! Note: If possible, I'd like the answer in decimals not fractions, ...
0answers
45 views

1answer
104 views

### Proving properties of binary relations

Attempting to find answers to solve these questions. I've been looking all over the web for references since my textbooks aren't being helpful. Now, I'm still at the starting point. ...
1answer
25 views

### how to find the binary expansion of any number in the unit interval [0,1]

For each integer $n\geq 1$ and $x\in [0,1]$, define $f_n(x)=x_n$ where $x_n$ is the $n$th binary digit of x. If x is a number with two binary expansions, use the expansion that ends with infinitely ...
1answer
17 views

### How is OEIS sequence A120933 'maximal leading nondecreasing subword ' to be understood?

For n=2 we only have these four binary words: 00 01 10 11 What is the procedure for calculating by hand T(2,1) and T(2,2)? I'm trying to understand the reasoning behind this sequence as I can't see ...
0answers
15 views

### Given two dot products with the same vector in a prime finite field of 2 (Galois Field), how can one figure out future dot products?

I've stumbled upon an interesting "rule" derivation for the value of a dot product in $\mathbb{R}^{n}$ like this: Given an arbitrary vector $\vec a \in \mathbb{R}^{n}$ and the values of two dot ...
0answers
167 views

### Number of ways to express a binary number in a certain way

So I'm working on a problem where I get to a point where I have to count the number of solutions to an equation or at least find a decent upper bound to be used in an estimate I need later. The ...
2answers
29 views

### Find the solution of binary xor operator equation

I am working in binary xor operator $\mathbb Z_2$. I have to resolve my problem such as $$\begin {cases} x_1+x_2+x_3=1\\ x_1+x_2=0\\ x_1+x_3=1\\ \end {cases}$$ Could you suggest to me any method to ...
1answer
12 views

### Mathematical Terms for Binary Operations

I'm trying to represent binary operations on numbers in mathematically correct terminology. For example given two binary numbers: 42 : 101010 13 : 001101 I want ...
2answers
41 views

### Will the Russian Peasant work with anything other than base 2?

The Russian peasant method involves doubling and halving by 2. Therefore you will get exact remainders of either 1 or 0, which perfectly represents one of the multiplicands in binary form. I just ...
1answer
15 views

### Explanation of division/reduction in a binary Galois Field using bit-shifts

I've seen a lot of algorithms reducing the result of a multiplication in a Binary Field by using only bit-shifts and XOR. The number of positions to shift seems to be derived from the polynomial, but ...
1answer
54 views

### Counting binary strings that have atmost k consecutive 0's

I know how to count how many binary strings with length n and having exactly k 0's are there but i am not able to find a way to count the number of binary strings that have exactly x 0's and y 1's and ...
0answers
78 views

1answer
65 views

### Polynomial Arithmetic Modulo 2 (CRC Error Correcting Codes)

I'm trying to understand how to calculate CRC (Cyclic Redundancy Codes) of a message using polynomial division modulo 2. The textbook Computer Networks: A Systems Approach gives the following rules ...
1answer
14 views

### Determine whether or not a binary number is divisible by $3$

Let $K$ be a natural number with $n$ binary digits. Is there an $O(n)$ method for deciding whether or not $K$ is divisible by $3$? $3|K \iff d_1-d_2+d_3-d_4\dots\pm d_n=0$ works correctly up to ...
1answer
30 views

### Binary overflow

Which of the following hexadecimal numbers, representing signed 16-bit binary numbers, results in overflow when multiplied by 4? Here, a negative number is represented in 2's complement. ...
1answer
26 views

### Binary representation of the real numbers

I am solving the following exercise: for $n \in \mathbb{N}$ and $a_1,a_2, \ldots ,a_n \in \{0,1\}$ we define:  I(a_n, \ldots , a_n) := \left \lbrack \sum_{i=1}^n \frac{a_i}{2^i}, ...
1answer
29 views

### Convert from two's complement into unsigned number

There is an 8-bit numerical value, where a negative number is represented in two’s complement. When this value is represented in decimal, it becomes -100. When this value is regarded as an ...
1answer
27 views

### Multiple representations of ternary expansions of numbers

$x \in [0,1]$. If in binary expansions ie series $\displaystyle x = \sum_{i=1}^{\infty} \frac{x_i}{2^i}$ where each $x_i \in \{0,1\}$ we identify the sequences $\underline{x}$ and $\underline{x}'$ ...
2answers
135 views

### How many Binary numbers?

How many binary numbers of length $n$ can be generated where $n > 7$ and the number either start with $000$ or end with $111$? My questions is, can I choose an $n$ randomly? For example, let's say ...
1answer
24 views

### Finite binary representation of float number

How can I prove that float number $x$ has the finite binary representation if and only if it is written like that: $x = m / 2^n$, where $m, n \in \mathbb N$. Should I consider something like 3 ...
3answers
214 views

### Number of binary palindromes in a range

I want to find the number of binary palindromes from $1$ to $N$. $0 \lt N \lt 2^{32}-1$. I observed a pattern that if we have an odd-length binary palindrome, it can generate only $1$ even-length ...
1answer
35 views

### Binary expansions of dyadic rationals in $[0,1]$

Completely stuck on this exercise! Hints and a starting point would be greatly appreciated. Nor do I see why is $x \in [ 0,1] \setminus D$ do not have $2$ binary expansions.
2answers
73 views

### Is it possible to not have irrational numbers?

(Math noob question): Is there a base that can be used like binary that produces no irrational numbers or numbers with an infinite amount of one number after the decimal (don't know the name)? I feel ...