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

learn more… | top users | synonyms

-2
votes
1answer
18 views

How many binary strings are there of length n with k ones? [on hold]

For some fixed $n$, how many binary strings are there with $k$ $1$s and $n-k$ $0$s (where $n>k$)?
1
vote
2answers
17 views

Guessing Birthday Binary-Implementation Set Size

Guessing a persons birthday day-of-month, i.e. a number ranging from 1 to 31 by dividing the numbers 1 to 31 up in 5 sets. A binary number for decimal integers between 1 and 31 has at most five ...
0
votes
0answers
12 views

Absolute and relative error of a binary number?

Given is the following system $A:={ \pm 1.a_1 a_2 a_3 a_4 \cdot 2^e}$, $a_{i}\in \left \{ 0,1 \right \}$, $i\in \left \{ 1,2,3,4 \right \}$, $e\in \left \{ -8,\ldots,8 \right \}$. Find the absolute ...
2
votes
1answer
58 views

Count 1-bit in binary integers

Given an integer range [A,B], (1) What’s the probability to get a 1-bit if we first randomly choose a number x in the range and then randomly choose a bit from x? (2) What’s the expected number of ...
2
votes
2answers
35 views

binary and floating point representation

suppose that we have following binary digits $00011001.110 $,we can do following thing $00011001.110=1\cdot2^4+1\cdot2^3+1\cdot2^0+1\cdot2^{-1}+1\cdot2^{-2}=25.75$ then what does means? We then ...
0
votes
0answers
16 views

Binary: Two Compliment with decimal point

Good Day sir/mam, Im trying to figure out how to do the two's compliment binary to decimal with decimal points or fraction. I have this problem of 138.375 - 225.75 = -87.375 and If I'm right: ...
1
vote
2answers
71 views

Half-Adder Exercise

My exercise is the following: Make a circuit which outputs X^3 of two bit input of X. Use the lowest number of HALF ADDERS as you can. I don't really understand ...
1
vote
2answers
26 views

Polynomial representation of binary

It is well known that we can represent binary using polynomial. For example, $11$ can be represented as $x+1$. So when we compute $11\times11$, we should obtain $1001$, which is equal to $9$ in ...
0
votes
0answers
26 views

Perform this arthimetric operation on 8bits 2's complement numbers..

So the question is: Perform the given arithmetic operation on the following pairs of 8-bit 2’s complement numbers. In each case, indicate whether or not overflow occurs. the numbers: 11010100 + ...
1
vote
1answer
40 views

Formula providing binary numbers based on digit 1 occurences

I would like to find a formula which gives me all binary numbers which contain the digit "1" a certain number of times. For example to times as in this sequence: ...
0
votes
2answers
109 views

Combinatorics: Binary Strings

Are the these 2 binary generation expressions equal? If so, how do I simplify my answer to match the solution's? Question: The set of binary strings where the length of each block of 0s is divisible ...
1
vote
1answer
34 views

Binary string block recurrence

Let $a_n$ be the total number of blocks for all $2^n$ binary strings with length $n$. Prove the following recurrence: \begin{equation*} a_n = 2a_{n-1} + \frac{2^{n}}{2} \end{equation*} For example ...
4
votes
1answer
332 views

Finding a rational number which is simply normal to relatively prime bases

Let $n\ge 2\in\mathbb Z$. Suppose that a base-$n$-decimal $(0.a_1a_2a_3\cdots)_n$ represents $\sum_{k=1}^{\infty}\frac{a_k}{n^k}$ where $a_{i}\in\{0,1,\cdots,n-1\}\ (i=1,2,\cdots)$ is each digit ...
2
votes
1answer
19 views

How to represent a job-sequencing?, with binary code

Suposse a job sequence of 6 jobs, as 3-5-4-2-6-1, that point the job 3 is attended in 1st place, and then the job 5,.... How could I represent this sequencies with binary code to use in metaheuristic ...
0
votes
3answers
50 views

How do I add multiple binary numbers without using a partial sum?

I know how to add binary numbers but what I normally do is add the first 2 binary numbers and then add the 3rd one to their sum. It is really slow. $$ 111_2 + 111_2 + 111_2 + 111_2 $$ Here is ...
0
votes
0answers
22 views

Efficient way to compute the binomial using $(2^k+1)^{k+1}$

