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

learn more… | top users | synonyms

1
vote
0answers
7 views

Binary addition preserving Hamming weights

Let $x,y$ be two $n$-bit strings, with Hamming weights (number of $1$ bits) equal to $w_{1},w_{2}$, respectively. Let $z$ be the binary representation of the sum $x+y$, where we interpret $x$ and $y$ ...
1
vote
2answers
51 views

Exponential generating function for the number of binary strings of length $n$

I know that the generating function of the sequence counting the number of binary strings of length $n$ is $e^{2x}$. But my book doesn't explain why this is the case. Could you give me a little more ...
2
votes
1answer
38 views

Does a bijection from the reals to the any binary form?

It is fairly simple to store all rational numbers in a binary format (not base 2) (a language composed of only 1s and 0s, no . marking) by simply storing one integer, a seperator, and another integer. ...
0
votes
3answers
26 views

binary representation of integers congruent 1 and 3 modulo 4

Let $k=b_nb_{n-1}\ldots b_3b_2b_1b_0$ be the binary representation of an odd positive integer. Prove: If $k\equiv 1 \mod 4$ then $b_1=0$. If $k\equiv 3 \mod 4$ then $b_1=1$. I think that to prove ...
0
votes
0answers
8 views

Using the algebraic expression ((x-2)+3) / ((2-(3+y))*(w-8)) show the results of performing a preorder, an inorder, and a postorder search.

Using the algebraic expression ((x-2)+3) / ((2-(3+y))*(w-8)) show the results of performing a preorder, an inorder, and a postorder search. Preorder is root, left, right. Inorder is left, root, ...
1
vote
2answers
60 views

How many bit-flips are required to achieve random distribution?

If I have a binary number W bits wide, initially all set to zero, and I repeatedly pick a random bit and toggle it from zero to one or vice versa, how many times would I need to do this to achieve ...
0
votes
0answers
19 views

Signed Number's Binary Addition

I'm going to discuss about Signed Number's Binary addition, I searched about it and even read books. Now I make little changes in it's logic and start my own logic to solve it. Let me show 4 bit ...
1
vote
1answer
34 views

Looking for expectation of the number of substrings

The question is formulated as follows: if we are given $n$ random binary strings of length $n$, what is the expectation of the number of substrings they have in common? Sounds pretty simple, but if ...
3
votes
5answers
136 views

Simplifying sum equation. (Solving max integer encoded by n bits)

Probably a lack of understanding of basic algebra. I can't get my head around why this sum to N equation simplifies to this much simpler form. $$ \sum_{i=0}^{n-2} 2^{-i+n-2} + 2^i = 2^n - 2 $$ ...
1
vote
1answer
19 views

Multiplication and binary xor

I have to prove one thing that combines logical xor and arithmetical sum of binary representation of some numbers. Could you direct me what can I read on this topic? Specifically, I need to prove ...
2
votes
1answer
14 views

What is the minimum length of maximal palindrome of a binary word of length $n$?

For example if we have $n=4$ then the minimum length of maximal palindrome is 2. Here are all four digit possible binary words along with their maximal palindromes: ...
2
votes
3answers
119 views

What is the last digit? [closed]

Consider all 100 digit numbers, i.e., those between $0$ and $10^{100} - 1$ (inclusive). For each number, take the product of non-zero digits (treat the product of digits of $0$ as $1$) , and sum ...
-1
votes
1answer
40 views

Is binary more ideal than decimal? [closed]

We only chose the decimal system because we have 10 fingers. Binary is the most basic positional numbering system, so would it make sense to say that it would be the most ideal system? Is it better ...
0
votes
2answers
30 views

How many bytes with this configuration given in bits?

If the maximum number of bits of certain field is set to be 10 bits max. How many bytes can be set within this limitation? The solution of such a problem suggests number of bytes ranged is 1023. Can ...
0
votes
1answer
29 views

converting decimal to hexadecimal using division method

Okay so I know the basic procedure of converting a decimal number to any base-r is to divide by r and keep up with reminders until you reach zero. The reminders form the new base that is equivalent to ...
0
votes
0answers
25 views

Bitwise Operations and the Naming Convention of their Operators

So I just recently came across a bitwise operation on StackOverflow which shifts the bits in a binary number to the right while zero-filling from the left. The left side zero-filling overwrites the ...
2
votes
1answer
42 views

