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
-1
votes
1answer
15 views

how to convert decimal 49.25 to hexadecimal?

please explain step by step procedure on how to convert 49.25 to hexadecimal. I don't understand how to convert the decimal part.
-2
votes
0answers
31 views

binary floating-point [closed]

Some microcomputers in the past used a binary floating-point format with $8$ bits for the exponent $e$ and $1$ bit for the sign $𝜎$. The significand $\overline c$ contained $31$ bits, $1 ≤ \overline ...
0
votes
2answers
32 views

Find a recursive relation for the case of a length $n$ binary string where there are no three consecutive $0$'s.

Find a recursive formula for the following example. The number of binary strings of length $n$, such that there are no $3$ consecutive $0's$. I started by considering the length $n$ as a block ($1$ ...
1
vote
3answers
29 views

Infinite binary sequences countable set

I know that the set of all binary sequences is uncountable, and I'm asked to prove that the set of all binary sequences that are constant from a certain point ($n\in\mathbb{N}$) is countable, meaning ...
0
votes
0answers
16 views

arranging binary words in circle - induction

i need to prove that for set A which contains all of the binary words of length n can be arranged in a circle so each two adjacent words will be different only by one char. I tried solving it by ...
2
votes
4answers
199 views

How do you convert a number from base $10$ to binary?

I don't understand how you get the binary representation of a number. Say we have a number in base $10$, how do you change it into binary? I used the Google math converter as well. . All I know is ...
1
vote
2answers
54 views

Determining if $m$ can be written as a combination of distinct powers of $w$.

Given a weight $m$ and weights $w^0, w^1, w^2, \ldots, w^{100}$, determine if $m$ can be measured on a balance using these weights. In other words, is it possible to place a weight $m$ and some ...
0
votes
0answers
10 views

Binary representation unusual relation in theorem about immersed manifolds.

Question I'm reading Schuller's Lectures on the Geometric Anatomy of Theoretical Physics and he states the following theorem. I was surprised by this theorem and would like references for further ...
0
votes
1answer
35 views

Boolean expression for a problem

