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
56 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
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
31 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
29 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
38 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
22 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
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
65 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
17 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
41 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
671 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
10k 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
89 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
73 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
42 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
18 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,...
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 http://tones.wolfram.com/...
0
votes
0answers
8 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
27 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
54 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 ...
0
votes
4answers
10k views

How many 32 digit binary number combinations are possible?

How many 32 digit binary number combinations are possible? For example: $$00000000-00000000-00000000-00000000$$ $$00000000-00000000-00000000-00000001$$ $$00000000-00000000-00000000-00000010$$ $$.$$ $$...
1
vote
2answers
51 views

Proof by Induction: Number of bit strings of length $n$ starting with a 1 or ending with a 0 [duplicate]

We showed that the number of bitstrings of length $n$ that begin with a 1 or end with a 0 (or both) is $3 \cdot 2^{nāˆ’2}$. Sketch a proof by induction for this. Would we prove this by manipulation? I'...
0
votes
0answers
24 views

nomenclature: binary prefix words and inverses

Are there any (formal or informal) words used describe the number/amount indicated by a binary prefix. For example, 3MV = 3 million volts. 3MiV = 3 [???] volts? Mimmilion? NOTE: Terms like this ...
0
votes
0answers
126 views

Binary counting problems

Recall that counting from 1 to n in binary takes $\Theta$(n) steps; i.e., the increment operation has constant amortized cost as opposed to $\Theta$(logn) in the worst-case. a) Analyze the amortized ...
3
votes
3answers
60 views

Bijection between $[0,1)$ and the space of binary sequences

My question deals with the problem of showing that the set $$ \Omega = \{ \omega \colon \omega =(a_1,a_2, \ldots ), a_i =0,1\} $$ has the same cardinality as the interval $[0,1)$. In a textbook I read ...
0
votes
0answers
27 views

chi square for binary set

This should be fairly simple but I am having a difficulty understanding how the distribution tableworks. I am trying to make a java implementation of the chi-square function for binary data. I want ...
0
votes
1answer
22 views

Radix conversion issue

I have a funny radix conversion problem. I'm programming in a language called Solidity. It's very primitive and doesn't have many of the standard string and math operators that you'd expect in other ...
0
votes
0answers
7 views

Is it possible to write any binary string as the xor of a purposely choose subset of all the strings of the same length?

Given L to be the length of a string of zeros and ones, And defining f(n) as: If n is grater than zero f(n) is a string of length L, on which the first digit is one, followed by n-1 zeros, than a ...
1
vote
1answer
24 views

Binary string function with unique one-counting prefixes

I'm looking for a partial function $f$ from binary strings to natural numbers such that the following holds ($x$ and $y$ always represent binary strings, $\epsilon$ is the empty string, $H(x)$ is the ...
0
votes
0answers
23 views

Conditionals without use of binary variables

I would like a linear programming expression that has to satisfy certain criteria without the use of binary variables. i.e.: Let 0 <= B <= C However, if ...
3
votes
2answers
495 views

Longest sequence of 1s in binary representation of a number & Average Sequence length for number with N digits

I originally posted this to rec.puzzles in October 1992. I subsequently solved the problem (at least I think I did...) and published an article about it in early 1993. The article is nowhere to be ...
-5
votes
1answer
46 views

list of all 256 binary combinations of 8 digits? [closed]

i don't have any coding/java etc software. how can i view all the 256 binary combinatios from 8 digits? can someone tell me where can i find them in a list (any site/online generator etc) or copy them ...
2
votes
3answers
131 views

Odd and even numbers in binary system

Actually here is a basic question, but i have a little problem about it. In binary system, for any number such as 1011001, can we say directly "it is end with 1, so it is an odd number"?, or firstly ...
1
vote
2answers
1k views

Formula for binary sequences of length m with no n consecutive 1s?

Formula for binary sequences of length $m$ with no $n$ consecutive $1$s? I know The number of binary strings of length $m$ without consecutive $1$s is the Fibonacci number $F_{m+2}$. But how about ...
2
votes
2answers
77 views

References to these functions relating to binary trees and binary digit counting?

Consider a perfect binary tree with $2^N-1$ elements. Two different numbering methods pop up constantly. For example, for $N=3$: I have worked out the mapping between these (for $ 1 \le k, i \lt 2^...
0
votes
1answer
33 views

Proving the Binary Relation is an Equivalence Relation

Let $R$ be a binary relation on a set A and suppose R is symmetric and transitive. Prove the following: If for every $x$ in $A$ there is a $y$ in $A$ such that $x R y$, then $R$ is an equivalence ...
0
votes
0answers
16 views

How to find the minimum index value of a binary variable for which the value is one?

Let $Y_{i,j,k}$ be a binary variable, $X_{i,k}$ be a continuous variable and $Z_{j,k}$ is a constant. 1)For every $i,k$ need to find the minimum $j'$ such that $Y_{i,j',k} = 1$. 2)For every $i,j',k$ ...
0
votes
0answers
16 views

Estimating expected value of a missing parameter in data

I'm trying to run an EM algorithm on a Bernoulli dataset with missing values, and am unsure how to tabulate rows with missing data. Would a missing value count towards both the probability of the ...
0
votes
1answer
32 views

Decompose binary into decimal units, tens and hundreds

I have a 9 bit binary sequence (from 0 0000 0000 to 1 1111 1111) and I'd like to decompose into decimal units, tens and hundreds. Consider the following: 0 0111 1011 ==> 123 I'd like to ...
0
votes
0answers
19 views

Multiplication on a 2's complement with decimal point number

I have a fixed point which is limited to: '_ _ _ _ _ _ _ _ _ . _ _ _ _' And the 2's complement number I have is: 110110111.1101, which in decimal is -72.1875. I had a question on what the 2's ...
0
votes
1answer
59 views

Cardinality: Set of all binary sequence equal c

How do I prove the cardinality of the set of all binary sequences equal c? I know I have to find a bijective function from (0,1) to the set of all binary sequences. But I can't think of one. Cantor'...
-2
votes
1answer
32 views

How to subtract fractional numbers using complements.

I know how $10$'s and $9$'s complements are used, but I don't know how to use complements to subtract two fractional numbers. For example $108.32-26.30$ . How will we solve it using $10$'s and $9$'s ...