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

learn more… | top users | synonyms

0
votes
1answer
26 views

Converting from Octal to Decimal.

I have the value $(3738)_8$ and I want to convert it to decimal. The answer i believe is $$(3 \times 8^3) + (7 \times 8^2)+ (3 \times 8^1) + (8 \times 8^0) = 2016$$. My question is that on some ...
0
votes
1answer
41 views

Grade School Multiplication Algorithm for Binary Numbers explanation

I under stand the shifting but not why it will always give the right answer? For Example: ...
1
vote
0answers
36 views

Generating function from a set of binary strings

So this question is in my textbook and there's no solution, so I'm seeing if I can get a confirmation? Q: Let $S$ be the set of all binary strings of length 4, where for each string $a\in S$, the ...
1
vote
0answers
37 views

Has anyone established an upper bound for the least integer $k$ such that infinitely many primes have at most $k$ ones in their binary representation?

Has anyone established an upper bound for the least integer $k$ such that infinitely many primes have at most $k$ ones in their binary representation? $2$ is the only prime with $1$ one, the Fermat ...
7
votes
1answer
162 views

$N$ perfect logicians wearing hats

I once came across the following riddle: (assume $N$ to be extremely large) There are $N$ perfect logicians arranged in a vertical row. They are allowed to strategize before the game, during the ...
1
vote
3answers
67 views

Defining a bijection with binary strings

Let $n\in\mathbb N$. Then a binary string of length $n$ has the form $a_1a_2...a_n$ such that each $a_i$ is either 0 or 1. Define $E_n$ to be the set of all binary strings of length $n$ with even ...
0
votes
1answer
38 views

Understanding binary combinatorial problem

It has been quite some time since I've done permutations and combinations, and I'm attempting to remember the proper way to go about solving this issue (not a homework assignment, more of a thought ...
0
votes
0answers
17 views

Binary Overflow Detection

I am trying to solve several problems, which are binary and encoded using the 2's complement system. One problem has stuck out to me: 0111 + 0001 Both are positive, with 0111 being 1+2+4 or 7, and ...
0
votes
1answer
71 views

Find number between $A$ and $B$ with maximum set bits?

Given two integers $A,B$. Find number $N$ which has maximum number of set bits in its binary form and lies between $A$ and $B$ inclusive. Is there any approach for this question. Also if there are ...
0
votes
1answer
60 views

Using XOR operation repeatedly

There are $n$ binary digits, from $A_0$ to $A_{n-1}$. Each operation consists of the following 2 steps: Each digit is replaced by the XOR addition of itself with the next digit. ...
1
vote
2answers
35 views

Converting Decimal to Hexadecimal

MathExchange, I am trying to learn more about computers, and one thing I have opted to teach myself is decimal to binary, and decimal to hex conversion. From the web, I have found tutorials on ...
2
votes
2answers
38 views

Mathematical Relations in Computing - Unary

I have this question that's bugging my mind: "Discuss by giving suitable examples the role of mathematical relations (Unary, binary and ternary) in computing." I'm sure it's a very simple question, ...
2
votes
0answers
34 views

An expression for the number of n-bit binary strings with at most k ones (without summations)

Say we need to find an expression for the number of binary strings of length $n$, which have at most $k$ ones. My solution was to split the problem into $k+1$ cases, where the number of ones, ...
1
vote
2answers
26 views

How many numbers with given amount of ones in their binary form?

I was practicing for a programming competition and I got the following problem, which I was unable to solve: It is given a number N. Find the amount of x, y values, where x > N, y < N and the ...
1
vote
2answers
29 views

Correlation between Binary and N-dimensional simplexes

I found an interesting correlation between binary numbers and $n$-dimensional simplexes and I'm trying to find where I can find more information on the subject. I noticed that binary representations ...
18
votes
3answers
1k views

What do bitwise operators look like in 3d?

The hypothetical relation is $z = \mathrm{xor}\left(x,y\right)$ where xor is any bitwise operator such as AND, OR, NAND, etc. I see that these operations may be defined for integers trivially using ...
1
vote
1answer
25 views

Binary Multiplication Counting Ones

Excuse my formatting. I have noticed the following but know no way to prove it. Given the multiplication $y=(2^n-1)\cdot m$, where n,m are positive integers and $m\leq(2^n-1)$. Prove that the count ...
1
vote
1answer
45 views

Are some infinite fractions in one counting system non-infinite in another?

I'm curious whether some infinite periodic fractions in one counting system (e.g. decimal - 10/3 = 3.33333...) turn out to be non-infinite in another system and vice - versa. Please excuse me if my ...
0
votes
1answer
15 views

Algorithm for Converting Non-balanced Base-n to Balanced Base-n (for odd n)

Let $n \in 2 \mathbb{N} - 1$. I was wondering what sort of algorithms there are for converting (non-balanced) base-n to balanced base-n, where "balanced" is as is described in this article: ...
4
votes
1answer
43 views

Least squares with matrix in $GF(2)$?

Here's an example of a problem I'm working on involving finding combination of bit vectors that yield a certain sum (in the $GF(2)$ sense): $ \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 ...
2
votes
1answer
18 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) ...
1
vote
2answers
68 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 ...
3
votes
2answers
34 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 ...
12
votes
4answers
981 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 ...
0
votes
2answers
47 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 ...
0
votes
1answer
38 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 ...
0
votes
0answers
33 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 ...
0
votes
1answer
29 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 ...
1
vote
3answers
23 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 ...
0
votes
1answer
17 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 ...
1
vote
6answers
63 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, ...
1
vote
0answers
49 views