I want to express problems like this in boolean expression with say $XOR$, or operations etc. $HD$ = Hamming distance Say for $HD(2^4, 0000)\geq2\;$ the boolean expression is $$x1 (x2+x3+x4) + x2 (...
0
votes
1answer
28 views

Use structural induction to prove that $v(G) = e(G) + 1$

$G$ is an element of FBRT (full binary rooted trees), $v(G)$ = total vertices in $G$, and $e(G)$ = total edges in $G$. I know logically that this is true, but I'm not sure how to prove it using ...
0
votes
1answer
16 views

Converting base 2 to Base 10? [closed]

How is $0.11 \cdot 2^{1}$ converted to $1.5$ in base 10? I am unable to understand the theory behind this, since I believe $0.11 * 2^{1}$ corresponds to $1.1$ but I dont see the conversion process?
1
vote
0answers
8 views

How change in discrete bits is equivalent to sinusoidal function?

I am reading this blog about positional encoding. I came across an interesting comparison where the continuous representation of bit change is a sinusoidal function. See the following bit change: <...
0
votes
1answer
11 views

Compute the minimum hamming distance

to compute the min hammning distance of the 4 codewords: 1110001110010111 1001011010001110 0010111101101111 1100000000011111 Do I have to compute the hamming distance between every two codewords? ...
0
votes
2answers
31 views

8 bit binary number $01101110$ is on a computer using two’s complement representation. What should it be in decimal?

8 bit binary number $01101110$ is on a computer using two’s complement representation. What should it be in decimal? My solution is: reverse it to $10010001$ $10010001+1 = 10010010$ $10010010$ to ...
0
votes
0answers
12 views

Number of combinations of a list with a given parameter of max distance between two values

Given a list $${1,1,0,0,0,0,0,0}$$ On can solve can find all combinations given the equation $$n!/(r!(n-r)!)$$ which for the above example is $$(8!/(2!(8-2)!) = 28$$ What would be the equation if ...
-1
votes
0answers
30 views

Expressing a problem as boolean function

My question is somewhat related to this, but not exactly. Showing an example below: For a 4-bit string = x, I want to be able to express ALL other binary bit strings in a set that is a multiple of ...
0
votes
1answer
12 views

The FlipBits tree

Take a number, say $n=99_{10}$. Express it in binary, $11000111$. Now flip the bits, $0011100$ and discard leading $0$'s: $11100 = 28_{10}$. Continue until $0$ is reached: $(99,28,3,0)$. Here's a ...
0
votes
1answer
17 views

Greedy approach to find maximum product $P = (A-k_{1})*(B-k_{2}).$

Suppose you are given two integers $A$ and $B$; $A \leq B$. I have to calculate the maximum possible value of the expression $P = (A-k_{1})*(B-k_{2}).$ Here $k_{1}$ and $k_{2}$ both are variables but ...
0
votes
0answers
511 views

Binary representation of Collatz numbers — what is known so far about the maximum number of divisions by $2$?

Based on the binary representation of Collatz numbers, we proved that the maximum possible number of divions by two, $\hat\alpha$, in a Collatz sequence is given by $$\hat\alpha=\lfloor n\cdot\...
0
votes
1answer
40 views

What's this compression technique called?

Consider this string of 1's, 0's, s and e (spaces added ...
-1
votes
0answers
50 views

Finding Bitmask which when ANDED to mask 2 numbers maximize the product of the masked numbers formed

Given two numbers A, B find M (which will be used as AND bitmask) such that (X <= M <= Y) which maximizes the product of the masked A (A & M) and masked B (B & M) ((A & M) * (B &...
1
vote
1answer
29 views

How use probability distribution to generate a binary array with k number 1s acording a range of lower and upper bounds

I need to generate a binary array of size N with K numbers 1 and (n-k) numbers 0 on it,does not matter in which position. The amount of K numbers 1s belongs to an interval Min <= K <= Max , ...
0
votes
0answers
7 views

Is there any stablished concept of a numeric base that increases linearly the alphabet according to the digit position?

I have seen something about multi-radix systems like the factorial one, but I have a more specific question. Suppose base-10: a 3-digit number can have all possible digits in the alphabet $[0,1,...9]$....
0
votes
0answers
8 views

the height(h) of a Btree, with n keys, where every node that is not a leaf has exactly d sons, keeps this trait $h\le log_d((d-1)n+1)-1$

how can I prove that the height(h) of a Btree, with n keys, where every node that is not a leaf has exactly d sons, keeps this trait? $$h\le log_d((d-1)n+1)-1$$ I tried this with nodes, but i am ...
0
votes
1answer
15 views

Ternary random generator from coinflip

Provided a coinflip generator (a function that can be called to provide an output of either 1 or 0 with equal probability of $1/...
1
vote
0answers
12 views

Minimum number of nodes perfect binary tree

definition of perfect binary is "which all internal nodes have two children and all leaves are at same level" perfect binary tree i know max. node number: 2^h - 1 (h>=1) but i cant figure out, ...
0
votes
2answers
30 views

About binary subtraction: how does this work?

So there's a course I'm watching online and it operates binary subtraction this way: asking y-x, where: y=0111 (or decimal 7) x=0010 (or decimal 2) And instead of using a 2's complement to change ...
0
votes
2answers
43 views

Binary multiplication 1111 x 1111?

I am confuse that how carry works while multiplying two binary numbers 1111 x 1111 = 011100001 but how to handle carries in calculation? Can anyone please explain? I know how to handle partial ...
0
votes
1answer
182 views

3.1 x 10^-9 in 4-bit sign-magnititude representation problem possible?

I'm puzzled with this math question below and would like the help of others, the only answer I can imagine to this question is that the above number will need more than 4 bits to be expressed in ...
0
votes
0answers
18 views

Does this identity over {0,1} have any relation to logarithms?

I was working with Bernoulli Mixture models for a Machine Learning class, and I stumbled across a (to me, surprising) identity. Question The identity in question is $$\forall x \in \{0,1\}, a,b \in ...
4
votes
1answer
46 views

Coloring And combinatorics

Let $S$ be a set with $2020$ elements, and let $N$ be an integer with $0 \le N \le 2020 $ . Prove that it is possible to color every subset of $S$ either black or white so that the following ...
0
votes
1answer
13 views

Check if in each case borrow and overflow are generated?

Note: Just tell me if my reasoning or logic is wrong. So I have two numbers 01001 and 1110. And the question asks to subtract them as both signed and unsigned system. Unsigned System For this I ...
0
votes
1answer
24 views

Sequence to N has the same condition holding in the binary format regardless of how many times we subdivide the sequence

If we have a sequence from 0 to N in binary format then the number of 0 and number of 1s in the least significant bit have a balance i.e. if N was even then there is one 0 more than how many 1s are ...
0
votes
1answer
38 views

Question related to Single-precision floating-point format

What number does the following word stand for? $$\color{red}{1}\;\;\;\;\color{blue}{10000101}\;\;\;\;11110010011110100000000$$ Where the red one is the sign (it's called the sign bit which ...
0
votes
1answer
10 views

Number of possible intervals of consecutive binary values

In a string like "00110101010000111001111011111000" I'm reliably informed that the number of intervals containing consecutive zeros and consecutive ones can only differ by 1. It kind of makes sense, ...
0
votes
0answers
16 views

Binary 3's pattern

Is there a pattern when you count by 3's in binary? I have tried counting by 3's in base 10 and converting it to binary. I found that 15, 30 and 60 all start with 1111 e.g. 15 = 1111 30 = 11110 60 = ...
0
votes
1answer
14 views

Optimize Binary Data Using Or Operator

The purpose of this post is mainly for keywords for related researches. Given $y_i\in \{0, 1\}$ and $x_i\in\{0,1\}^{n}$ for $i=1\ldots m$ and . How to solve the optimization problem $$\begin{align} &...
1
vote
1answer
33 views

Highest power of 2 factor of $N!$ is equal to $2 ^{N - {\rm sum\ of\ bits}}$?

I am reading on this page a formula stating that the largest power of 2 contained (as a factor) in $n!$ has the following exponent: $n -$ number of bits that are equal to $1$, in the binary ...
1
vote
0answers
73 views

How to prove formula related to $2$-adic valuation / $2$-adic absolute value and binary expansion

I would like to prove the following formula, which I have verified for every positive integer $n \ge 1$ up to $n = 10000$: $$n - \sum_{k=0}^{\lfloor \log_2{n} \rfloor}\left(\left\lfloor\frac{2n-1+2^{...
0
votes
0answers
80 views

How to prove $n = \sum_{k=0}^{\lfloor \log_2{n} \rfloor}{\left[ \left\lfloor \frac{n}{2^{k+2}} \right\rfloor + c_k \right](k+1)}$

I would like to prove that: $$n = \sum_{k=0}^{\lfloor \log_2{n} \rfloor}{\left[ \left\lfloor \frac{n}{2^{k+2}} \right\rfloor + \left(\left\lfloor \frac{n}{2^{k}} \right\rfloor \bmod 2 \right) \right](...
1
vote
1answer
69 views

Rational numbers with repeating decimals in binary

Is it possible to prove that there exists a rational number with repeating decimal digits in base-10 representation that isn't repeating in binary? For example, $0.\overline{0011}_2$ is a binary ...
1
vote
1answer
14 views

Elegant way to obtain the smallest subset of binary matrix rows where each column sums to at least 1

Context: I have $m$ groups of a random number of $n$ types. Each type can occur only once for each group. I hope to reduce the groups to the smallest set such that each type occurs at least once. ...
1
vote
1answer
48 views

Help on computing some property value of a binary tree.

I am trying to compute some properties of a binary tree, but I cant find its formula. What I did to get the initial value is, I draw the binary tree on paper and manually count the nodes, pairs, etc. ...
3
votes
1answer
60 views

Probability of binary string prefix divisibility by 3

What is the probability of an evenly distributed binary string of length $n$ to have a prefix that is divisible by $3$? I know that divisibility by $3$ of a binary string is equivalent to the ...
0
votes
0answers
29 views

Algorithm and Generating expressions that satisfy a condition

def dec_to_bin(n): s = '' x = n while x > 0: d = x % 2 x = x // 2 s = str(r) + s return s What does expressions $A$ and ...
0
votes
2answers
59 views

Transforming a combinatorics question to a binary system question.

Preface This is a quite interesting question that I have come across some earlier years in my Olympiad training. Due to my bad memories and notebook record, I failed to trace back where I found this ...
1
vote
3answers
37 views

What is the notation of a set of $n$ binary numbers where all of them are 0 except for one?

From this post I found out we can define a set of $n$ binary numbers mathematically like: $\mathbb Z_2^n$. But what if I want to further restrict this set such that all the bits must be zero except ...
0
votes
0answers
14 views

how to generate variates from a particular categorical binary data?

So im working with more than 100 thousand samples dota2 dataset which consist of the winner and the "hero" composition from each match. I was trying to build winner of the match prediction model ...
1
vote
1answer
64 views

Prove $\big\lfloor{\frac{n}{2}}\big\rfloor+\Big\lfloor\frac{\lceil\frac{n}{2}\rceil}{2}\Big\rfloor+\cdots = n - 1$.

I suspect for $n\in \Bbb{Z}^+$, and $\lceil{log_2n}\rceil$ addends, $\big\lfloor{\frac{n}{2}}\big\rfloor+\Big\lfloor\frac{\lceil\frac{n}{2}\rceil}{2}\Big\rfloor+\Bigg\lfloor\frac{\Big\lceil\frac{\big\...
0
votes
0answers
17 views

Find the orbit of a periodic point and show parity

I'm confused with problem 1 and 4 (this is chaos theory). I don't know how to begin and I'm having trouble following the example.

1
2 3 4 5
27