How to understand or derive the formula $Mantissa$ $bits$ $/$ ${log_2}$ $10$ = $Decimal$ $digits$ $of$ $precision$?

I asked a question a couple days ago about floating point precision on stackoverflow called, "Is floating point precision mutable or invariant?" and I received the following response. The formula ...
6
votes
3answers
442 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 ...
2
votes
1answer
66 views

IEEE-754 Format Conversion

Represent 11.0011 x 2^10 using the IEEE-754 standard for 32-bit floating point representation. 0-Sign Bit 10001010-Exponent 1001100000000000000000-Mantissa Is this answer is correct ? I am bit ...
0
votes
1answer
34 views

Generating binary palindromes

I have the following Number Systems problem. "Given the numbers from 2-2047 (inclusive) represented in binary, how many are palindromes? The leading digit can't be zero." How would I go about solving ...
1
vote
0answers
71 views

Generator polynomial creates a 127 bit sequence

I have been reading a paper that states that a generator polynomial $$ G(D)= 1+ D^4+D^7$$ creates a 127 bit sequence which is as follows 00001110 11110010 11001001 00000010 00100110 00101110 ...
6
votes
4answers
215 views

Floor function to the base 2

I'm not a math guy, so I'm kinda confused about this. I have a program that needs to calculate the floor base $2$ number of a float. Let say a number $4$, that base $2$ floor would be $4$. Other ...
1
vote
1answer
22 views

calculation of binary power like $a^b$ where a,b are binary numbers

Is it possible to calculate power of binary number like $a ^ b$where a,b both are binary numbers.
1
vote
2answers
51 views

Calculating all possible sums of the numbers $2^0, 2^1, \ldots, 2^{(n-1)}$

Using the simple equation $2^{n-1}$ you get answers such as: $1,2,4,8,16,32,64,128,256,$ etc. How can I find all possible number combinations within this range? For example, then numbers $1,2,4,8$ ...
0
votes
0answers
19 views

Binary block code

I don't fully understand how i would construct binary block codes? As far as I know we have a code, say, $(5,4,3)-$code, then $5$ would represent the length, $4$ would represent the number of codes ...
5
votes
5answers
100 views

How many bit strings of length $12$ have a substring $01$?

My question is should it be $11C2$ or should it be $11C1$? Since $01$ are connected together, I take them as a single unit and there are $11$ different positions where they can be placed. Is the ...
0
votes
1answer
39 views

Probability of 2 n-bit binary strings lining up, given that the first k bits do so

There are two rows of 10,000 bits, one on top of the other, currently all set to 0. 00000000000000000... 00000000000000000... Now imagine that in each row, 40 of the bits are randomly flipped to a ...
0
votes
0answers
10 views

Is there a standard to follow when writing a weighted binary code (ex. 6-3-1-1 or 2-4-2-1)?

For example, in 6-3-1-1 code, 7 can be represented as 1001 or 1010. Similarly in 2-4-2-1 code, 6 can be represented as 1100 or 0110. My professor said that there is a standard to follow and there can ...
0
votes
1answer
26 views

A property of permutation codes

For $k\ge2$ and $M\ge k+2$ two integers, a permutation code matrix $C$ is a $\binom Mk\times M$ matrix which columns contain all distinct permutations of $M-k$ zeroes and $k$ ones. Page 44 of his ...
3
votes
2answers
81 views

How to populate a $0-$line with $1$'s?

I have a line of $n$ $0$'s like this: Zeroth index -->$000...000$ I want to populate the line with $m$ $1$'s with the following rules: (1) They have to occur after the index ...
1
vote
0answers
20 views

Learning Booth's Algorithm, I Can't Find the Issue on Final Result

I am practicing using Booth's Algorithm to multiply a positive number and a negative number (specifically the problem is $-12 \times 4$). I have included my attempt, but I can't find the issue. If ...
0
votes
3answers
37 views

Efficient algorithm for taking powers of binary numbers?

Is there any efficient algorithm for taking powers of binary numbers? Or even just squaring one? Thanks ahead of time.
4
votes
1answer
69 views

Why do we divide or multiply by 2 when converting binary?

Trying to understand the fundamentals of binary rather than just following steps, I wanted to know why do we multiply by 2 to convert a decimal (0.5, 0.25) to a binary and why do we divide by 2 when ...
1
vote
0answers
32 views

Binary division using polynomial

