# Questions tagged [binary]

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

1,555 questions
Filter by
Sorted by
Tagged with
38 views

### How can I tell which is closer to 0.72 without converting the binary numbers to decimal? [closed]

If I have two binary floats: $0.10111000_2$ and $0.10111001_2$ How can I tell which is closer to 0.72 without converting the binary numbers to decimal (base 10)?
35 views

### Arranging Binaries!

Today I was working on a problem, for which I think there are two possible answers to it, the question is we need to Arrange five $0$'s and five $1$'s such that no two $0$'s come together and no two 1'...
1 vote
21 views

### Max edit distance between binary strings of length n

Given a binary string s of length $n>2$.An edit operation is a single character insert, delete or substitution. The edit distance between two strings is the minimum number of edit operations needed ...
34 views

### Number of ones in the dyadic expansion of m [closed]

I was going through a paper where I stuck on a combinatorial argument as follows I want help with the first assertion i.e proving the inequality $\alpha(m+l)\le\alpha(m)$. As the author suggests it is ...
• 1,660
1 vote
18 views

### Distributions for bit flipping experiment: N bits, probability of flip is p [closed]

N - number of total bits p - probability a bit flips a - number of bits that are currently 0(zero) The experiment is as follows The bits start all zero Each round, each bit flips (or not) according ...
• 119
92 views

### Can every number be written as $2^{a_1}+\cdots+2^{a_n} + 1$?

I am reading an algorithm that calculates $x^y$. Basically it is about an implementation of a function $power(x, y)$ where $x$ is the base and $y$ is the exponent i.e. the power. The algorithm uses ...
• 1,527
1 vote
16 views

• 15
77 views

### When will the algorithm stop. While $a>0$, do if $a<b$ then $(a,b)\rightarrow (2a,b-a)$ else $(a,b)\rightarrow (a-b,2b)$

I came to this question in the Problem Solving Strategies. We start with the state $(a,b)$ where $a,b$ are positive integers. To this initial sate we apply the following algoritm While $a>0$, do if ...
• 31
1 vote
91 views

### How does the $2$'s complement describe a negative number in binary?

According to my knowledge, the 2's complement is used to describe a negative number in binary representation. But I have this confusion. Example: Suppose that we are using 5 bits registers. The ...
40 views

### How to calculate orders of magnitude using a new base?

I am trying to think of a different way to encode time in software (for a fantasy world), and am currently imagining starting from the second and going up in -- I don't know what to call it -- "...
• 3,166
70 views

### Does there exist a relationship between logarithms and the corresponding base number system?

I like to think of logarithms this way: $\log_a(N)=y$ implies that, the a denotes the power at which you're expanding / shrinking, the N represents the size of you after y units of time has passed. ...
• 57
36 views

1 vote