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

learn more… | top users | synonyms

3
votes
0answers
26 views

Why is $\dfrac{b(3x)}{b(x\bigoplus2x)}$ almost normally distributed?

I'm sorry if my question is a bit vague; I don't know a whole lot about distributions. Let $b(x)$ be the number of ones in the binary representation of $x$. I use $\bigoplus$ as bitwise XOR operator. ...
2
votes
1answer
34 views

Proof that a block of digits doesn't repeat twice in a row in an irrational number in binary

So I've been trying to figure out this problem for 3 hours now and don't really know how to start. What I'm trying to do is figure out if there is guaranteed to be, in an irrational number written ...
0
votes
1answer
19 views

How many different ways can you order a binary code (only 1s and 0s) if there is 5 of one and 6 of the other?

If you have 6 0's and 5 1's, like in binary, how many different ways can you order them? Also, there is a popup saying that the question appears subjective. Is it?
1
vote
1answer
52 views

Compare two numbers

This question comes from this answer to my another question. I have the following two statements in binary to compare: $$ |0.11 - 0.1101110111...|\quad\quad|1.00 - 0.1101110111...|$$ I need to ...
0
votes
0answers
21 views

random binary sequence [duplicate]

Suppose we generate a sequence containing only 0's and 1's. We generate this binary string by randomly adding a 0 or 1 one at the time. We stop when the sequence contains k more 1's then 0's or k more ...
0
votes
1answer
43 views

Randomly generated binary string [closed]

Suppose we generate a sequence containing only 0's and 1's. We generate this binary string by randomly adding a 0 or 1 one at the time. We stop when the sequence contains k more 1's then 0's or k more ...
0
votes
1answer
18 views

Unsigned Integer Binary Subtraction

So I am having a bit of an issue. First, what is the difference between doing an unsigned binary integer subtraction and doing a signed integer subtraction? I think that is what is confusing me. For ...
5
votes
1answer
138 views

XOR of Three Integers

How would you prove the following: Given three non-negative integers $a, b, c$; if $a \oplus b \oplus c = 0$ then $(a - k) \oplus (b - k) \oplus (c - k) > 0$ for any $0 < k \leq \min(a, b, c)$ ...
1
vote
2answers
625 views

Prove through structural induction that a binary tree has an odd number of nodes

A full binary tree is a binary tree where every node has either 0 or 2 children. Prove that every non-empty full binary tree has an odd number of nodes. I dont know how to get started with this ...
-1
votes
3answers
56 views

Why 1/1010 is 0.0001100110011001 [closed]

Can someone please demonstrate why 1/1010 in binary is 0.0001100110011001...? I've tried doing the math and I don't get the same result. Thanks in advance!
0
votes
1answer
18 views

Understanding offset-k method of representing negative integers

I'm reading this article about offset-k method of representing negative integers. Can someone please explain the following passage using some examples: One logical way to represent signed integers ...
0
votes
2answers
22 views

Why always round down if next bit is zero

I'm trying to understand rounding of binary numbers using number representation as a sum of fractions. So suppose I have a number in binary: $$ 0.11011 = 0 + 1\times\frac{1}{2} + 1\times\frac{1}{4} + ...
0
votes
1answer
52 views

Rounding - should I compare truncated sum with the number added to make least bigger number

Suppose I have a number in binary: $$ 0.11111 = 0 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \frac{1}{32} $$ I want to round it to 3 significant digits after the radix point. So, I ...
0
votes
1answer
25 views

How to find the least bigger number than the given one

I have the following number in binary: $$ 0.111_2 = 0 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} $$ I need to find the number such that it's bigger than the current and there is no number in between ...
1
vote
2answers
32 views

How do I know that the number is halfway in between

I was shown the following: $$ 0.110 < 0.1101 < 0.111$$ and told that the middle number is halfway in between those two numbers. Is this correct? How can I see that? Update: If I add a zero ...
1
vote
2answers
143 views

Why $82000$? Numbers that can be written from base $2$ to base $5$ using only the digits $0$ and $1$

This is really very curious. Many links on http://oeis.org/A146025 about this but -- why? I mean, this is not some abstract mathematical notation but rather something inherent in, I dunno, the ...
1
vote
2answers
25 views

Propositional formula to represent set of binary strings

I'm "getting acquainted" with mathematical logic and found an exercise online whose solution I don't understand. It asks for the most compact representation of a set of binary strings ...
0
votes
0answers
37 views

