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

learn more… | top users | synonyms

3
votes
1answer
399 views

Number of 'unique' one bit binary functions with N-bit inputs

Consider the set of binary functions that takes an N-bit input -> 1 bit output. There are 2^(2^N) elements in this set. Now potentially reduce this set by restricting to only considering functions ...
0
votes
2answers
38 views

How to convert binary fraction to decimal

I have the following binary fraction: $$ 0.010011001100110011001100110011001100110011001100110100 $$ I want to know what number this represents in decimal. I could go like this: $$ \frac{1}{2}\cdot0 + ...
2
votes
0answers
20 views

Binary representation with more coefficients

Given a positive integer $n$, how many ways are there to write it as $a_0+2a_1+4a_2+\dots+2^na_n$ such that $a_i\in\{0,1,2,3\}$ for all $i$? If the coefficients were allowed to be in just $\{0,1\}$, ...
0
votes
1answer
35 views

Algorithm to convert binary fraction to decimal fraction

There's an algorithm to convert binary integer into decimal integer that is based on the expanded form of a number: $$ 12 = 2\cdot(2\cdot(2\cdot(2\cdot 0 + 1)+1)+0)+0 $$ \begin{aligned} & 2\cdot0+...
1
vote
2answers
48 views

The use of binary numeral system for theoretical results

I wonder how mathematics would be changed if we were been using binary system in calculations instead of decimal .. Could theory of mathematics would change a little ? Are there known ...
2
votes
1answer
57 views

Condition for a binary matrix to contain a permutation matrix

I would like to know if there is any condition to check whether a binary matrix contains a permutation matrix of the same size. E.g. $$A_1=\pmatrix{1&1&1&1\\ 1&0&0&1\\ 1&0&...
1
vote
2answers
15 views

truncation in two's complment

My textbook gives an example of truncating a signed number in two's complement from 4 bits to 3 bits. It truncates -4 to 4. I am little confused by this, because the binary representation of -4 is ...
-1
votes
1answer
2k views

Inverse of binary matrix

I have tried creating an inverse of a binary matrix using the identity matrix method. Have an identity matrix alongside the square matrix and perform all the operations to convert the square matrix to ...
2
votes
2answers
43 views

Converting from base $x$ to base $y$

I'm trying to convert from base $x$ to base $y$, but am having trouble understanding why the following method only works when converting to base $10$. Take for instance the number $2132$ (base $4$). ...
0
votes
0answers
19 views

How generic is the “Unix file permission” algorithm?

In data analysis tasks, binary variables are usually encoded as $1$s and $0$s. In data sets with multiple binary variables, it is often necessary to create "interactions" of binary variables that can ...
2
votes
1answer
38 views

How to convert numbers with related bases quickly?

Let: $a = (1011011)_2 = (1123)_4$ There two ways to solve it: Convert the number in base 2 to base 10 then to base $4$. Consider $4 = 2^2$ and group each of two numbers in base $2$ to one in base ...
0
votes
0answers
34 views

mutual information and combinatorics

\begin{align} &\mathrm{H}\left(\frac{1}{2^{k}}\right) \\[3mm]&\ \!\!\!\!\!\!\!\!\!\! - {1 \over 2^{k}}\left\{% {k \choose 0}\mathrm{H}\left(\left[1 - \epsilon\right]^{\,k}\right) + {k \choose ...
0
votes
1answer
421 views

Data Representation Question

A computer stores a number of $16$ bits word using floating-point arrangement. Given that the first bit is reserved for the sign and followed by $6$ bits for the exponent using biased form. The ...
3
votes
1answer
117 views

Is there any kind of known pattern to $\sqrt 2$ in base 2?

Is there any kind of known pattern to $\sqrt 2$ in base 2? Is there any classification categories for decimal digits of numbers that for example would put $\sqrt 2, \sqrt 3 \cdots \sqrt n$ into ...
2
votes
1answer
20 views

Partitioning binary strings by total parity

If I have a binary string $\underline{a} = (a_1 \, a_2 \,\ldots\, a_N)$ where $a_i \in 0,1$ and I partition the set of all such strings $A$ by the total parity of the string, $A = \Pi_0 + \Pi_1$ where ...
0
votes
1answer
14 views

What is the purpose of Excess-K representation?

What is the purpose of excess-k when representing binary floating point binary numbers. I came across this in my computer systems course and I can't figure out the advantage of offsetting the numbers ...
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
33 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: ...
4
votes
2answers
82 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 $...
2
votes
5answers
153 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
83 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
33 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
49 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 ...
1
vote
2answers
66 views

How many numbers with given amount of ones in their binary form?

I was practicing for a programming competition and I got the following problem, which I was unable to solve: It is given a number $N$. Find the amount of $x, y$ values, where $x > N$, $y < N$ ...
0
votes
2answers
38 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 ...
4
votes
2answers
68 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 ...
35
votes
10answers
4k views

In plain English, why does conversion from hexadecimal to binary work so cleanly?

Why does the trick of taking the binary representation of each digit and simply concatenating them work? e.g. 0x4E == 0100 ...
3
votes
0answers
38 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. ...
0
votes
1answer
23 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
54 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 ...
5
votes
1answer
141 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
930 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
57 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
19 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
25 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
53 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
26 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
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 ...
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
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
105 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\...
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
30 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 ...