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

learn more… | top users | synonyms

0
votes
2answers
269 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
128 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 ...
1
vote
1answer
355 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 ...
3
votes
2answers
77 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
vote
2answers
252 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
7k 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
90 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
103 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
369 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 ...
3
votes
1answer
159 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
68 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
3answers
4k 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
158 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
80 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
80 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
107 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
365 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 ...
0
votes
3answers
2k 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
49 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
259 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
121 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
41 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
88 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?
-4
votes
2answers
3k 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
900 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
95 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 ...
2
votes
1answer
886 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
2k 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
1answer
372 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
354 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
298 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 ...
4
votes
2answers
8k views

How can I convert 2's complement to decimal?

Suppose I have the 2's complement, negative number 1111 1111 1011 0101 (0xFFBB5). How can I represent this as a decimal number in base 10?
0
votes
1answer
373 views

The input represent a 4-bit unsigned binary number, the output W, is 1 if the number is multiple of 2 or 3 but not both.

I completely understand how to make a truth table and the entire concept of boolean algebra. However, I am confused how to make the truth table for the above information. Because the input is a 4-bit ...
1
vote
2answers
2k views

Represent the following decimal values in 8-bit 2's complement and hexadecimal

-27: 11100101 -128: 10000000 I'm having trouble coming up with the hexadecimal representation. Does it change if my numbers are represented in 2's complement as opposed to just regular binary? ...
1
vote
1answer
138 views

Problem about BCH code

I have another homework to do, please give me some hints in order to solve this problem: "Determine whether the dual of an arbitrary BCH code is a BCH code."
1
vote
1answer
193 views

Problem about narrow sense BCH-Code

I have an homework to do and i have no idea where to start. The question is: "Show that a narrow-sense binary BCH-code of length $ n=2^m-1 $ and designed distance $ 2t+1 $ has minimum distance $ 2t+1 ...
2
votes
2answers
240 views

multiple xor (sum of parities)

If we have: $b_1 \oplus b_2 = b_1 (1 - b_2) + b_2 (1 - b_1)$ what is (or are, if there are different versions) the compact general formula for a multiple "summation": $b_1 \oplus b_2 \oplus \dotsb ...
1
vote
3answers
1k views

Way of simplifying binary multiplication

Is there a way to simplify multiplication of binary numbers regardless of digits? Or do we always have to resort to 10-base multiplication? As computers do multiplication, there should be ways to ...
2
votes
1answer
81 views

Is there a sequence of primes whose decimal representations are initial segments of each other?

I.e., is there a sequence of primes whose decimal expansions have the following form: $$a_1,\ a_1a_2,\ a_1a_2a_3,\ a_1a_2a_3a_4, \dots$$ What about with the order of the digits reversed, so each ...
1
vote
1answer
38 views

using >>, -, + to make a number X times the constant K for the following numbers

if were only allowed to use >>, -, + to make a number X times the constant K lets assume K is 17 and K is 20 how to make an expression for each I was trying to think of ways to do this but I cant.
3
votes
1answer
70 views

Find the solutions of Boolean equations

It's given 4 Boolean equations. I need to find the number of solutions of each. $a)\ x_{1}x_{2}\oplus x_{2}x_{3}\oplus\ ...\ \oplus\ x_{n-1}x_{n}=1$ $b)\ x_{1}x_{2}\vee x_{2}x_{3}\vee\ ...\ \vee\ ...
0
votes
1answer
2k views

Explanation of carry in carry out borrow in and borrow out for binary addition and subtraction with examples

Hi I am having a hard time understand what carry in, carry out, borrow in and borrow out mean can anyone help me out and show me some examples thanks
1
vote
0answers
46 views

System of equations with binary variables

Is there any way to simplify solving system of equations, assuming that all variables are binary? All equations, however, are seen as equations with real (or, to make things simple, integer) ...
1
vote
1answer
142 views

Can every periodic binary sequence be expressed as the output of a Linear or Non-Linear Feedback Shift Register?

Quick background: The output of a Linear Feedback Shift Register (LFSR) with $n$ taps is a binary sequence which is periodic of length dividing $2^n-1$. From a mathematical point of view, such a ...
0
votes
1answer
44 views

Multiplication over $F_{2^{31}-1}$ by power of $2$

I'm reading the source code of a stream cypher (zuc): I cannot understand properly why they define the multiplication by power of 2 in this way: ...
1
vote
1answer
481 views

Simplifying Boolean Expression

I am asked to simply the following expression $$F(a,b,c) = c’ab + c’b’ + aba + b’cb + abc + c’b$$ using the Boolean identities and finding $F'(a, b, c)$ using DeMorgan’s law I have been trying for ...
2
votes
1answer
199 views

Binary notation in Magma

As a part of programming an Elliptic Curve Method with montgomery coordinates in Magma, I need to have an algorithm to convert a number from decimal notation to binary notation. Since there is no ...
4
votes
1answer
244 views

A question dealing with residual codes.

I've been reading about residual codes, and have come across several statements that I am having trouble showing. (1.) By using the residual code, one can show that a $[16, 5, 8]$ binary code ...
1
vote
3answers
340 views

Binary Sequences

Let $B_n$ = $\mathcal{P}(\{1, 2, \dots, n\})$. The set $\{0,1\}^n = \{a_1, a_2, ... , a_n : a_i \in \{0,1\}\}$ is called the length of binary sequences of length $n$. I want to verify and work on ...
3
votes
2answers
149 views

Binary Sequence Block

More of an informatics question, rather than applied mathematics - Source - Zonal Informatics Olympiad 2011 Question Paper Although, I've tried a few brute methods, I haven't really understood ...