Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [binary]

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

0
votes
1answer
18 views

Find the binary input function given the outputs (part 2)

Here we have three binary variables $x_1$, $x_2$, $x_3$ $\in \{0,1\}$. I want to find the form of the function $f(x_1, x_2, x_3)$ such that the following are satisfied: if $\ x_1 = 0,\ x_2 = 0,\ ...
0
votes
0answers
28 views

Two's complement addition issue

In a two's complement system, 16-bit binary numbers $0010010010010010$ and $1111110011111100$ can be represented in the decimal system as $9362$ and $-772$, correspondingly. Now, from what I've read ...
0
votes
1answer
24 views

46- and 64-bit integers

Some Cray supercomputers used to support 46-bit and 64-bit integer data types. What are the maximum and minimum values that we could express in a 46-bit integer? in a 64-bit integer? Is my ...
0
votes
0answers
11 views

23-bit mantissa and 9-bit exponent range and precision

I have the following problem which I would like to make sure that I understand correctly. So I would appreciate your help in this matter. Some computers (such as IBM mainframes) used to implement ...
1
vote
0answers
45 views

Above $2^{106\cdot 17}$ in Tupper's “Self-referential” Formula

Tupper's so-called "self-referential" formula is a way to generate any 106x17 image for any $k$ provided that $\frac{k}{17} \in \Bbb Z^*$ (set of nonnegative integers). By taking any binary number, ...
2
votes
2answers
126 views

Sum of set bits in every element for a natural numbers

I was thinking of a mathematical puzzle with binary representation of numbers, but could not find a convincing answer myself. Here is the puzzle: Say for some number N, I want to find the sum of the ...
0
votes
0answers
31 views

Numerical Methods, Binary, and finding two nearby machine numbers

I have the question, Find the binary form of the number x = 2/7 Suppose that the number x = 2/7 is stored in a 32-bit computer. Find the two nearby machine ...
0
votes
2answers
35 views

Finding a binary prefix code provided lengths

Firstly, I am relatively new to this particular forum, and I usually use Stack exchange (maths). I do not know if this is the right place to post so please be aware in case, I should ask this question ...
1
vote
0answers
32 views

Linear combination using extended GCD

Trying out different implementations of the extended GCD, i found out that all of them return the same linear combination factors for $egcd(a,b)$ and $egcd(b,a)$. For example (with this algorithm) I ...
0
votes
2answers
31 views

Find the binary input function given the outputs

Here we have three binary variables $x_1$, $x_2$, $x_3$ $\in \{0,1\}$. I want to find the form of the function $f(x_1, x_2, x_3)$ such that the following are satisfied: if $\ x_1 = 0,\ x_2 = 0,\ ...
0
votes
1answer
8 views

$x = XOR(a_0, a_1, …\space a_n), \exists \space j \in [[0, n]] a_j \space xor (a_j - x) \space xor\space x = 0$, prove me right or wrong

I tell you that given any family of natural number: $$a_0,\space a_1,\space ...\space a_n$$ (of any finite lenght), posing $$x = XOR(a_0,\space a_1,\space ...\space a_n)$$ We have $$\exists\space ...
0
votes
0answers
22 views

Idempotents of binary cyclic codes

Let $e(x)$ be an idempotent in $R_n = \mathbb{F}_{2}[x]/\langle x^n - 1 \rangle$, where $n$ is odd. Let $\alpha$ be a primitive $n^{th}$ root ofunity in some extension of $\mathbb{F}_2$. I'm trying to ...
1
vote
4answers
287 views

Finding numbers by given XOR values.

Given XOR values of 3 indices how can we find the numbers? Like say if I have indices from 1 to 7, how can I find the numbers by given XOR values? I have: $X_{1} \oplus X_{3} \oplus X_{5}=V_1$ $X_{1}...
2
votes
2answers
43 views

Find the additive inverse of binary number

My online assembly class doesn't really show us how to find the additive inverse of finding the additive inverse of binary, and I can't find much online. The question is: find the additive inverse of ...
3
votes
2answers
151 views

Least and most significant bit calculation using bitwise operations

I am working on a project and I need to calculate the least significant bit (LSB) and most significant bit (MSB) of integers. Suppose $x$ is an $n$-bit unsigned integer ($n=16, 32$ or $64$). We know ...
1
vote
5answers
60 views

Multiply $1111_2$ with $1111_2$

