Questions tagged [binary]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

How to find the number of Hamming weight 4 bit vectors with Hamming distance at least 4 for length N?

Given a set of bit vectors of length N with the restrictions that each vector should have a Hamming weight of 4 (4 of the bits are 1, the rest are 0) and each vector is at least a Hamming distance of ...
1
vote
1answer
34 views

Hamming distance between consecutive primes

The Hamming distance between strings of equal length is the number of mismatches between the strings MYSTERY MASTERS ^ ^ This distance can be defined for ...
1
vote
0answers
39 views

Find a sum of all numbers in the list which have zero in the high-order digit.

Let's fix a positive integer number $p$. Let $x$ be a non-negative integer that can be expressed using binary system in such a way: $x=\overline{x_{p-1},...,x_0}$, where $x_0,...,x_{p-1}\in \{0,1\}$. ...
0
votes
0answers
31 views

How to calculate the right-most digits of $\lim_{n\to\infty}\sum_{k=0}^n k!$

Consider the the sequence $S_n=\sum_{k=0}^n k!$. Note that for any base $b$, as $k$ increases, the base-$b$ expansion of $k!$ will have a monotonically increasing number of right-most zeroes. Hence, ...
0
votes
1answer
28 views

Negative binary minus positive binary? [closed]

I'm subtracting binary numbers (like the binary of 10-5) and I understand that if do: (positive) binary A - (positive) binary B then I have to add the two's compliment of binary B to binary A. But ...
0
votes
0answers
20 views

Is there a rule or equation to convert decimal to binary without recursion

Every solution I’ve seen is always some method you have to repeat or iterate. But is there some equation I could just plug any number into and get the binary value. For context, I’m trying to do this ...
0
votes
1answer
24 views

Is a binary sequence generated by repetition and subsequent digit flipping periodic?

Consider a binary sequence (i.e. consisting of 1s and 0s), $a_{0}=0$. The members of the sequence are generated by repetition and flipping : $a_{n}$ are all the digits in $a_{n-1}$ followed by all the ...
-1
votes
0answers
45 views

Amazing math question please find the logic. [duplicate]

Please note that my English is not the best, I appologize in advance. My question: Like in the binary system each of us have 2 parents your parents have total 4 parents (your grandparents) your ...
1
vote
1answer
59 views

Defining $y^2$ in sums of $2^x$

Is there an expression which defines $y^2$ with $y \in \mathbb{N}$ into as little as possible sums of $2^x$ where $x \in \mathbb{N}_0$? i.e. $1^2 = 2^0$ $2^2 = 4 = 2^2$ $3^2 = 9 = 2^3 + 2^0$ $4^2 = 16 ...
0
votes
3answers
25 views

If $b_nb_{n-1} \cdots b_0$ is the binary representation of natural $x$, and if $(b_0-b_1+b_2-b_3+\cdots+(-1)^nb_n)=0\pmod3$, then $x=0\pmod3$

Let $b_nb_{n-1} \cdots b_0$ be the binary representation of a number $x \in \mathbb{N}$. Show that if $(b_0 - b_1 + b_2 - b_3+ \cdots + (-1)^n b_n) = 0 \pmod3 $, then $x = 0 \pmod 3$. I've tried some ...
0
votes
0answers
14 views

Formula for all integers for which a given range of bits are equal to a given value?

I was wondering if there is a formula for the integers for which a certain consecutive range of bits are equal to a given value? For example, given all integers < 16, for which integers are the two ...
1
vote
1answer
44 views

OEIS sequence A308092: run lengths of bits and run lengths of an auxiliary sequence.

In February 2018, when the On-Line Encyclopedia of Integer Sequences (OEIS) was approaching it's 300,000th sequence, Neil Sloane sent an email out to the SeqFan mailing list announcing hand-picked ...
21
votes
4answers
583 views

Representing all rational numbers between $\dfrac{1}{2}$ and $1$

