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

learn more… | top users | synonyms

1
vote
1answer
28 views

Proving that $A+B - (A \cap B) = A \cup B$ for binary integers

I hope computing questions are fine here. I'm trying to show that for all binary numbers $A$ and $B$, $A+B - (A \cap B) = A \cup B$. It's confusing me firstly because I'm not sure what the "set ...
1
vote
1answer
32 views

Combined probability of hit in look up tables with some common index bits

Consider two tables A and B consisting of $l_a$ and $l_b$ counters respectively - $l_a$ and $l_b$ are powers of two and the counters are initialized to zero. Each table has its own index ...
-1
votes
1answer
31 views

XOR equation with multiplication arrangment

How can I move all the X to one side so the equation will become x=y XOR <somthing>... $$\begin{align} &2x \oplus y = x \end{align}$$ ...
0
votes
0answers
29 views

Negative representation of a binary number

I saw online that if you want to convert a binary number to a negative binary number, you add 1.However, I don't understand why you do that.In a forum I saw someone explaining the following: ...
0
votes
0answers
18 views

Binary choice models

a) Suppose you have a sample of $600$ females and we are interested in their labor force participation decisions. What kind of econometric model would you use if you wanted to empirically estimate ...
4
votes
2answers
76 views

The sequence $(a_n)$ is given as $a_1=1, a_{2n} = a_n - 1, a_{2n+1} = a_n + 1$. $a_{2015}=$?

The sequence $(a_n)$ is given as $a_1=1, a_{2n} = a_n - 1, a_{2n+1} = a_n + 1$. What's the value of $a_{2015}$ Correct answer should be $a_{2015} = 9$. How? thing that came to mind was to see what $...
3
votes
5answers
147 views

$f(x) = 0$ when $x$ is $0$, and $1$ otherwise

I've been trying to create a function that will return $0$ when $x$ is $0$, and for any other $x$ value it should return $1$. I've searched for a pre-existing function online too and wasn't able to ...
0
votes
1answer
32 views

Why This alternative way for retrieving the Original number from 2'S complement number works?

I was reading a book to learn about conversion from 2'S complement number to origianl binary number. During my past college study, I learened the following method for retrieving the Original number ...
2
votes
2answers
80 views

Proving that the powerset of $\Bbb N$ is uncountable

The question I'm facing off with: (a) Consider the set $A$ defined as the set of all subsets of $\Bbb N$: $A = ${$B : B \subset \Bbb N$}. Show that $A$ is in one-to-one correspondence with the set of ...
0
votes
1answer
32 views

Does the following function define a distance metric?

For real numeric vectors of length $N$, let $a_n \succ b_n$ be one if true and zero if false. The distance between $A$ and $B$ is $$\sum_1^N a_n \succ b_n$$ Note that this is very similar to the ...
1
vote
2answers
47 views

Proof of Cyclic Redundancy Check validity

I'm looking to understand the use of a Cyclic Redundancy Check, in combination with the mathematics behind it. So far I have 1) For any message $$M(x)\cdot x^n = Q(x)G(x) + R(x)$$ Where $Q(x)$ is ...
0
votes
2answers
37 views

Is it an overflow or not?

The addition of 4 bit, 2's complement binary numbers 1101 and 0100 is $$\begin{array} \\\hphantom{+}1101\\ + 0100\\ \hline \\ 1 \ 0001 \end{array}$$ there occurs a carry out above, but this will ...
3
votes
0answers
37 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. ...
4
votes
2answers
66 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
22 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
53 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
23 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
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 ...
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 ...
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
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 \...
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 {000000),(...
0
votes
1answer
29 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
17 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
54 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 ...
1
vote
2answers
98 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\times\frac{1}{2}+0\times\...
0
votes
1answer
34 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
25 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
37 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 ...
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
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 'B'...
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
64 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
16 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\\ \end{...
0
votes
0answers
37 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 ...
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.
1
vote
2answers
146 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 ...
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
81 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: $$ ...
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
35 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 variables,...
-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!