I tried to multiply $1111_2$ with $1111_2$ but I came across a problem, namely adding $1+1+1+1$ and $1+1+1+1+1$. Here is my method: I can't figure out how to add the $3rd$ and $4th$ column. I thought ...
0
votes
0answers
17 views

Binary Search Trees

Create a binary search tree for these library titles: A Duck is a Duck Enslaved by Ducks Mini Ducks Songbook Fowl-Weather Friends Big Dig Ducks Regarding Ducks and Universes Domesticated Ducks ...
0
votes
1answer
70 views

Smallest number of turns needed to flip $P$ pencils, $N$ per turn, until they all point opposite their starting direction

Imagine you have P pencils all faced away from you and you can flip them N at a time. Anytime a pencil is flipped its direction changes 180 degrees. Every time you have flipped N pencils that is ...
0
votes
0answers
11 views

Binary Rotation in Hilbert Curve?

Currently, I am following this guide to try and code up a function for the Hilbert Curve, however, I am stuck on the rotation step. I am a computer science student with not much a mathematical ...
6
votes
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\...
0
votes
1answer
39 views

Adding two IEEE754 floating-point representations and interpreting the result.

This isn't for any class or homework. As part of my personal study, I'm trying to better understand the IEEE754 representation of decimal floating-point numbers in binary. I'd like to add two numbers: ...
4
votes
2answers
52 views

Dynamic system $f(x) = 2x$ mod $1$

I am reading the following paper: ergodic theory of chaos and strange attractors, by J.-P. Eckmann (can be easily downloaded) My question is from an example on p....
1
vote
3answers
98 views

Binary variables in time series: integer linear programming

I'm working on a problem and I can't seem to find an easy solution to it. It's about an optimization problem, concerning a time series. I have a binary variable $\alpha_t$ for $t \in [0, 24[$. I ...
1
vote
1answer
39 views

Number of bits in 0

I have found a few sources which have said that the number of bits in a binary number is equal to $floor(log_2(n))+1$. But this doesn't seem to work for binary values less than 1. I would expect ...
-2
votes
1answer
39 views

Are there more decimal or binary numbers in the world? [closed]

The Hindu–Arabic numeral system is a positional decimal numeral system, and is the most common system for the symbolic representation of numbers in the world. Is this statement true? I guess the ...
0
votes
3answers
84 views

Prove that the Hamming distances between three n-tuples cannot be 6,2,7

Let $x,y,z \in \{0,1\}^n$, and let $d_H(x,y)$ be the Hamming distance between codes x and y. Prove $d_H(x,y) = 6$, $d_H(y,z) = 2$, $d_H(x,z) = 7$ cannot happen.
0
votes
0answers
14 views

Crossing over and the sum of binary combinations

During the crossing over genes of the offspring individual are built by re-arranging the gene variants (alleles) of the father and the mother. Let's assume that we look at ...
0
votes
0answers
32 views

What are binary numbers that are equal to their length?

What are binary numbers that are equal to their length? I am trying to find numbers where their value is equal to the length of their binary representation. They cannot start with zero. For example: ...
0
votes
0answers
16 views

How to differentiate negative binary from positive?

I do understand by reversing binary bits and adding 1 to the end would convert positive value to negative, for example: ...
0
votes
1answer
17 views

Generalised Linear Models: Binary data

I am currently working on GLM problem. My response variable is binary as are some of my explanatory variable,others are categorical i.e. 1-1day, 2- 2-3days, 3-5+days and so forth. I have coded it ...
0
votes
0answers
18 views

Sampling binary values from a discrete probability distribution

Suppose that we have a discrete non-uniform probability distribution X over $\{0,1\}^k$ for n binary noise values. Let $e = (e_1 ,..., e_m)$ be a vector of independant identically distributed binary ...
0
votes
1answer
92 views

Binary prime numbers: grammar

I want to write a grammar which produces binary prime numbers. But I can't find any patterns this grammar can be made of. Like this: ...
1
vote
1answer
74 views

Algorithms for elementary operations using other elementary operators

The question asks to provide an algorithm to compute $(i)$ The product of $n$-bit numbers using reciprocation operation and addition operation but not using multiplication and squaring. $(ii)$ The ...
-1
votes
1answer
54 views

What is $\{0,1\}^8$?

Recall the parity-bit error detecting method, which uses the function f : B8 → B9 , where B = {0, 1}, defined by f(b1, b2, . . . , b8) = (b1, b2, . . . , b8, b9) where b9 is the sum of the previous 8 ...
0
votes
1answer
39 views

What did I do wrong in calculating $765_{18} - 210_{3}$?

