The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
22 views

Why is $ab + bc + c\bar{a} = ab + c\bar{a}$ true in binary?

I was simplifying the equation of a logic gates problem and I realized that ab + bc + cā and ab + cā followed the same truth ...
0
votes
0answers
8 views

Minimum Distance of a Matrix gen

Given the https://kattis.csc.kth.se/problem?id=codes problem, I've get to solve in this way. I multiply the original matrix by each of the $2^k$ combinations possible and save the minimum Hamming ...
1
vote
2answers
52 views

Special binary string

Imagine a binary string of increasing length, up to infinity. What makes it so special? Well, just a simple "rule": for any given length (odd or even), if one folds the string in half, there is at ...
0
votes
0answers
19 views

Transformation of binary data

I have a function that I try to optimize using Particle Swarm Optimization. Objective function gets a binary string. So these binary strings are candidate solutions of the subject function. I can ...
0
votes
0answers
15 views

XS 3 - correction

When adding together two XS-3 (Excess-3) numbers, what are the rules for correction? For example, adding 0011 and 1101 correctly. It's not my homework, but I don't know how to tag it.
0
votes
1answer
31 views

Left shift and right shift calculation ..

i need to calculate left and right shift in java. in java i am able to code this. but i like to know how it calculate . Can any body here enplane me with Example. I am using below logic, plz check ...
1
vote
1answer
16 views

Minimizing deviations from threshold value from a given group of numbers

Given a set of numbers $a_n$, a threshold level $t$, how do I find the combination of numbers that will sum to at least the threshold with minimum deviation? Added: That is, they must always exceed ...
1
vote
2answers
36 views

Decimal Floating Point to Shortest Binary

Might be more of a Comp Sci question so apologies if it's not appropriate. Basically I have a range bounded by two floating-point decimals <1. I need to find a short binary number lying between ...
8
votes
2answers
61 views

Are the high-order bits of $n^2$ as likely to be zeroes as ones?

Let $B_i(n)$ be the $i$th bit in the binary expansion of $n$, so that $n=\sum B_i(n)2^i$. Now let $n$ be randomly and uniformly chosen from some large range, and let $E(j)$ be the expected value of ...
0
votes
0answers
19 views

Predict binary occupancy vector from history of vectors

I have a set of binary vectors where each vector represents one day of occupancy in a house and consists of 48 elements (each element for 30 minutes of the day). Each element can be 1 meaning that ...
1
vote
1answer
28 views

What is the average Levenshtein distance between two random binary strings of length $L$?

For example, for length $L=7$, two random binary strings might be: 0100101 1010011 The Levenshtein distance here would be 5, as it would require 5 bit-flips to ...
0
votes
1answer
56 views

How are binary operations used in the real world?

Not necessarily a mathematical question, but how could binary operations be used in the real world? What applies to it?
1
vote
3answers
54 views

Binary Division

IF I convert the dividend and divisor into decimal, perform the division and convert the remainder and quotient back in to binary will I get correct answer? I'm doing this: $630 ÷ 13$ Quotient=$48= ...
0
votes
1answer
50 views

Semigroups, monoids, & groups!

I need help determining if these are semigroups, monoids, or groups? a) $\mathbb Z ^+$, where $\#$ is defined as ordinary multiplication b) $\mathbb Z ^+$, where $a \# b$ is defined as $\gcd(a,b)$ ...
0
votes
2answers
26 views

Constructing a tree from an algebraic equation

How do I take an algebraic expression and construct a tree out of it? Sample equation: ((2 + x) - (x * 3)) - ((x - 2) * (3 + y)) If somebody can teach me in steps, that would be really helpful!
0
votes
2answers
48 views

Quick logarithm calculation

In coming up with an algorithm for finding log (10) base 2, these are my thoughts. I wanted to know if this makes sense and how could I truly make it more efficient. The requirements are strictly not ...
1
vote
1answer
25 views

XOR for 10 and 20

I know that this is the XOR truth table. A B Q ------ 0 0 0 0 1 1 1 0 1 1 1 0 I have a = 10; and b=20; Their respective binaries are a=1010; and b=10100; a ...
0
votes
0answers
24 views

