Tagged Questions

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

8k 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?
809 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. ...
541 views

I was wondering if someone could help me count the total number of Truth Functions of 3 variables, that can generate all the possible truth functions.. I got 56 but I'm not sure of the answer. EDIT: ...
582 views

The sum of powers of two and two's complement – is there a deeper meaning behind this?

Probably everyone has once come across the following "theorem" with corresponding "proof": $$\sum_{n=0}^\infty 2^n = -1$$ Proof: $\sum_{n=0}^\infty q^n = 1/(1-q)$. Insert $q=2$ to get the result. Of ...
605 views

Function that sends $1,2,3,4$ to $0,1,1,0$ respectively

I already got tired trying to think of a function $f:\{1,2,3,4\}\rightarrow \{0,1,1,0\}$ in other words: $$f(1)=0\\f(2)=1\\f(3)=1\\f(4)=0$$ Don't suggest division in integers; it will not pass for ...
3k 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 ...
58 views

How many numbers from $1$ to $2^n$ will have $11"$ as substring in binary representation?

For example say, $n = 2$. So our set is $\{1, 2, 3, 4\}$ in base $10$ and $\{1, 10, 11, 100\}$ in base $2$. So Output $1$, because only one number i.e. $3$ is there such that it has $11"$ in it. ...
358 views

Given $n$ $0$'s and $n$ $1$'s distributed in any manner whatsoever around a circle, show, using induction on $n$, that it is possible to start at some number and proceed clockwise around the circle to ...
3k views

A proof that powers of two cannot be expressed as the sum of multiple consecutive positive integers that uses binary representations?

In this earlier question, the OP asks for a proof of the statement Every natural number not of the form $2^k$ for some natural number k can be written as the sum of two or more consecutive ...
120 views

Finding element in binary representation of $GF(2^6)$

I got the following task: Let $F = GF(2^6 )$ be K[x] modulo the primitive polynomial $h(x) = 1 +x ^2 +x ^3 +x ^5 +x ^6$ , and let $\alpha$ be the class of x. I have a table with the binary ...
87 views

Possible distinct binary tree structures at depth d

I'm trying to figure out a recursive formula for the number of possible distinct binary trees at any depth d. I haven't been able to find any sort of sources on this. basically, at depth 0, the only ...
4k 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 ...
53 views

Rounding - should I compare truncated sum with the number added to make least bigger number

Suppose I have a number in binary: $$0.11111 = 0 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \frac{1}{32}$$ I want to round it to 3 significant digits after the radix point. So, I ...
4k views

In plain English, why does conversion from hexadecimal to binary work so cleanly?

Why does the trick of taking the binary representation of each digit and simply concatenating them work? e.g. 0x4E == 0100 ...
27k 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?
3k views

Count the number of n-bit strings with an even number of zeros.

I am currently self-studying introductory combinatorics by reading Introduction to combinatorial mathematics. I am currently in the first chapter, and I have a question regarding one of the examples. ...
8k views

binary representation of a real number

In Baby Rudin,I find reference to the fact that the binary representation of a real number implies the uncountablity of the set of real numbers.(page 30)But I have two questions: Does every real ...
587 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 ...
$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 \... 0answers 119 views Bounding the global intersection of a family of sets Suppose that we have a decision tree of height r + 1 that describes how to increment an n-bit integer in the range [0, 2^n -1]. That is, the internal nodes are labelled with a bit position that ... 1answer 404 views Number of 'unique' one bit binary functions with N-bit inputs Consider the set of binary functions that takes an N-bit input -> 1 bit output. There are 2^(2^N) elements in this set. Now potentially reduce this set by restricting to only considering functions ... 1answer 411 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 ... 0answers 38 views Bit operations to count longest string of 1s in a binary number - connections to FFT? I found this rather applied question on another forum. How to calculate size of largest string of consecutive 1s in a binary number. However the other forum had neither much of a focus on applied ... 1answer 260 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, I'... 2answers 688 views converting decimals to base negative-10 I have a decimal (base 10) number, 44, and would like to convert it to base -10. I know how to convert$$ 164_{-10} \mapsto 44_{10}, $$but not the other way around. 4answers 466 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 ... 3answers 633 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 ... 1answer 63 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. ... 1answer 229 views Proof/intuition that any number can be expressed in binary form and every number will have a unique representation? I was just thinking lately that how do we know that literally every number can be expressed in binary? And that too, with a unique representation? Clarification: With numbers, I mean whole numbers. ... 1answer 54 views Compare two numbers This question comes from this answer to my another question. I have the following two statements in binary to compare:$$ |0.11 - 0.1101110111...|\quad\quad|1.00 - 0.1101110111...|$$I need to ... 1answer 172 views Set of points of [0,1) that have a unique binary expansion Let Y denote the set of points of [0,1) that have a unique binary expansion. Then Y has a countable complement so m(Y)=1, where m is the Lebesgue measure. I have to confess that I do not ... 1answer 56 views Converting 0.1 to binary 64 bit double I want to convert the decimal number 0.1 to binary 64 bit double. So I do it like that:$$ 0.1_{10} = 0.00011001100110011001100110011001100110011001100110011001100110... \times 2^0 $$Represent it ... 0answers 109 views Rounding up a binary number I just converted the fraction \frac{3}{5} to the following floating point binary number: (1.001100110011001100110011\cdots)_{2}\times 2^{-1}. Now, I am trying to find the two nearest machine ... 2answers 397 views Binary Code Decimal (BCD) I need help with the following question, my try is at the bottom: Question : Using Binary Code Decimal 8-4-2-1 representation, calculate 6789 + 7156 - 365 My Answer : 1101010000101 + 1101111110100 = ... 1answer 47 views Decompose negative power of ten in finite series Suppose we have numbers 10^{-1}, 10^{-2}, 10^{-3}, ..., 10^{-n}. We need to represent each number by its closest representation that is less than original by means of finite sum of two in negative ... 0answers 28 views Computing relative roundoff error of a correctly rounded binary number This is related to a question that was asked and answered a moment ago. I need to answer the following: If \displaystyle \frac{3}{5} is correctly rounded to the binary number (.a_{1}a_{2}\... 1answer 119 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 ... 3answers 14k 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 ... 1answer 179 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. 0answers 47 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 >... 3answers 178 views converting to octal, hexadecimal and binary Revising for an exam - could someone explain to me how you can convert an ordinary numbers to octal, hexadecimal and binary would be appreciated 1answer 59 views Cardinality: Set of all binary sequence equal c How do I prove the cardinality of the set of all binary sequences equal c? I know I have to find a bijective function from (0,1) to the set of all binary sequences. But I can't think of one. Cantor'... 0answers 243 views Proving that number of codes with even weight is the same as number of codes with odd weight for a specific code book Consider the [n,n] code-book C_0=\{0,1\}^n with n being odd and the codes c_i \in C_0=[c_1,c_2,...,c_{2^n}] being sorted in the ascending order of hamming weight (from 0 to n). Now let's ... 1answer 142 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? 2answers 90 views Why is 23 equals to 10111 in binary I've tried to convert 23 to binary and came up with the number 100111 by using the calculation inspired by this answer: 1) Find out the least significant bit:$$ ...
Possible Duplicate: Number of relations that are both symmetric and reflexive Let $X$ be a set with $8$ elements. How many binary relations on $X$ are either reflexive or symmetric or both? ...