How to decrease an exponent

I have this number: $$ 0.2 = 1.1001100110011001100110011001100110011001100110011010 \times 2^{-3}$$ I want to have the exponent to equal -4. Should I just move ...
1
vote
2answers
95 views

Do trailing zeroes after the radix point matter in binary?

In decimal I can discard zeros after the radix point, e.g.: $$ 0.250_{10} = 0.25_{10} $$ It seems to me that I can do the same with binary: $$ 0.10_2 = 0.1_2 $$ Because $$ ...
1
vote
0answers
9 views

Calculating range and eps-machine of floating-point system

Suppose I have a 5-bit floating point system with a 3 bit exponent with radix $\beta = 2$. What is the range and $\epsilon_{machine}$ of this system? I know that I can write numbers as: $$sign ...
0
votes
1answer
27 views

Transivity / Binary relation? [closed]

Discuss the Transitivity of Binary Relations $\mathcal{S} $ $a$ on $\Bbb R $ defined by $a (x, y)$ $\in \Bbb R^2 $--> $x \leq ay$ ( for some a $ \in \Bbb R$ ) I have this assignment about ...
0
votes
1answer
16 views

Probability of encountering a control string in random data

I'm writing a program that diffs two binary files with a common ancestor, where subsequent insertions/deletions/alterations have been made. While writing the program, I got to thinking about this ...
1
vote
1answer
53 views

Converting 0.1 to binary 64 bit double

I want to convert the decimal number 0.1 to binary 64 bit double. So I do it like that: $$ 0.1_{10} = 0.00011001100110011001100110011001100110011001100110011001100110... \times 2^0 $$ Represent it ...
0
votes
1answer
33 views

How to find the difference for an infinite fraction

Suppose I have the number 0.101 in binary. If I want to round it to 2 places after the radix point using the algorithm rounding to the nearest I can easily find the ...
0
votes
1answer
20 views

Rounding to nearest

I have the number 0.101 in binary. I want to round it to 2 places after the radix point using the algorithm ...
3
votes
3answers
28 views

Is there a binary fraction with finite decimal expansion that does not end in $5$?

I'm trying to come up with the finite decimal fraction not ending with $5$ which can be finitely expressed in binary. At the moment, I don't see how's that possible. Since decimal fractions can only ...
2
votes
0answers
35 views

Bit operations to count longest string of 1s in a binary number - connections to FFT?

I found this rather applied question on another forum. How to calculate size of largest string of consecutive 1s in a binary number. However the other forum had neither much of a focus on applied ...
18
votes
4answers
3k views

Why are binary representations of huge numbers about $3.3218$ times as long as their decimal representations?

Why are huge binary nubers about $3.3218$ times longer than their decimal counterpart? I thought about this when I was writing this Python code: ...
0
votes
1answer
21 views

Proof involving two's complement arithmetic of binary numbers

I have a "clock" - a 32-bit unsigned number - that wraps around from $4,294,967,295$ ($2^{32}-1$) back to $0$. At point 'A' in time, I stamp the clock into a variable - call it $x$. Later, at point ...
0
votes
1answer
14 views

What is the distribution of the natural numbers in the list of the sum of their digits taken in binary representation?

I'm wondering what is the distribution of the numbers in the list of the sum of their digits in base $2$. To be clear on what I mean is that if you take the $n$ first natural numbers (without zero), ...
0
votes
1answer
18 views

Why does multiplying by two works when converting fraction to binary

I have the number 0.625. If I need to convert it into binary form, I can multiply by two: 0.625 * 2 = 1.25 / 1 0.25 * 2 = 0.5 / 0 0.5 * 2 = 1.0 / 1 So the result ...
0
votes
1answer
20 views

Binary addition and subtraction

Assuming the sign-magnitude representation of binary numbers, what is the result of the -6+29?! ...
2
votes
2answers
63 views

What is the probability distribution of X, if X is the number of times the letter 'e' appears from the set {beware, the, jabberwock, my, son}

A string of letter is chose uniformly at random from the set {beware, the, jabberwock, my, son} Let X be the number of times the letter 'e' appears in the string. Give the probability distribution ...
1
vote
1answer
15 views

Binary multiplication how to carry a 001 in case of adding 4 times 1?

