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

learn more… | top users | synonyms

16
votes
8answers
4k 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?
3
votes
2answers
309 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. ...
10
votes
1answer
504 views

Finding Expressively Adequate truth Functions

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: ...
10
votes
1answer
522 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 ...
1
vote
2answers
510 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.
0
votes
3answers
104 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
3
votes
1answer
2k 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 ...
5
votes
10answers
599 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 ...
1
vote
2answers
87 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 ...
5
votes
1answer
52 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. ...
4
votes
3answers
295 views

An odd question about induction.

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 ...
3
votes
1answer
67 views

Proofs involving some general formulae for trees and binary trees.

So here I have 3 tree-related questions. 1) Let $n\geq2$ and let $d_1 ≤d_2 ≤···≤d_n$ be a sequence of integers. Show that there is a tree with degree sequence $d_1,d_2,...,d_n \Leftrightarrow \sum ...
3
votes
3answers
2k 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 ...
2
votes
3answers
109 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 ...
1
vote
1answer
104 views

Find the pair of values $a[i]$, $a[j]$ such that $a[i]\,\&\,a[j]$ is maximum

Given a list of positive integers, find the largest possible value of $a[i]$ $\&$ $a[j]$, where $i$, $j$ are indices of the list. $ i\ne j $, $a[i]\,\&\,a[j]$ is bitwise AND of $a[i]$ and ...
0
votes
2answers
78 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 ...
32
votes
10answers
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 ...
5
votes
2answers
17k 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?
4
votes
3answers
431 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 ...
4
votes
2answers
2k 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. ...
4
votes
1answer
133 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 ...
3
votes
1answer
330 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
1answer
220 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
122 views

Compressing a short list of very large numbers?

Suppose that we are dealing with integers drawn from a random uniform distribution, on the range $[1 , 2^{30}]$. Is it possible to effectively compress a short list of random numbers, say $2^4$ ...
0
votes
4answers
6k views

How many 32 digit binary number combinations are possible?

How many 32 digit binary number combinations are possible? For example: $$00000000-00000000-00000000-00000000$$ $$00000000-00000000-00000000-00000001$$ $$00000000-00000000-00000000-00000010$$ $$.$$ ...
6
votes
3answers
460 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 ...
6
votes
4answers
234 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 ...
3
votes
0answers
159 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 ...
2
votes
1answer
54 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. ...
1
vote
1answer
699 views

How to calculate no. of binary strings containg substring “00”? [duplicate]

I need to calculate no of possible substrings containing "00" as a substring. I know the length of the binary string. Eg: for a string of length 4, possible substrings are: 0000 0001 0010 0011 0100 ...
1
vote
0answers
161 views

1s surpassing 0s in binary strings of odd length

Let $A(k)$ be the number of distinct binary strings of length $2k+1,$ for which the number of $1$s surpasses the number of $0$s for the first time at digit number $2k +1$, i.e., in the final digit in ...
0
votes
1answer
33 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 ...
0
votes
1answer
85 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
0answers
147 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 ...
0
votes
0answers
40 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 ...
0
votes
2answers
235 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 = ...
0
votes
3answers
9k 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
97 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 ...
0
votes
1answer
115 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?
0
votes
1answer
3k views

How to find the number of binary relations? [duplicate]

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 ...
-5
votes
4answers
7k 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 = ~ ??? $