Convert int Bignum into binary [closed]

I have a number with 100 digits stored in an array/string. I want to convert this number into base2, something like this: ...
1
vote
1answer
65 views

XOR of Binary Numbers to Reach a Given Number

Given a set S = { s1, s2, s3, ... sn} of Binary Numbers , I need to find if a given Binary Number X with only 1 bit position set as 1 (..00001000...), can be ...
1
vote
1answer
80 views

Determine the number of binary relations on $A \times A$ that satisfy the following: [duplicate]

Let $|A| = 8$. Determine the number of binary relations on $A \times A$ that satisfy the following: A) Symmetric B) Neither reflexive or irreflexive C) Reflexive and symmetric D) Irreflexive and ...
3
votes
2answers
41 views

Recognize a valid binary Golay codeword

Are there any properties of a binary [24,12,8] Golay code which would allow me to say, for example, that a given 24-bit word is or is not a Golay codeword for some generator matrix? That is to say, is ...
-1
votes
3answers
58 views

What does this syntax mean X' :=

This PDF shows one how to turn decimal to binary. The math is simple, high school level stuff. But the syntax around it is baffling me. What is this notation for and what branch of math did it come ...
1
vote
2answers
72 views

The Game of Nim alternative solutions

Nim has a mathematical solution which uses binary number system and addition modulo 2.I was wondering if there is an alternative solution to this game or at least another interpretation of the ...
0
votes
2answers
98 views