I am doing binary arithmetic for the first time and I want to know how to carry over 1+1+1+1 in binary multiplication $$\begin{align} &1101000\\ &0101100\\ &1011000\\ &0001000\\ ...
0
votes
0answers
33 views

How do I round this binary number to the nearest even

I have this binary representation of 0.1: 0.00011001100110011001100110011001100110011001100110011001100110 I need to round it ...
2
votes
2answers
653 views

Finding the number of distinct sub-strings in a binary string.

Whilst solving a question, I have come across a problem regarding the maximal number of possible distinct $k$-length binary sub-strings in an $n$-length binary string. My thought process was that if ...
0
votes
1answer
25 views

$p$ and $q$ 512-bit primes. What size in bits is $N=pq$?

$p$ and $q$ 512-bit primes. What size in bits is $N=pq$? I have that $p$ and $q$ are between $2^{512}-1$ and $2^{511}$, but cannot work out the rest. Thanks in advance.
3
votes
5answers
9k views

Convert from base $10$ to base $5$

I am having a problem converting $727$(base $10$) to base $5$. What is the algorithm to do it? I am getting the same number when doing so: $7\times 10^2 + 2\times10^1+7\times10^0 = 727$, nothing ...
0
votes
1answer
19 views

Why should we subtract 1 to get maximum number in bits

I'm reading this article and it says that: This means that an unsigned INT can go up to $4,294,967,296$ (which is $2^{32}$ $– 1$). You need to subtract one because the result of $2^32$ starts ...
-1
votes
2answers
79 views

Why is `23` equals to `10111` in binary

I've tried to convert 23 to binary and came up with the number 100111 by using the calculation inspired by this answer: 1) Find out the least significant bit: $$ ...
6
votes
2answers
68 views

Why do division algebras always have a number of dimensions which is a power of $2$?

Why do number systems always have a number of dimensions which is a power of $2$? Real numbers: $2^0 = 1$ dimension. Complex numbers: $2^1 = 2$ dimensions. Quaternions: $2^2 = 4$ dimensions. ...
0
votes
2answers
41 views

Bit increase when averaging?

I have a given number $N$ of binary numbers, that are stored using a given number $B$ of bits. $B$ is the same for all the numbers. For example, thease values where $N = 4, B = 4$. ...
0
votes
1answer
17 views

Calculating the amount of times a binary search could run (worse case) without a calculator/calculating base 2 logs without a calculator.

Ok so I had a question on a test that I had to do without a calculator. And I can not figure out how in the world I am supposed to do it without a calculator. The question asked to find how many ...
1
vote
0answers
27 views

How draw a sample of distant points from a set of binary numbers

I am working on a computer program where I need to sample a set of say $k$ elements from a set of binary numbers ranging from $0$ to $2^n-1$, for some integer $n$. For various reasons, I want the ...
2
votes
1answer
34 views

Solving $n$-binary-variable system of equations using only combinations of $n \over 2$ variables when $n \over 2$ is even

It seems that it's impossible to find the unique solution to an $n$-binary-variable system of XOR equations if you only use all $(n \text{ choose } {n \over 2})$ equations combining half the ...
0
votes
0answers
16 views

Is there any systematic study of (finite) boolean functions?

I'm very interested in boolean functions. However i don't know where to look to investigate them (ideally for free ... ) I'm aware of wolfram 3 bits in / 1 bit out functions ...
0
votes
0answers
7 views

What is the best function to increment a cycling counter over a finite (binary) integer representation?

What is the best function to increment a cycling counter over a finite (binary) integer representation? Edit 1 : i found this https://en.wikipedia.org/wiki/Ring_counter#Johnson_counter Edit 2 : ...
0
votes
0answers
25 views

Alternate form of $(A \oplus B)^c$?

What alternate forms are there of this equation? $$(A \oplus B)^c$$ $A$ and $B$ are binary vectors / integers, $\oplus$ is the bitwise XOR operator, $c$ is a constant. For example: $$(5 \oplus 7)^2 ...
0
votes
1answer
39 views

What is the definition of binary sequence?

Can I write an infinite binary sequence like so: ...0111001001, ...10010 because I saw some people write infinite binary set from left to right like so: 1011000... , 101111... But I was not sure if ...
0
votes
0answers
13 views

pattern-sensible entropy measure

I have some binary images (meaning each pixel can be 0 or 1), I want to find a pattern-sensible entropy measure, which means for example that a chessboard should have a very low entropy value (almost ...