I want to do a division of two binaries and take the rest (mod). But I want to do this using polynomials, let's take the example: binary dividend: 010001100101000000000000 binary divisor: 100000111 ...
0
votes
1answer
21 views

Division binary using polynomials

I want to do a division of two binaries and take the rest (mod). But I want to do this using polynomials, let's take the example: binary dividend: 010001100101000000000000 binary divisor: 100000111 ...
0
votes
1answer
43 views

Computing the Value of a minimax tree

I am asked to compute the value of a minimax tree, which each node labeled with its initial value. I am just unsure how to do it. I know that it is a minimax tree if: the root is a min node, the ...
0
votes
1answer
19 views

Probabilities of a Binary String

You generate a random $N$-bit binary string, and compute $X = \Sigma_1^N x_i$, where the $x_i$ are the $0$ and $1$ entries of the string. What is the probability that $X$ is odd, if $N$ is odd? What ...
1
vote
1answer
75 views

the blood test riddle (number theory)

A microbiologist has been given a set of $100$ blood vials. Exact one of those $100$ vials is positive to a concrete disease X. The microbiologist desires to send only $7$ vials for analysis. He can ...
0
votes
1answer
33 views

Bitwise ops - The relationship between $a$, $b$, $a \wedge b$, $a \vee b$ and $a \oplus b$

In computer programming, the term bitwise operation is used to denote the use of boolean operators (and $\wedge$, or $\vee$, exclusive or $\oplus$) on corresponding bits of two numbers. Bits, in this ...
0
votes
1answer
44 views

I'm trying to convert a number to binary. What am I doing wrong?

So I'm trying to convert a number to binary, but I keep getting the incorrect answer. If it matters I was roughly following this guide. Here is my work: $120 = 60 + 60$ $120 = 64 + 32 + 16 + 8$ ...
0
votes
0answers
37 views

Is there an alternative encoding scheme to binary where similarity of pattern correlates with size of number?

If I compare binary for 7 111 and binary for 8 1000 there is no correlation between these two patterns that suggests that ...
2
votes
3answers
72 views

Determining if a relation is reflexive, symmetric, or transitive [closed]

Let $A = \{0,1,2,3\}$ Define a relation $T$ on $A$ as follows: $T = \{(0,1),(2,3)\}$ Is $T$ reflexive? symmetric? transitive?
0
votes
3answers
49 views

Finding the equivalence classes of a relation R

Let A = {0,1,2,3,4} and define a relation R on A as follows: R = {{0,0},{0,4},{1,1},{1,3},{2,2},{3,1},{3,3},{4,0},{4,4}}. Find the distinct equivalence classes of R. How do I solve this problem? ...
0
votes
1answer
38 views

Proving Equivalence Relations On A Set

Let X be the set of all nonempty subsets of {1,2,3}. Then X = {{1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}} Define a relation R on X as follows: for all S and T in X, SRT if, and only if, the least ...
4
votes
0answers
64 views

What is the explicit formula (solution) to this recursively defined binary matrix?

My question concerns the following binary matrix (call it matrix $A$). Or rather the entire family of such matrices, for some number of columns $n$ and rows $2^n$. The ellipses indicate that the ...
1
vote
0answers
27 views

How to determine size and height balance of binary search tree?

I've been reading/ learning binary search trees and I've been stuck on the following question for a while now. I have the following tree, how do I determine the height and size balance of it? How do ...
1
vote
2answers
78 views

Recursively defining sets of strings discrete math

So here are the two problems: Recursively define the set of bit strings K that do not have 00 as its substring. How many bit strings of length 10 are included in the above set K? Can someone ...
-1
votes
1answer
50 views

Binary strings and recurrence relations [closed]

So the problem is: How many binary strings of length n contains 111? Give a recurrence relation Tn, where Tn is the number of binary strings of length n that contains 111. How could we possibly ...
1
vote
1answer
27 views

Essential Prime Implicants and Minterm Expressions

I have an exam for a university course shortly, and upon reviewing one of my assignments I have come to realize that I don't understand why I have lost marks/how to do a couple of questions. Hopefully ...
0
votes
1answer
15 views

Writing a series of polynomial equations of certain degree from a sequence of binary bits using Magma

How do I write a series of polynomial equations of a specified degree from a sequence of binary bits using Magma. So far, I have the following code for converting a decimal sequence to binary. ...