Subtract Binary Numbers with 1`s Complement

I'm trying to figure out how to subtract two binary numbers with a complementary one or two, When I need to address carrier and when not? Do I need to solve the problem in decimal numbers? And ...
1
vote
0answers
36 views

Fixed decimal point numbers binary representation

I saw this formula that I cannot understand how it applies (the proof). Q: say we have a $N$ bit register (imagine a binary number with $N$ digits) for representing fixed decimal point numbers. In ...
1
vote
1answer
30 views

Combinatorics based binary sequence

We all know the standard base 2 representation of integers and many of you will know of Gray codes. Does anybody know of a name (or something I can use to find a good reference) for a method of ...
3
votes
4answers
69 views

Simple binary subtraction

$$101110 - 110111$$ Did the 2's complment and cannot get to the answer. The answer is apparently $$-1001$$ I did 2's complment on the $$110111$$ and performed addition but did not get to the ...
2
votes
0answers
21 views

Fast fourier transforms of random binary data

I am a physicist who is trying to make sense of FFTs and binary data. Say I have a series of random binary data, which is measured with a repetition rate of 400Hz (interval time of 0.0025s). I have a ...
2
votes
1answer
54 views

Factoring of exponents in Simon's algorithm

In derivations of Simon's algorithm (e.g., p. 4), it's often meant to be apparent that $$(x_0\oplus s)\cdot y=(x_0\cdot y)+(s\cdot y)$$ where $\oplus$ is "direct sum modulo 2", $x_0,s,y$ are all ...
0
votes
2answers
381 views

Binary long division for polynomials in CRC computation

I am trying to learn binary long division, and I am confused. An example in my book gives that $10011010000/1101 = 11111001$ plus a remainder of $101$, which doesn't make sense, since $1001$ is not ...
1
vote
1answer
39 views

Determining the position of a binary value with $k$ one bits and $n-k$ zeros in an enumeration of $C_k^n$ bit strings

I first enumerate a list of all possible binary strings for a length $n$ (e.g., ["00", "01", "10", "11"] for $n=4$). This leads to a list of $2^n$ binary strings. Within that list of $2^n$ elements, ...
0
votes
1answer
31 views

How would I take multiple single bit binary numbers and convert it into a single binary array number?

So lets say I have these: 101010101001 Now lets also say I didn't count them you should count binary, lets say I counted that number at 6 because their are 6 1s and the 0s don't count. Now how would ...
2
votes
2answers
64 views

Expected number of 1s for a random integer

For an integer $K$ randomly chosen from $0,1,...,N$. What is the expected number of ones in $K$'s binary representation? A special case of the problem is when $N=2^k - 1$, in which the expected ...
2
votes
1answer
79 views

Random infinite binary sequence

What I mean by random infinite binary sequence is an infinite sequence of $0$'s and $1$'s with probability of occurrence in this sequence equal to $1/2$ (all digits being equally likely). How is it ...
0
votes
3answers
47 views

Binary Programming with nonlinear constraints

i have the following type of problem i'm interested to solve: Minimize the objective function: $f(x_1,\ldots, x_8) = \sum_{i=1}^8 a_i x_i$ with $a_i \in [0, \infty)$ and $x_i \in \{0,1\}$ and given ...
1
vote
3answers
251 views

Comparing two 2-bit binary numbers

In order to compare two 2-bit numbers, I need to create a truth table, develop the equation for the equal more or less case, optimize the equations the the Karnaugh maps, and then develop the ...
0
votes
0answers
36 views

Binary String as number

For 1 ≤ i ≤ n− m, m < n, Interpreting the strings as binary numbers, we have that A[(i+ 1) ..(i+ m)] = 2 A[i..(i+ m− 1)] − (2^m−1)A[i]+ A[i+ m]. Can someone ...
5
votes
2answers
116 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 ...
2
votes
1answer
84 views

Proof about infinite sum

Define recursively-defined function $f_x:N\to\{{0,1\}}^N$ where x belongs to [0,1): For $n=1$,$f_x(1)=0$ if $x$ belongs to $[0,1/2)$, $a_1=0$, $b_1=1/2$ in this case; $f_x(1)=1$ if $x$ belongs to ...
1
vote
1answer
36 views

Multiples of $5$ in base $2$

As a follow-up question, what can be said about multiples of $5$ in base 2? I think I must look at the last two digits, but I am not sure what the whole idea might be.
1
vote
1answer
56 views

Even numbers in base 2

We all know even numbers are the ones that end in even digits. How do we analyze even numbers in base 2?
0
votes
0answers
19 views

Binary Subtraction for two unsigned integers [duplicate]

For unsigned integers X = 00110101 and Y = 10110101 determine the value for: X-Y = ? I know that this would come out to -10000000...but since X and Y are unsigned integers then it cannot be a ...
-3
votes
2answers
148 views

Binary Subtraction of Two Unsigned Integers

For unsigned integers $ X = 00110101 $ and $ Y = 10110101 $, determine the following values: $ X + Y = (\text{My answer is}) ~ 11101010 $. $ X - Y = ~ ??? $ $ Y - X = ~ ??? $
-3
votes
3answers
152 views

Need help converting a number into IEEE floating point format

I need to convert the number $74 \frac{5}{14}$ into IEEE floating point format. Can someone help me with this
2
votes
2answers
57 views

Twos complement notation question?

I have a quick question how do you do the two complement system, For example say I have in two complement a $6$ which is $0110$ and $3$ which is $0011$ and I want to add $6+(-3)$ I know what five is ...
1
vote
1answer
143 views

How do you work with the IEEE 754 32-bit floating point format?

I'm having trouble completing a question that deals with the IEEE 754 32-bit floating point format, primarily because I don't know how to use it. I was hoping someone here could clarify for me using ...
14
votes
8answers
911 views

Fractions in binary?

How would you write a fraction in binary numbers; for example, $1/4$, which is $.25$? I know how to write binary of whole numbers such as 6, being $110$, but how would one write fractions?
2
votes
0answers
82 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) ...
-1
votes
1answer
148 views

Multiply two large numbers in under 1000 instructions using reduced ISA with only 7 registers [closed]

Is it possible to multiply two large (15 bit) numbers efficiently (in under 1000 instructions) using the following ISA: ...
1
vote
1answer
95 views

Arrangement of binary bits

I have $n$ numbers of bits. $\frac{n}{2}$ of those bits must be $1$ and $\frac{n}{2}$ of those bits must be $0$ (meaning $00001111$ or $10101001$). How many different binary numbers can I make? Is ...

1 2 3