So I wanted to calculate $$765_{18}- 210_{3}$$ First converting $765_{18}$ into decimal: $765_{18} = 2381_{10}$. Then converting $2381_{10}$ into binary: $2381_{10} = 100101001101_2$ Now ...
1
vote
1answer
40 views

Binary Representation of Pascal's Triangle

When I recently searched Pascal's triangle on Wolfram Mathworld, the following image appeared. Wolfram Mathworld states that this is the binary representation of Pascal's triangle. I am not very ...
0
votes
0answers
29 views

Preserving the bitwise dot product distributive property

We can define the bitwise dot product as the dot product between the vectors of the binary bit representations of two numbers. E.g. $$5\cdot 7 = (1,0,1)\cdot(1,1,1) = 2$$ But curiously, this dot ...
1
vote
1answer
30 views

Find number of BST's possible with 6 nodes numbered 1,2,3,4,5 and 6 having 6 as root and height of 4? [closed]

Find the number of possible BST's with 6 nodes numbered $1,2,3,4,5,6,$ with $6$ as root, and height of four. Can anybody help?
0
votes
1answer
45 views

A binary sequence - from Mathematical Gems II.

Consider the sequence $\{a_n\}$, such that each item of the sequence is either $0$ or $1$. For any positive integer $i$, let $$f(i)=\dfrac{a_1+a_2+\dots+a_i}{i}$$ Suppose that for some positive ...
1
vote
1answer
32 views

Can't figure out this binary addition

I need to add the following numbers. I keep getting a result of 10010.101, but the answer is 10100.101. Can anyone confirm that ...
0
votes
1answer
34 views

Number of bits to write $n!$

How many bits, as a function of $n$, are required to write the number $n!$ in binary? The function of $n$ needs to be in $\Theta(·)$ (Big-Theta) form. I understand that to write a number in binary, ...
0
votes
0answers
13 views

Linearization of two binary variables with multiple indexes

At the moment I'm working on a scheduling problem and I'm trying to linearize the following constraint: $\sum_{k \in K} (s_{j,t} * y_{i,j,k,t} + \sum_{t \in range(t, t+p_j)} \sum_{jj \in J\j} y_{i,jj,...
0
votes
1answer
16 views

fibonacci seq. in an array of size n of 2 states {a,b} where no 2 a's can be congruent

I've recently been given this task: there is an array of $n$ binary states, $\{a,b\}$ (for example $n=5$, $aabba$). For given $n$, compute the amount of possible such arrays where there are no 2 ...
-1
votes
2answers
16 views

antisymmetric proof clarification

i understand antisymmetric proof but i have a problem with an exercise. there 's a relation $xRy <==> x^2 <= y^2$ i have to check if it is antisymmetric or not over $Z$. well of course when ...
0
votes
1answer
39 views

Representation of real numbers

Take a look at section 2.2.2 of this book (from Page-15 to 16). > $$max f (x)= x sin(10πx)+2.0 ... ... ... ... ... (2.8)$$ $$s.t. −1 ≤ x ≤ 2$$ 2.2.2 Representation and Evaluation We ...
1
vote
1answer
15 views

Intuition behind hexadecimal subtraction result

By doing hexadecimal subtraction i got $(BA)_{16}-(AB)_{16}=(F)_{16}$ similarly $(CB)_{16}-(BC)_{16}=(F)_{16}$ $(DC)_{16}-(CD)_{16}=(F)_{16} $ $(ED)_{16}-(DE)_{16}=(F)_{16}$ $(FE)_{16}-(EF)_{...
0
votes
0answers
18 views

Is 3 bits difference enough to map distinct values toggling a single bit in a binary number?

Assume that one can only alter a single bit in a binary number set. As in: 00000000 can be converted to one of the rows in: ...
0
votes
2answers
31 views

how many distinct binary numbers can be formed using exactly x no. of 1's and y no. of 0's

I want to find out how many distinct binary numbers can be formed using exactly x no. of 1's and y no. of 0's.We can use 1's and 0's in any order.
2
votes
0answers
14 views

Using binary system for Henry Classfication System.

In my forensic science class, we learned about the Henry classification system of fingerprints to categorize fingerprints based on the type of print each finger had. The system itself uses the decimal ...
0
votes
0answers
23 views

Floating Point to Decimal Conversion

If a floating-point number is stored in one byte such that the first bit is the sign, the next three bit represent the exponent in excess-4 notation, and the last four bits represent the mantissa, ...