How do I show that $$\dfrac{2^{\left\lfloor\frac12 a_1\right\rfloor} + 2^{\left\lfloor\frac12 a_2\right\rfloor} + \ldots + 2^{\left\lfloor\frac12 a_n \right\rfloor}}{2^{\left\lceil\frac12 a_1\right\...
2
votes
0answers
60 views

A binary strings combinatorics problem

Suppose, there is a primary set with 2 binary strings: {0000,0011}. I want to know the number of elements in a set that has all the elements that are an HD of 2,4 ...
0
votes
2answers
37 views

Does there exist two infinite subsets of naturals $A, B$ such that each $n \in A + B$ uniquely determines $a \in A, b \in B$ such that $a + b = n$?

Does there exist two infinite sets of naturals $A, B$ such that each $n \in A + B = \{ a + b : a\in A, b\in B\}$ has a unique solution $a + b = n$ in which $a \in A, b \in B$? For example: $$ A = \{0,...
-1
votes
2answers
29 views

Is there a function that takes in a binary number and yields the corresponding decimal number, or vice versa?

For example, f(10111010) = 186 f(101110101101001) = 23913 Correspondingly, is there an inverse function to this?
0
votes
0answers
48 views

A sequence in which the number of positive bits is always $k$.

Thanks to this stack , I got the following Conjectures. My question is as follows; My question: (Q1)Are the followng conjectures (1) and (2) correct? (Q2)If these are correct, please prove them. The ...
0
votes
3answers
48 views

Probability that XOR of an arbitrary number of random bits is 1

How can we say than the XOR between $n$ (uniform, independent) random bits is $1$ with probability $1/2$? For example if we have 4 random bits, we know that the XOR of them will be $1$ with half ...
0
votes
1answer
31 views

Positive bit count of the $S(n):=\sum_{i=1}^{n} 2^{(i-1)}$ always $n$?

From a discussion on a stack about the programing, I got the following mathematical Conjectures: Conjectures: Let n,m be positive integer, $S(n)$ and $CountPosbit(m)$ be as follows. $S(n):=\sum_{i=1}...
0
votes
1answer
28 views

Full Binary Trees - Maximizing the arithmetic mean of powers of leaf node levels.

I have a full binary tree with $n$ leaf nodes. Therefore we get the following constraint $\sum_{i=1}^{n}2^{-l_{i}} = 1$ where $l_i$ is the level occupied by each leaf node. I have the metric $\frac{1}...
0
votes
0answers
23 views

Manipulating binary strings

Let's say you have a binary string made up of $0$ and $1$ (e.g. $0011111$). Order does not matter so we can always put $0$s before $1$s. For ease of notation, we will write $0^n$ when we mean exaclty $...
5
votes
2answers
186 views

How many squarings are needed to exceed 2?

Given the base 2 representation of $x\in\mathbb Q$ ($1<x<2$ and has a finite number of digits in base 2), find a number $k\in\mathbb N$ such that $2<x^{2^k}<4$. The final answer/algorithm ...
0
votes
1answer
45 views

What is the size of the largest subset with a pairwise hamming distance of 3

Consider all binary strings of length $n$. Is there any known bounds on the size of the maximum subset such that the pairwise hamming distance between any two elements is at least 3.
0
votes
0answers
27 views

A puzzle problem of Digital VLSI design?

My thoughts: Here price of chocolate is increasing in Geometric progression with common ratio 2 and first term 1, so on nth day price of chocolate will be $T_{n}=2^{n-1}$ irrespective of wheather ...
0
votes
1answer
28 views

Binary System with Sigma Summation

Let 100110101 be a number from the binary system with the digits being $$ b_i \in \left\{0,1\right\} $$ If we calculate this number into the decimal system, the result is 309. What formula can be ...
2
votes
0answers
19 views

Equation to get the reversed binary number

I am wondering if there is a mathematical formula that can convert one number to another number that is equal to the reversal of its bits for the number's binary representation by some length of bit ...
0
votes
0answers
55 views

Binary addition using Linear algebra

Is it mathematically possible to do binary addition using linear algebra? To be more precise, when the binary numbers are represented by vectors, each element containing respectively the ones, tens, ...
0
votes
1answer
61 views

Binary String Combinations

For this question, imagine finite binary strings consisting of $0$ and $1$. For instance, $00111$ is a string. Order does not matter, so the string $1100$ is considered equivalent to $0011$. We will ...
4
votes
4answers
240 views

Pattern for all the binary chains divisible by 5

For instance, $x = 101$ is divisible by $5$ because it is the integer 5. Same thing for $x=1111$ is also divisible by 5 as it is the integer 15. However, $x=1100$ is not divisible by $5$ as it is the ...
0
votes
1answer
35 views

Dimension and basis of set of linear codes of even weight

I am working on questions about coding theory. The set C is the set of all words in binary code that have an even weight and are of length n. I have already proven that this is a linear code. Now I ...
-1
votes
5answers
40 views

Can this binary number be represented as a fraction $a/b$? [closed]

Can the binary number $0.1010\ldots$ be represented as a fraction $a/b$ with $a$ and $b$ as integer numbers?
1
vote
2answers
93 views

Determine the following sum

Let $S(n)$ be the sum of the digits of n in its binary representation. For example the binary notation for 19 is $10011$ and $S(19)=3$. Determine $\sum_{n=1}^{\infty} \frac{S(n)}{n(n+1)}$? I've made ...
1
vote
1answer
67 views

Convert Hexadecimal $8D(16)$ to binary in signed magnitude

I'm supposed to covert hexadecimal value, $8D(16)$ into $8$-bit binary if signed magnitude representation is used. $8D(16)$ $\to$ $1000$ $1101(2)$ For signed magnitude, the left most bit is used to ...
0
votes
3answers
24 views

Binary representation of a number $n$ with exactly one leading 0 can be turned into a binary representation of $n+1$

Prove that for $\forall n \in \mathbb{N}$, the binary representation of $n$ with exactly one leading 0 can be turned into a binary representation of $n + 1$ by flipping exactly one bit from 0 to 1, ...
2
votes
0answers
40 views

Modelling: Reducing Problems to SAT

I am required to give a (propositional) formula $\varphi_n$ for every n with $vars(\varphi_n)={X_0,...,X_{2n-1}}$ so that the following holds: $$\sum_{i<n}\beta(X_i)2^i \leq \sum_{i<n}\beta(X_{n+...
1
vote
1answer
45 views

Is there a formula for finding binary numbers in a binary string?

One bit Let's suppose that I have a short binary string: 01. This string contains the binary digits 0 and ...
1
vote
1answer
49 views

Binary translation zero issue [closed]

i'm a student and for this semester i have to deal with binary translation. I use multiple online tools for such conversion. My question is, The binary to text conversion for "A" is: ...
0
votes
0answers
9 views

Is it possible to optimize a classification function and a regression function at once given a trainingdataset?

As a project for school, we are given a dataset consistent of 35,000 datapoints with 15 coefficients (stochastic, categorial and binary). The problem is that a given bank (say bank A) wants to contact ...
0
votes
0answers
42 views

A direct formula for counting 1s in binary form of a positive integer

The question is edited based on the @Damien comment. Question: Is there a direct formula (not recursive) for counting 1s in binary form of a positive integer? For example, suppose the formula is ...
2
votes
1answer
43 views

Is a given integer's binary representation ever shorter than its decimal?

In particular, once you get into large numbers, does any given number's binary representation ever become a shorter string of digits than the decimal representation of the same number?
1
vote
0answers
31 views

Functions $f$ and $g$ such that $f(a, b) = f(g(a, b), b)$ over non-negative integers

Are there some properties which make it easier to find such $f$ and $g$? Few examples: $gcd(a, b) = gcd(|a-b|, b)$ $a | b = (a \oplus b) | b$, where $\oplus$ is bitwise XOR and $|$ is bitwise OR
2
votes
3answers
62 views

Binary String's set of elements

Example: How many 7-digit binary strings have three 1's? Answer: $ { 7 \choose 3} = 35 $ definition of $ { n \choose k} $ : If n and k are integers, then $ { n \choose k} $ denotes the number of ...
0
votes
1answer
24 views

Mapping outcomes of binary number generator to decimal range $[1, x] $with equal probabilities

I am looking for a function that maps each possible binary outcome from a binary number generator to a decimal range $[1, x]$ such that each value in the range has an equal chance of appearing. For ...
2
votes
1answer
39 views

Ternary and Binary representations to Prove Cantor set is uncountable (questions)

I am trying to prove that the Cantor set is uncountable, but I am very much a novice in working with different bases of numbers. I've never had to do it in any of my classes until now. Where I'm at is ...
0
votes
0answers
16 views

Binary division non restoring method

I have no idea how this works, at -7 it is shifted to get -14 then the 1 is brought down to give -13 Why exactrly do you keep adding the divisor? Source: https://userpages.umbc.edu/~squire/cs411_l10....
1
vote
1answer
33 views

Showing that for any composite binary number $b > 1$, $bb$ is also composite.

Say $b$ is the binary form of a composite number $d > 1$, I want to prove that $bb$ (concatenation of $b$ with itself) is also a composite number. My approach: Given a binary number $b$, $bb$ is ...
2
votes
2answers
92 views

How to multiply 2 Binary Numbers?

Suppose I have two regular numbers $a$ and $b$ in base $10$ like this: (where $N$ is even) $$a=a_{\frac N2}a_{\frac N2-1}\ldots a_1,\qquad b=b_{\frac N2}b_{\frac N2-1}\ldots b_1$$ So the result of ...
1
vote
2answers
57 views

What does this pic mean?(guess it's a binary number) [closed]

This number was presented in yesterday class and explained by teacher that they were lined up according to a certain rule. I think we'll use nibbles to solve this. I also think that the circle means ...
0
votes
0answers
32 views

Confusion about binary expansion of number in $(0,1)$.

Unfamiliar with discrete mathematics, I wondered in the following two answers Fast way to find period-n points of a tent map? Techniques for finding period points , why the authors wrote: 1. "...
1
vote
0answers
31 views

Runtime cost of Ethiopian Multiplication algorithm

The Ethiopian multiplication algorithm is a way of finding the product of two numbers without using multiplication. Let's say we want to multiply 35 by 88. The algorithm goes like this \begin{array}{...

1
2 3 4 5
30