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

learn more… | top users | synonyms

3
votes
2answers
32 views

How many binary sequences of length n are there that contain exactly m occurrences of the pattern 01?

I thought there were n-1 places between the first and last digit. In these places I hypothesized there are switches that change (from 0->1 or 1->0) For ...
0
votes
1answer
27 views

Is it really possible to make all possible numbers with an infinite binary table?

Suppose I have an imaginary computer, with an infinite binary table, like the one below: $$ \begin{array}{|c|c|c|c|c|c|c|c|c|} \cdots & 128s & 64s & 32s & 16s & 8s & 4s & ...
0
votes
1answer
15 views

Polynomial Arithmetic Modulo 2 (CRC Error Correcting Codes)

I'm trying to understand how to calculate CRC (Cyclic Redundancy Codes) of a message using polynomial division modulo 2. The textbook Computer Networks: A Systems Approach gives the following rules ...
0
votes
1answer
28 views

Binary overflow

Which of the following hexadecimal numbers, representing signed 16-bit binary numbers, results in overflow when multiplied by 4? Here, a negative number is represented in 2's complement. ...
0
votes
1answer
14 views

Determine whether or not a binary number is divisible by $3$

Let $K$ be a natural number with $n$ binary digits. Is there an $O(n)$ method for deciding whether or not $K$ is divisible by $3$? $3|K \iff d_1-d_2+d_3-d_4\dots\pm d_n=0$ works correctly up to ...
0
votes
1answer
13 views

Binary representation of the real numbers

I am solving the following exercise: for $n \in \mathbb{N}$ and $a_1,a_2, \ldots ,a_n \in \{0,1\}$ we define: $$ I(a_n, \ldots , a_n) := \left \lbrack \sum_{i=1}^n \frac{a_i}{2^i}, ...
0
votes
2answers
38 views

how long does this subroutine and loop take

Suppose A(.) is a subroutine that takes as input a number in binary, and takes linear time (that is, O(n), where n is the length (in bits) of the number). Consider the following piece of code, which ...
0
votes
1answer
37 views

Turn recursive definition of a function into its close form

I'm creating a tree diagram, and I'm trying to calculate the amount of white spaces I need at the left side. As you can already see this is done in a program. The formula goes like this: $$ ...
-4
votes
2answers
33 views

How many ones are there in the binary representation of a digit [on hold]

in each case added to the previous value of count How many of 1, we need for n 0 = 0 -> 0 1 = 1 -> 0+1=1 2 = 10 -> 1+1=2 3 = 11 -> 2+2=4 4 = 100 -> 1+4=5 5 = 101 -> 2+5=7 6 = 110 ...
1
vote
1answer
17 views

Convert from two's complement into unsigned number

There is an 8-bit numerical value, where a negative number is represented in two’s complement. When this value is represented in decimal, it becomes -100. When this value is regarded as an ...
0
votes
1answer
22 views

Multiple representations of ternary expansions of numbers

$x \in [0,1]$. If in binary expansions ie series $\displaystyle x = \sum_{i=1}^{\infty} \frac{x_i}{2^i}$ where each $x_i \in \{0,1\}$ we identify the sequences $\underline{x}$ and $\underline{x}'$ ...
-1
votes
0answers
17 views

Machine representation of numbers vs IEEE 754 [closed]

What are the main differences between machine representation of numbers and IEEE-754 standard?
1
vote
3answers
118 views

Number of binary palindromes in a range

I want to find the number of binary palindromes from $1$ to $N$. $0 \lt N \lt 2^{32}-1$. I observed a pattern that if we have an odd-length binary palindrome, it can generate only $1$ even-length ...
0
votes
2answers
123 views

How many Binary numbers?

How many binary numbers of length $n$ can be generated where $n > 7$ and the number either start with $000$ or end with $111$? My questions is, can I choose an $n$ randomly? For example, let's say ...
0
votes
1answer
24 views

Finite binary representation of float number

How can I prove that float number $x$ has the finite binary representation if and only if it is written like that: $ x = m / 2^n $, where $m, n \in \mathbb N$. Should I consider something like 3 ...
4
votes
2answers
10k 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
21 views