Is there a name for this constant? (0.0100011011…)

It's the simplest number I could think of that contains any finite binary code in its digits: $$\begin{align} c &= 0.0100011011000001010011100101110111...\\ &= ...
0
votes
0answers
17 views

Give the idempotent generators of the four binary QR codes C1 , C2 , C3 , C4 , of length 7.

I'm having trouble on some homework. This is the last problem and I can't figure it out. Can anyone help or point me in the right direction? Thanks! For each code Ci , 1 ≤ i ≤ 4, from part (a), give ...
0
votes
3answers
83 views

Isn't this the most compact binary representation of all numbers?

Here is the transformation: $$\begin{align*} &1\to(0)\\ &2\to(1)\\ &3\to(10)\\ &4\to((1))\\ &5\to(100)\\ &6\to(11)\\ &7\to(1000)\\ &8\to((10))\\ &9\to((1)0)\\ ...
0
votes
1answer
112 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. ...
0
votes
1answer
29 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 ...
0
votes
1answer
18 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 ...
1
vote
0answers
19 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 ...
7
votes
0answers
173 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 ...
0
votes
2answers
41 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 ...
0
votes
1answer
13 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 ...
0
votes
2answers
44 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 ...
0
votes
1answer
20 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 ...
2
votes
1answer
87 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 ...
0
votes
0answers
109 views

Random walk on infinite binary tree (recurrence, transience)

Consider a random walk on the infinite binary tree with root $x$ which has the following transition probabilities. $$ p_{x,0}=p_{x,1}=\frac{1}{2},~~~p_{y,y0}=p,~~~p_{y,y1}=q,~~\text{and ...
1
vote
2answers
46 views

Solving the equation $a+e+2ae=a$ for $w$

Just need a quick answer of how my tutor got $e$ to $= 0$ from this equation. (I'm trying to find the identity of a binary operation) $$a+e+2ae=a$$ I feel like this is a very easy problem but I'm ...
1
vote
1answer
27 views

Every binary number coincides in more than half of bits

Let $n\in\mathbb{Z}^+$. We would like to pick some binary numbers of length $2n+2$ so that any binary number of length $2n+2$ coincides with one of the picked numbers in at least $n+2$ positions (that ...
0
votes
0answers
23 views

Convert a 6 bit binary to negative

"Explain how negative numbers are represented." My answer is that if we ie. have the number 3 and want to convert that to -3 i do as follows: 3 = 0011 in 4 bits. i switch the 1s and 0s => 1100 and ...
1
vote
1answer
31 views

Flipping coin(s) to decide who pays the bill

I'm not from a mathematical background. I found this video on YouTube rather confusing. I know basics of probability from school. My question: If a single coin is flipped among 3 people say A, B and C ...
0
votes
0answers
13 views

Forumlate Binary Optimization problem for maximizing total net profit for terminals installed and revenue between these terminals

I need help with formulating the problem, as I am not sure if I am doing it correctly and whether there is only 1 answer or multiple correct answers. Thanks