The following web page: "http://introcs.cs.princeton.edu/java/78crypto/" (at Exercise 28) effectively says that: "Pascal's triangle. One way to compute the $n$-th row of Pascal's triangle (for $n ...
1
vote
0answers
34 views

Is there a way to get the n-th of bits of 2^k

I have a large number N=O(2^k). For simplicity, let's say that N=n^k. However, I only need the n-th bits of N, say for example the 10-th to 16-th bit of N... without calculating the full expansion... ...
0
votes
0answers
30 views

Binary division algorithm

...
0
votes
1answer
27 views

Relations between NIM-addition and addition

I will note $\oplus$ the NIM-addition. This is a commutative group law. To obtain $a \oplus b$, you decompose a and b in binary, and you sum like this : 0+0=0 ; 1+0=1 ; 1+1 =0 (it's the xor ...
3
votes
2answers
53 views

Algorithm for creating binary rational numbers

I read here an algorithm to convert a decimal rational number to binary by multiplications by 2, but although it's very simple to carry on, I still haven't managed to explain myself why it works. ...
0
votes
1answer
24 views

Binary expansion

I am trying to get my head around the left and right shift for binary expansion. The rules are: Shifting to the right ...
1
vote
1answer
29 views

Coloring a binary tree

Working through a problems practice coloring, I have found a problem that has me stumped. The problem states: For $n \in \mathbb{R}_{>o}$ the binary tree is defined recursively as follows. The ...
0
votes
1answer
16 views

Negative Binary Convertion

How do I go about converting -2 decimal to two's compliment in 7 bits? I know in 8 bit representation -2 is 11111110 but for 7 bit I am confused?
0
votes
1answer
41 views

Prove a identity with Fibonacci sequence and binary sequence.

Let us: $\{f_k\}$ Fibonacci sequence; $\{u_k\}$ binary sequence i.e. $u_k=$ 0 or 1; $\rho$ real positive number. Is there a binary sequence $v_k$ such that: $$\sum_{k=2}^{n+1}\frac{u_{k-1} ...
0
votes
1answer
20 views

property holds for all bases except 2

For any base $n$, for $n > 2$ the following holds: $1/(n-1) = 0.111...$ However in base 2 this doesn't hold. It's just 1. It's obvious why that is you have $1/1$, but I always get uneasy with ...
1
vote
3answers
80 views

Product of “reversed” numbers

Consider any 2 binary numbers, e.g.: 10101011 ; 11111101 and their product, say P. "Reverse" (mirror image) all the digits of the 2 numbers, e.g.: ...
0
votes
1answer
16 views

squaring binary doubles the nr of bits?

If a is a 10 bit number, then is $$|a^2|=20? $$ And then $$|a^3|=30? $$Or is that at least an upper bound? Does it work this way? I want to explain how with very high probability 4096 bit number is ...
0
votes
1answer
18 views

Decimal to binary with limited fractional and exponent bits

I am trying to show the binary representation of a couple numbers using scientific notation. Using 8 bits for the fractional part, and 4 bits for the exponent. The exponent is stored using 2's ...
0
votes
1answer
34 views

Simple binary subtraction with decimals

so let's say I am trying to subtract 75.442 by 43.646. I have 43.646 = 00101011.1010, and 75.442 = 01001011.0111 from 2's ...
1
vote
1answer
54 views

Why exactly are NAND and NOR the only universal binary logic functions?

We know there are 16 possible binary logic functions: ...
0
votes
1answer
11 views

Binary variable syntax?

Is there a more compact styntax to represent binary variables, such as: $3a+2b+c=5$ where $a,b,c$ are either "0" or "1" ? I've tried setting domains, ($a\le1$ and $a\ge 0$, etc) but that only works ...
1
vote
0answers
23 views

Why is this number the smallest positive normalised binary value?

In the AQA A2 Computing textbook (Bond and Langfield, 2009), they say that this number is the smallest positive normalised value, given a 10 bit mantissa and a 6 bit exponent: ...
0
votes
2answers
31 views

DFA Construction with three strings in language

Draw DFA that recognizes the following language, with the alphabet {0, 1} {0011, 11, 0101} I'm having a lot of trouble with this, because I know DFA have to have a determined path from each state ...
0
votes
1answer
58 views

binary representation of a fraction in two's complement

Could any one please explain what is a 16-bit two's-complement representation of -0.375 and the steps to calculate it? Also, what happens if I convert it back to decimal? Thanks
2
votes
0answers
45 views

Upper limit for adding N numbers in grid of N processors in parallel

We must show how N binary numbers, each consisting of N bits each, can be added in a linear grid of N+logN processors. Suppose that the binary digits can be inserted directly in each processor of the ...
2
votes
4answers
717 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*10^2 + 2*10^1+7*10^0 = 727$, nothing changes. Help me figure it ...
1
vote
3answers
61 views

Base 16 to base 10 number conversion

I know that if we want to convert from base 16 to base 10 we do as follows (for example): Given : $15C$ in base $16$ Conversion to base 10: $12 \times 16^0 + 5 \times 16^1 + 1 \times 16^2 = 348$ in ...
0
votes
2answers
23 views

Equal number of 1s and 0s in number of n digits

How many ways could one create a binary number of n digits where the number of 1s and 0s are equal? For example, if n was 8 then we could have: 10101010 or 11110000 In addition to this, I may ...
0
votes
0answers
11 views

how to write a lattice $[\alpha,\beta ]$ in the form [$a,b+c\omega _7$]

$\fbox{1}$ if we write [$2-\sqrt{7},5+3\sqrt{7}$] in the form [ $a,b+c\omega _7$],what is the value of $a,b,c$ $\omega=\sqrt{7}$,since $ 7\equiv 3\mod 4$ $N(2-\sqrt{7})=4-7=-3$ $N( ...
3
votes
2answers
51 views

Is there a name for the set of bit combinations of bitstrings?

Let $A \subset \{0,1\}^n$ be a set of $n$-bit bit vectors. Let me call a bit vector $b = (b^{(1)}, b^{(2)}, \dotsc, b^{(n)}) \in \{0,1\}^n$ a "bit combination" of the vectors in $A$ if: $$\forall i ...
1
vote
1answer
30 views

Number of Positive Definite Binary Matrices

How may positive definite matrices (over finite field- $F_p$) are possible? What is the criterion in getting those?
2
votes
2answers
65 views

What is the relation between this binary number with no two 1 side by side and fibonacci sequence?

I saw this pattern of binary numbers with constraints first number should be 1 , and two 1's cannot be side by side. Now as an example ...
0
votes
2answers
52 views

Probability of sum over a window of binary vector

I have a vector of one's and zero's of length n with a probability p of observing a one and 1-p of observing a zero. I slide a (overlapping) window of size $k$ across this vector and take the sum ...
-1
votes
1answer
52 views

Does Benford's Law Apply in Base 2 [closed]

Does Benford's Law apply in base 2? Wiki states: For b = 2 (the binary number system), Benford's Law is true but trivial. Meaning? Secondly, can it be found that there are generally more Zeros or ...
0
votes
1answer
35 views

My Proof for the Cardinality of a Particular Binary Distribution

my question reads as follows: I have constructed a proof and am concerned about 2 things: 1) The validity of my proof. 2) The construction of my proof. I am asking for someone to read through ...
0
votes
0answers
25 views

Distance measures for binary data

I was wondering what are some good distance measures for binary data that have the following properties. I know that there are measures like the Jaccard index and the Dice Index, but they don't ...
1
vote
1answer
56 views

How many ways are there to arrange 1's and 0's with no two 1's in a row? [duplicate]

Given n spaces, how many ways are there to fill up the spaces with 1's and 0's such that no two 1's are together. For example, let's say n = 3 (_ _ _). There are 5 ways to fill up the spaces such ...
1
vote
1answer
31 views

Decimal to Binary

I am struggling to understand Decimal to Binary using the following method, given on the second last page of http://www.ling.ohio-state.edu/~scott/teaching/2008/spring/384/handouts/decimal-binary.pdf. ...
0
votes
1answer
23 views

Show that the following holds;

Let $h(p) = -p \log p-(1-p)\log (1-p)$ denote the binary entropy of a Bernoulli distribution when the probability of observing a zero is $p$, where $\log$ denotes the logarithm to base 2. Show, using ...
-2
votes
1answer
244 views

Alien Abduction Brain Teaser [duplicate]

Okay Here is the brain teaser. 10 people have been abducted by aliens because they view them as being representative of the human race. They are going to test them to see if the human race is worthy ...