Binary expansions of dyadic rationals in $[0,1]$

Completely stuck on this exercise! Hints and a starting point would be greatly appreciated. Nor do I see why is $x \in [ 0,1] \setminus D$ do not have $2$ binary expansions.
0
votes
3answers
296 views

How to convert an infinite binary fraction into a decimal fraction

I am asked to write the infinite binary fraction $0.(1011)$, where the $1011$ is the repeating part, as a $\frac pq$ fraction. What are the steps to do this? EDIT: If $0.(1011)$ was in base 10, I ...
1
vote
2answers
65 views

Is it possible to not have irrational numbers?

(Math noob question): Is there a base that can be used like binary that produces no irrational numbers or numbers with an infinite amount of one number after the decimal (don't know the name)? I feel ...
2
votes
1answer
22 views

Express a binary operation in decimal

Is there a way to represent binary operation in decimal. What I mean with this is for example a set of decimal operators that would give the same result as a x>>n a ror(x), etc. So far the only thing ...
2
votes
1answer
30 views

Getting the nth bit of a decimal number

I have a formula for decoding a 3-bit data object: $$T = 68 + 2 \sum_{i=0}^22^iTempA_i$$ where $TempA$ is the 3-bit object and $TempA_i$ is the $i$'th bit from the right. I am trying to rewrite this ...
0
votes
1answer
25 views

Where can I find a binary calculator that can do exponentiations, roots and logarithms?

I've searched on Google, but all I found was binary calculators that can do additions, subtractions, multiplications and divisions, nothing else.
0
votes
1answer
20 views

Prove through structural induction that a binary tree has an odd number of nodes

A full binary tree is a binary tree where every node has either 0 or 2 children. Prove that every non-empty full binary tree has an odd number of nodes. I dont know how to get started with this ...
0
votes
0answers
12 views

Estimating how many searches will be needed to justify time spent on presorting an array.

Problem Estimate how many searches will be needed to justify time spent on presorting an array of $10^3$ elements if sorting is done by merge sort and searching is done by binary search. (You may ...
1
vote
1answer
13 views

If gen matrix has even weigth rows, do codewords have even weigth for non binary code?

Is that true that in a non binary code C every codeword has even weight if and only if every row of G has even weight?
1
vote
2answers
26 views

Trying to understand binary number equation

I'm reading a book called "The Elements of Computing Systems" by Noam Nisan/Shimon Schoken. There's an excerpt which includes some math that I'm struggling to understand (limited math background; I ...
0
votes
0answers
38 views

Proof by Induction for Splay Tree?

I'm preparing for an exam about Trees. One of the questions that appear in Mark Allen Weiss' "Data Structures and Algorithms Analysis in C++" is: Prove by induction that if all nodes in a splay tree ...
0
votes
2answers
41 views

Equivalence relations for $\mathbb{N} \times \mathbb{N}$ question

On the set $\mathbb{N} \times \mathbb{N}$ define $(m, n) \sim (k, l)$ if $m + l = n + k$. Show that $\sim$ is an equivalence relation on $\mathbb{N} \times \mathbb{N}$. Draw a sketch of $\mathbb{N} ...
4
votes
1answer
432 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
0answers
81 views

Why is $2^{16} = 65536$ the only power of $2$ less than $2^{31000}$ that doesn't contain the digits $1$, $2$, $4$ or $8$ in its decimal representation

$65536$ is the only power of $2$ less than $2^{31000}$ that does not contain the digits $1$, $2$, $4$ or $8$ in its decimal representation. http://en.wikipedia.org/wiki/65536_%28number%29
1
vote
1answer
22 views

Does decimal fraction has hex value?/can hex be fraction?

I was wondering if a decimal fraction could be converted into a hexadecimal fraction? I have seen it many times ? but I have been also told that decimal or binary fraction has no meaning in hex. ...
1
vote
1answer
31 views

How many binary string are there such that there are no k consecutive characters are the same?

Given number $n$ and $k$. Count the number of string with length $n$ such that there are no $k$ consecutive characters are the same. Example with $n = 3, k = 3$, the answer is $6$. ($110, 001, 101, ...
0
votes
1answer
20 views

Why do we add 6 in BDC addition.

When performing addition to BCD, if we get an invalid BCD, we remedy this by adding a binary $6$ to our sum. Example: $0101 + 0110 = 1011$ (Invalid in BCD) So, we add $6$ to fix this. $1011 + 0110 ...
0
votes
1answer
33 views

Number of 2n-digit binary sequences

Find the number of 2n-digit binary sequences in which the number of 0's in the first n digits is equal to the number of 1's in the last n digits. I'm not sure how to approach the question. My ...
3
votes
2answers
26 views

Why are these two conversion methods (base 10 to base 2) equivalent

I've come across two methods for converting a base 10 number into its base 2 equivalent. I want to know why they are equivalent. Method 1: We're given a number $N$ to convert into binary 1) Find the ...
0
votes
1answer
25 views

Can we transform given strings to get the same string?

There are 2 binaries string $A, B$ (string just contains $0$ or $1$) Input: $A_1, A_2,\dots,A_{50}$ and $B_1, B_2,\dots,B_{50}$ Note that: $A_{51} = B_{51} = A_{52} = B_{52} = \dots = A_{\inf} = ...
0
votes
1answer
18 views

Boolean Algebra - What is the meaning of f(x) = ∑(N)?

Suppose you had: f(x,y,z) = ∑(2,3,4,5) What does this represent or map? For each of the variables x,y,z?
0
votes
1answer
716 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 ...
0
votes
0answers
21 views

Converting From Different Number Systems

I've been taught to convert from base 2 to base 10 using the following process: 10110 = $0\times1 + 1\times2 + 1\times4 + 0\times8 + 1\times16 = 0\times2^0 + 1\times2^1 + 1\times2^2 + 0\times2^3 + ...
0
votes
2answers
323 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 ...
0
votes
1answer
57 views

Is there a binary [10,6,4] code?

Using the sphere padding packing bound formula I can conclude that 1 + 12 + 66 $\ge$ $2^{6}$ which indicates that there MAY be a binary [10,6,4] code, however I cannot prove that there is. How can I ...
16
votes
3answers
3k views

Why are huge binary numbers about 3.3218 times longer than their decimal counterpart?

Why are huge binary nubers about $3.3218$ times longer than their decimal counterpart? I thought about this when I was writing this Python code: ...
2
votes
2answers
2k views

Terminating decimal number which is not terminating in binary

I know that when converting a decimal number from base 10 to base 2, the result might be not terminating, even though the number is terminating in base 10. For instance, 0.2 -> 0.0011 0011 0011 ... ...
0
votes
1answer
30 views

From an expression raised in a power of 2 to an expression raised in the power or 10

Is there a simple/"easy" way to convert a big number from a power of $2$ to a power of $10$ equivalent. Example: I had $2^{127}\cdot 1.9999999$ which I did the multiplication got the result and from ...
0
votes
2answers
25 views

Binary solving problem. 50 in binary number

The asnwers doesnt make sence for me. The binary number of 50 is 110010. Do I overlook something?
0
votes
2answers
46 views

Determine whether a number has an even number of 1's or not in a binary base

Assume that I have an ordinary number in Decmical base, now what I want to know is determining whether it has an even number of 1's in a binary base or not.and yet again I should emphasize the fact ...
0
votes
4answers
129 views

why binary is read right to left

May somebody explain this in other words? http://wiki.answers.com/Q/Why_do_you_read_binary_digits_right_to_left I know this is an akward question, but I really want to know the answer, it's just ...
0
votes
1answer
14 views

Linearly independent rows in a binay matrix

I need the algorithm to finding only the linearly independent rows in a binary matrix using XOR function. Example 1: The result: Example 2: The result: R4 is not included because:
0
votes
1answer
28 views

Finding a standard generator matrix given a binary code

My question is how do I find the standard generator matrix of a binary [7,6,2] code? From what I understand a generator matrix for $C$ is any $ k \times n$ matrix $ G$ with entries in $ ...
1
vote
1answer
16 views

Binary Gaussian Elimination of a matrix

Can anyone help me find the algorithm for the Binary Gaussian elimination of a matrix. for example: The output: