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

learn more… | top users | synonyms

0
votes
0answers
17 views

Concrete math generalized josephus recursion understanding 1.15

I am studying through the josephus problem in concrete math , Here is the equation of binary form $$f(1) = α ;$$ $$f(2n + j) = 2f(n) + β_j ,$$ $$\text{ for } j = 0, 1 \text{ and } n \geq 1$$ this ...
-1
votes
1answer
19 views

Determine fraction length of fixed-point binary

How to determine fraction length of fixed-point binary so that distinct entries of a group of decimal numbers (for example: 1, 0.456, 0.444) remain distinct after converting them from decimal to ...
-2
votes
1answer
18 views

How many binary strings are there of length n with k ones? [on hold]

For some fixed $n$, how many binary strings are there with $k$ $1$s and $n-k$ $0$s (where $n>k$)?
0
votes
2answers
242 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 ...
-2
votes
1answer
569 views

Uncountability of numbers written in binary system [closed]

One can do a mapping between binary decimal numbers and integers like this: ...
1
vote
2answers
17 views

Guessing Birthday Binary-Implementation Set Size

Guessing a persons birthday day-of-month, i.e. a number ranging from 1 to 31 by dividing the numbers 1 to 31 up in 5 sets. A binary number for decimal integers between 1 and 31 has at most five ...
0
votes
0answers
12 views

Absolute and relative error of a binary number?

Given is the following system $A:={ \pm 1.a_1 a_2 a_3 a_4 \cdot 2^e}$, $a_{i}\in \left \{ 0,1 \right \}$, $i\in \left \{ 1,2,3,4 \right \}$, $e\in \left \{ -8,\ldots,8 \right \}$. Find the absolute ...
2
votes
1answer
58 views

Count 1-bit in binary integers

Given an integer range [A,B], (1) What’s the probability to get a 1-bit if we first randomly choose a number x in the range and then randomly choose a bit from x? (2) What’s the expected number of ...
0
votes
1answer
423 views

Arithmetic Overflow and Underflowing

I am a bit unclear about Underflowing in terms of binary representation. Let's say that an unsigned 8 bit variable gets overflown from the addition of 150+150. A signed 8 bit variable gets ...
2
votes
2answers
35 views

binary and floating point representation

suppose that we have following binary digits $00011001.110 $,we can do following thing $00011001.110=1\cdot2^4+1\cdot2^3+1\cdot2^0+1\cdot2^{-1}+1\cdot2^{-2}=25.75$ then what does means? We then ...
0
votes
0answers
16 views

Binary: Two Compliment with decimal point

Good Day sir/mam, Im trying to figure out how to do the two's compliment binary to decimal with decimal points or fraction. I have this problem of 138.375 - 225.75 = -87.375 and If I'm right: ...
1
vote
2answers
71 views

Half-Adder Exercise

My exercise is the following: Make a circuit which outputs X^3 of two bit input of X. Use the lowest number of HALF ADDERS as you can. I don't really understand ...
3
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?
1
vote
2answers
26 views

Polynomial representation of binary

It is well known that we can represent binary using polynomial. For example, $11$ can be represented as $x+1$. So when we compute $11\times11$, we should obtain $1001$, which is equal to $9$ in ...
0
votes
0answers
27 views

Perform this arthimetric operation on 8bits 2's complement numbers..

So the question is: Perform the given arithmetic operation on the following pairs of 8-bit 2’s complement numbers. In each case, indicate whether or not overflow occurs. the numbers: 11010100 + ...
4
votes
1answer
332 views

Finding a rational number which is simply normal to relatively prime bases

Let $n\ge 2\in\mathbb Z$. Suppose that a base-$n$-decimal $(0.a_1a_2a_3\cdots)_n$ represents $\sum_{k=1}^{\infty}\frac{a_k}{n^k}$ where $a_{i}\in\{0,1,\cdots,n-1\}\ (i=1,2,\cdots)$ is each digit ...
2
votes
1answer
341 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
vote
1answer
40 views

Formula providing binary numbers based on digit 1 occurences

I would like to find a formula which gives me all binary numbers which contain the digit "1" a certain number of times. For example to times as in this sequence: ...
0
votes
2answers
109 views

Combinatorics: Binary Strings

Are the these 2 binary generation expressions equal? If so, how do I simplify my answer to match the solution's? Question: The set of binary strings where the length of each block of 0s is divisible ...
0
votes
2answers
138 views

Binary Strings Question

prove that the following expression for a set of binary strings S is ambigious S = {101,1101,1011}* Thanks for all your help!
1
vote
2answers
679 views

Modulo 2 binary division (XOR not subtracting) method

I have attached an image showing a Modulo 2 binary division. I can roughly understand the working below which is using XOR calculation but I am not sure how the answer (in red) is being computed ...
1
vote
1answer
34 views

Binary string block recurrence

Let $a_n$ be the total number of blocks for all $2^n$ binary strings with length $n$. Prove the following recurrence: \begin{equation*} a_n = 2a_{n-1} + \frac{2^{n}}{2} \end{equation*} For example ...
4
votes
3answers
218 views

Number of binary strings with $n$ ones and $m$ zeros

$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 ...
2
votes
1answer
19 views

How to represent a job-sequencing?, with binary code

Suposse a job sequence of 6 jobs, as 3-5-4-2-6-1, that point the job 3 is attended in 1st place, and then the job 5,.... How could I represent this sequencies with binary code to use in metaheuristic ...
0
votes
3answers
51 views

How do I add multiple binary numbers without using a partial sum?

I know how to add binary numbers but what I normally do is add the first 2 binary numbers and then add the 3rd one to their sum. It is really slow. $$ 111_2 + 111_2 + 111_2 + 111_2 $$ Here is ...
0
votes
0answers
22 views

Efficient way to compute the binomial using $(2^k+1)^{k+1}$

The following web page: "http://introcs.cs.princeton.edu/java/78crypto/" (at Exercise 28) effectively says that: "Pascal's triangle. One way to compute the $n$-th row of Pascal's triangle (for $n ...
1
vote
0answers
34 views

Is there a way to get the n-th of bits of 2^k

I have a large number N=O(2^k). For simplicity, let's say that N=n^k. However, I only need the n-th bits of N, say for example the 10-th to 16-th bit of N... without calculating the full expansion... ...
0
votes
0answers
30 views
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 ...
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 ...
0
votes
1answer
27 views

Relations between NIM-addition and addition

I will note $\oplus$ the NIM-addition. This is a commutative group law. To obtain $a \oplus b$, you decompose a and b in binary, and you sum like this : 0+0=0 ; 1+0=1 ; 1+1 =0 (it's the xor ...
3
votes
2answers
53 views

Algorithm for creating binary rational numbers

I read here an algorithm to convert a decimal rational number to binary by multiplications by 2, but although it's very simple to carry on, I still haven't managed to explain myself why it works. ...
0
votes
1answer
25 views

Binary expansion

I am trying to get my head around the left and right shift for binary expansion. The rules are: Shifting to the right ...
1
vote
1answer
29 views

Coloring a binary tree

Working through a problems practice coloring, I have found a problem that has me stumped. The problem states: For $n \in \mathbb{R}_{>o}$ the binary tree is defined recursively as follows. The ...
0
votes
1answer
16 views

Negative Binary Convertion

How do I go about converting -2 decimal to two's compliment in 7 bits? I know in 8 bit representation -2 is 11111110 but for 7 bit I am confused?
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
0
votes
1answer
43 views

Prove a identity with Fibonacci sequence and binary sequence.

Let us: $\{f_k\}$ Fibonacci sequence; $\{u_k\}$ binary sequence i.e. $u_k=$ 0 or 1; $\rho$ real positive number. Is there a binary sequence $v_k$ such that: $$\sum_{k=2}^{n+1}\frac{u_{k-1} ...
0
votes
1answer
20 views

property holds for all bases except 2

For any base $n$, for $n > 2$ the following holds: $1/(n-1) = 0.111...$ However in base 2 this doesn't hold. It's just 1. It's obvious why that is you have $1/1$, but I always get uneasy with ...
1
vote
3answers
80 views

Product of “reversed” numbers

Consider any 2 binary numbers, e.g.: 10101011 ; 11111101 and their product, say P. "Reverse" (mirror image) all the digits of the 2 numbers, e.g.: ...
0
votes
1answer
16 views

squaring binary doubles the nr of bits?

If a is a 10 bit number, then is $$|a^2|=20? $$ And then $$|a^3|=30? $$Or is that at least an upper bound? Does it work this way? I want to explain how with very high probability 4096 bit number is ...
1
vote
1answer
54 views

Why exactly are NAND and NOR the only universal binary logic functions?

We know there are 16 possible binary logic functions: ...
0
votes
1answer
18 views

Decimal to binary with limited fractional and exponent bits

I am trying to show the binary representation of a couple numbers using scientific notation. Using 8 bits for the fractional part, and 4 bits for the exponent. The exponent is stored using 2's ...
0
votes
1answer
34 views

Simple binary subtraction with decimals

so let's say I am trying to subtract 75.442 by 43.646. I have 43.646 = 00101011.1010, and 75.442 = 01001011.0111 from 2's ...
0
votes
2answers
31 views

DFA Construction with three strings in language

Draw DFA that recognizes the following language, with the alphabet {0, 1} {0011, 11, 0101} I'm having a lot of trouble with this, because I know DFA have to have a determined path from each state ...
0
votes
1answer
11 views

Binary variable syntax?

Is there a more compact styntax to represent binary variables, such as: $3a+2b+c=5$ where $a,b,c$ are either "0" or "1" ? I've tried setting domains, ($a\le1$ and $a\ge 0$, etc) but that only works ...
1
vote
0answers
23 views

Why is this number the smallest positive normalised binary value?

In the AQA A2 Computing textbook (Bond and Langfield, 2009), they say that this number is the smallest positive normalised value, given a 10 bit mantissa and a 6 bit exponent: ...
2
votes
0answers
45 views

Upper limit for adding N numbers in grid of N processors in parallel

We must show how N binary numbers, each consisting of N bits each, can be added in a linear grid of N+logN processors. Suppose that the binary digits can be inserted directly in each processor of the ...
0
votes
1answer
62 views

binary representation of a fraction in two's complement

Could any one please explain what is a 16-bit two's-complement representation of -0.375 and the steps to calculate it? Also, what happens if I convert it back to decimal? Thanks
2
votes
4answers
720 views

Convert from base 10 to base 5

I am having a problem converting 727(base 10) to base 5. What is the algorithm to do it? I am getting the same number when doing so: $7*10^2 + 2*10^1+7*10^0 = 727$, nothing changes. Help me figure it ...
1
vote
3answers
61 views

Base 16 to base 10 number conversion

I know that if we want to convert from base 16 to base 10 we do as follows (for example): Given : $15C$ in base $16$ Conversion to base 10: $12 \times 16^0 + 5 \times 16^1 + 1 \times 16^2 = 348$ in ...