# Questions tagged [binary]

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

1,363 questions
Filter by
Sorted by
Tagged with
11k views

### What are the names of numbers in the binary system?

The names we use are very much related to the radix we use $0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9$ zero - one - two - three - four - five - six - seven - eight -nine We repeat the names $21$ twenty ...
6k 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 ...
3k views

### What is the probability that eventually it will rain forever?

Probability of raining today is 60%. If it rains today, the probability of raining tomorrow will increase by 10%. If it doesn't rain today, the probability raining tomorrow will decrease by 10%. Rule ...
10k views

181 views

### Do primes, expressed in binary, have more “random” bits on average than natural numbers?

In my programming projects I sometimes pick large primes when I want somewhat "random" bits, e.g. for hashing or trivial obfuscation via XOR or modular mutiplication. My intuitive sense is that primes ...
4k views

### Finding the binary representation of the $n$th Fibonacci term

Objective: To find the binary representation ( or no. of 1's in binary representation) of nth term in Fibonacci sequence where n is of the order 10^6. My current approach: Find nth term (in decimal) ...
359 views

### New numeration system, mapping to binary numeration system

Let us consider $$Z = X_1 + X_1 X_2 + X_1 X_2 X_3 + \cdots.$$ Here the $X_i$'s can only take on two different values: either $X_i=a$ or $X_i=b$, with $0 < a < b < 1$ and $a+b = 1$. The $n$-...
127 views

### Fraction of $1$s in binary representation of $n!$

I plotted a fraction of $1$s in binary representation of $n!$ (i.e. A079584/A072831) for $n$ from $1$ to $10^4$: It appears it might converge to some limit for $n\to\infty$. Can we (dis-)prove that ...
309 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. ...
2k views

$f(n,m)$ is the number of binary strings with up to $n$ ones and up to $m$ zeros. Prove that the number of possible strings is: $${n+m+2 \choose n+1} -1$$ I got to the point that: $$\sum_{a=0}^n \... 1answer 20k views ### How many bits needed to store a number How many bits needed to store a number 55^{2002} ? My answer is 2002\;\log_2(55); is it correct? 2answers 2k views ### Nim addition- binary addition without carrying A nim addition table is essentially created by putting, in any cell, the smallest number not to the left of the cell and not above that cell in its column. However, I know for a fact that nim addition ... 1answer 141 views ### Is the link between Stern's diatomic sequence and binary subsequences genuine or a coincidence with exceptions? In a sister stack, Martin Ender raised a question about the following function: Let's define a function f(N) on the integers via the following algorithm. We'll use N = 38 as an example: ... 2answers 2k views ### Random binary matrix with given rows and columns sums I need to generate a random binary matrix (n, n) whose rows sums and columns sums are 4. I don't manage to find a quite efficient algorithm to do this. Have you an idea please ? NB : The ... 1answer 147 views ### Binary weight of OEIS sequence A308092. Preliminaries OEIS sequence A308092 is defined as: The sum of the first n terms of the sequence is the concatenation of the first n bits of the sequence read as binary, with a(1) = 1. And ... 1answer 302 views ### Matrix + combinatorial or conditional probability: bit patterns I'm trying to get my head around a problem, and it's not working. The problem: consider an NxN matrix that represents a binary number. For instance, a 4x4 matrix is a 16 bit number, a 6x6 matrix is ... 5answers 1k views ### How many 1s are in the first 1023 binary numbers? How many 1s are in the first 1023 binary numbers? I'm not to sure how to approach this question. An idea, formula, or solution is appreciated! 6answers 1k views ### Is there an easy way to see that binary expansion is unique? [duplicate] Let n \in \mathbb{N}. Using the Euclidean algorithm, it is straightforward to see that every natural number can be written as$$n = \sum_{j=0}^m \epsilon_j(n) 2^j  where $\epsilon_j(n) \in \{0,1\... 8answers 10k 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 ... 3answers 1k views ### What is the next number having the same number of bit 1s? [duplicate] You are given a number,$A$, and you have to determine a number,$B$, such that$B>A$and the number of$1's$in the binary representation of$A =$number of$1's$in the binary representation of$...
So I've got a problem that says "How many ways are there go give $k$-identical biscuits to $n$-different children if each child gets at least one biscuit?" I figured I'd do it using binary sequence. ...