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

learn more… | top users | synonyms

15
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
161 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
488 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
508 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
414 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.
5
votes
10answers
597 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
72 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
51 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
286 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
49 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
101 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
95 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
71 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 ...
0
votes
3answers
83 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
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 ...
4
votes
3answers
378 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
14k 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
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. ...
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 ...
3
votes
1answer
314 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
207 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
99 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$ ...
3
votes
0answers
126 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 ...
1
vote
0answers
154 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
0answers
135 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
35 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
192 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
7k 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
93 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
106 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
2k 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
6k 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 = ~ ??? $