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
24 views

nomenclature: binary prefix words and inverses

Are there any (formal or informal) words used describe the number/amount indicated by a binary prefix. For example, 3MV = 3 million volts. 3MiV = 3 [???] volts? Mimmilion? NOTE: Terms like this ...
0
votes
0answers
119 views

Binary counting problems

Recall that counting from 1 to n in binary takes $\Theta$(n) steps; i.e., the increment operation has constant amortized cost as opposed to $\Theta$(logn) in the worst-case. a) Analyze the amortized ...
3
votes
3answers
47 views

Bijection between $[0,1)$ and the space of binary sequences

My question deals with the problem of showing that the set $$ \Omega = \{ \omega \colon \omega =(a_1,a_2, \ldots ), a_i =0,1\} $$ has the same cardinality as the interval $[0,1)$. In a textbook I read ...
0
votes
0answers
25 views

chi square for binary set

This should be fairly simple but I am having a difficulty understanding how the distribution tableworks. I am trying to make a java implementation of the chi-square function for binary data. I want ...
0
votes
1answer
20 views

Radix conversion issue

I have a funny radix conversion problem. I'm programming in a language called Solidity. It's very primitive and doesn't have many of the standard string and math operators that you'd expect in other ...
0
votes
0answers
7 views

Is it possible to write any binary string as the xor of a purposely choose subset of all the strings of the same length?

Given L to be the length of a string of zeros and ones, And defining f(n) as: If n is grater than zero f(n) is a string of length L, on which the first digit is one, followed by n-1 zeros, than a ...
1
vote
1answer
24 views

Binary string function with unique one-counting prefixes

I'm looking for a partial function $f$ from binary strings to natural numbers such that the following holds ($x$ and $y$ always represent binary strings, $\epsilon$ is the empty string, $H(x)$ is the ...
0
votes
0answers
23 views

Conditionals without use of binary variables

I would like a linear programming expression that has to satisfy certain criteria without the use of binary variables. i.e.: Let 0 <= B <= C However, if ...
3
votes
2answers
489 views

Longest sequence of 1s in binary representation of a number & Average Sequence length for number with N digits

I originally posted this to rec.puzzles in October 1992. I subsequently solved the problem (at least I think I did...) and published an article about it in early 1993. The article is nowhere to be ...
-5
votes
1answer
34 views

list of all 256 binary combinations of 8 digits? [closed]

i don't have any coding/java etc software. how can i view all the 256 binary combinatios from 8 digits? can someone tell me where can i find them in a list (any site/online generator etc) or copy them ...
1
vote
3answers
69 views

Odd and even numbers in binary system

Actually here is a basic question, but i have a little problem about it. In binary system, for any number such as 1011001, can we say directly "it is end with 1, so it is an odd number"?, or firstly ...
1
vote
2answers
1k views

Formula for binary sequences of length m with no n consecutive 1s?

Formula for binary sequences of length $m$ with no $n$ consecutive $1$s? I know The number of binary strings of length $m$ without consecutive $1$s is the Fibonacci number $F_{m+2}$. But how about ...
2
votes
2answers
76 views

References to these functions relating to binary trees and binary digit counting?

Consider a perfect binary tree with $2^N-1$ elements. Two different numbering methods pop up constantly. For example, for $N=3$: I have worked out the mapping between these (for $ 1 \le k, i \lt ...
0
votes
1answer
22 views

Proving the Binary Relation is an Equivalence Relation

Let $R$ be a binary relation on a set A and suppose R is symmetric and transitive. Prove the following: If for every $x$ in $A$ there is a $y$ in $A$ such that $x R y$, then $R$ is an equivalence ...
0
votes
0answers
16 views

How to find the minimum index value of a binary variable for which the value is one?

Let $Y_{i,j,k}$ be a binary variable, $X_{i,k}$ be a continuous variable and $Z_{j,k}$ is a constant. 1)For every $i,k$ need to find the minimum $j'$ such that $Y_{i,j',k} = 1$. 2)For every $i,j',k$ ...
0
votes
0answers
16 views

Estimating expected value of a missing parameter in data

I'm trying to run an EM algorithm on a Bernoulli dataset with missing values, and am unsure how to tabulate rows with missing data. Would a missing value count towards both the probability of the ...
0
votes
1answer
28 views

Decompose binary into decimal units, tens and hundreds

I have a 9 bit binary sequence (from 0 0000 0000 to 1 1111 1111) and I'd like to decompose into decimal units, tens and hundreds. Consider the following: 0 0111 1011 ==> 123 I'd like to ...
0
votes
0answers
13 views

Multiplication on a 2's complement with decimal point number

I have a fixed point which is limited to: '_ _ _ _ _ _ _ _ _ . _ _ _ _' And the 2's complement number I have is: 110110111.1101, which in decimal is -72.1875. I had a question on what the 2's ...
0
votes
1answer
58 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. ...
-2
votes
1answer
30 views

How to subtract fractional numbers using complements.

I know how $10$'s and $9$'s complements are used, but I don't know how to use complements to subtract two fractional numbers. For example $108.32-26.30$ . How will we solve it using $10$'s and $9$'s ...
6
votes
2answers
596 views

Why does the $2$'s and $1$'s complement subtraction works?

The algorithm for $2$'s complement and $1$'s complement subtraction is tad simple: $1.$ Find the $1$'s or $2$'s complement of the subtrahend. $2.$ Add it with minuend. $3.$ If there is ...
0
votes
0answers
17 views

Encoding and decoding with bitwise XOR and Shifts

This answer may exist somewhere already but if it does I've had trouble finding it. This is based on the problem from a programming site here $$encoded\_value(x) = { x \oplus (x<<1)|x, ...
3
votes
4answers
57 views

Are all binary sequences that terminate with $0$s countable?

Consider a subset of binary sequences that contains all binary sequences that terminate with a $0$. For example, $001000...$ and $111100000...$. Is this set countable? I think it is not because the ...
1
vote
3answers
35 views

Fraction of length-$n$ binary numbers satisfying a constraint

Problem: Derive an expression for the fraction of length-$n$ binary numbers that do not contain the subsequence $010$. Background: The total number of $n$-bit binary numbers is of course $2^n$. ...
0
votes
0answers
50 views

Exhaustive path through 2^n bit configurations

There's a little play by Samuel Beckett called 'Quad' that consists of nothing else than 4 characters walking on and off stage, one at a time. No two actors leave/enter simultaneously, so only one ...
-3
votes
3answers
81 views

Why Do we reverse the order of digits to get binary number from decimal number [closed]

I know how we get binary numbers from decimal using repeats of division until quotients is 1.But i want to know more on why do we reverse the order of digits to get binary number from decimal number? ...
11
votes
2answers
2k views

Why are binary numbers ordered the way they are? [duplicate]

Counting to 7 in binary looks like this: 0 1 10 11 100 101 110 111 The highest value is always to the left. But would it make more sense to to it like this? Is there a way that this was picked, or ...
2
votes
1answer
38 views

Does this rule eventually lead to $0^n1^n$

If you're given a binary string of the form $a_1a_2\ldots a_n \overline {a_1a_2\ldots a_n}$, will the following rule applied a finite number eventually lead to the string $0^n1^n$ where exponentiation ...
0
votes
1answer
61 views

Binary to Gray code using XOR boolean expressions

I have a question which asks to design a circuit to convert from binary to gray code, using a boolean expression. Now I understand you have to use XOR to achieve this. And I understand that XOR ...
0
votes
1answer
17 views

Write negative decimal in binary(octal etc..) by hand

How do I convert a negative decimal number into other systems(binary, octal)? I got the decimal numbers: -22,5 , -60 and 166. I have to convert them to binary(16 bit) and octal(by hand). I know the ...
0
votes
1answer
57 views

Convert hexadecimal to binary scientific notation using IEEE 754 single-precision floating point

I am trying to convert these numbers to binary scientific notation, but I cannot figure out the process. Could someone please the process of going about solving this? For IEEE 754 single precision ...
0
votes
1answer
28 views

convert Hex value to two's Complement

for example, let's say: 0xE5 assume the system is 8 -bit in decimal it's = 229 and in Binary it's = 1110 0101 the Two's Complement rules said: sign-bit, which's the most left, indicates a negative ...
0
votes
2answers
36 views

Binary arithmetic - overflow and carryout at same time?

In binary arithmetic, When you subtract 2 signed numbers you must discard the carry out. My question is, is it possible for overflow to occur and a carry out? So, on paper there would be two extra ...
0
votes
2answers
61 views

What points in $[0,1)$ will have two binary expansions?

What points in $[0,1)$ will have two binary expansions? I know that $\frac{1}{2}$ has the two expansions $0.1\bar{0}$ and $0.0\bar{1}$ $0.1\bar{0}$ is found by starting with $\frac{1}{2}$ and ...
0
votes
2answers
17 views

Take binary expansion and convert it to fraction

I know how to take a fraction and get it's binary expansion. For example, $\frac{1}{5}$ would go like so: $\frac{1}{5} \cdot 2 = \frac{2}{5} \rightarrow 0$ $\frac{2}{5} \cdot 2 = \frac{4}{5} ...
0
votes
1answer
29 views

how to convert decimal with scientefic notation , to binary?

I have number -1e35 , and i am supposed to convert it to binary . the answer is : -1.10101001010110100101101...e–117 . I can't figure out how to get this ! and how we can calculate numbers partially ...
0
votes
1answer
54 views

Probability of Binary Word Matching

Thanks for reading. Would be lovely if somebody could help me out on this (but not just post the answer) but also how you got there. I'm a programmer and I've ran across this problem which I can't ...
0
votes
0answers
14 views

Can $1.0*2^{-1}$ and $1.1*2^0$ both equal -0.5 in twos complement?

I am happy that if you write -0.5 in binary as -0.1 and then convert to twos-complement you get 1.1. You can read that as $-1+1/2=-1/2$. However if you use standard form and write $0.5_{10}$ as ...
3
votes
1answer
48 views

Proof that max value of $n$-bit binary number is $2^n - 1$

After reading this programming question , I wanted to prove the assertion. I'm wondering whether the below would be considered a complete and clear proof. Claim: $\sum_{i=0}^{n-1} 2^i = 2^n - 1.$ ...
1
vote
0answers
58 views

Name of this formula or more explantation of the proof?

I have found this formula which is a combinatorial identity for counting binary words. I'd like more information on it, or the name of the proof. I am also not totally clear on the step between the ...
0
votes
0answers
20 views

Floating point binary to half precision floating point

I am trying to convert to $16$ bit half precision floating point however I ran into a possible error and am unsure if a negative exponent is ok. I am trying to convert $0010011100010000$ I separate ...
1
vote
1answer
38 views

Show that every number $a$ can be shown in the following form: $a=\sum_{i=1}^{k}2^{x_i}\cdot 3^{y_i}$

Show that every integer $a>0$ can be shown in the form: $$a=\sum_{i=1}^{k}2^{x_i}\cdot 3^{y_i}$$ where $0\le x_1< x_2< \dots < x_k$ and $0\le y_k < y_{k-1} < \dots < y_1$ are ...
0
votes
2answers
47 views

With 8 bits is it possible to obtain an integer in more than one way? [duplicate]

This is just a curiosity that just came to my mind while thinking at IP addresses. A byte is composed of 8 bits. A bit can either be $0$ or $1$. IPv4 addresses are composed of a group of 4 bytes. ...
-4
votes
3answers
59 views

why $10$ in any base number system written as $10?$

I am a student trying to write an article in number system can same one give me an idea why $10$ in any base number system written as $10$ $?$
0
votes
1answer
21 views

Binary to Decimal Right of The Binary Point

I need to convert 10000000110.011 to decimal. The first part I fully understand, 2^10 + 2^2 + 2^1 = 1030. Wolfram Alpha confirmed that 1030 is correct. But for the right of the binary point, WA gives ...
0
votes
1answer
37 views

How many combinations have the same amount of ones and zeros?

In an even n digit binary number, how do you calculate the number of combinations that have the same number of ones and zeros.
3
votes
2answers
92 views

Powers of 10 written as binary numbers

Consider powers of 10 written as binary numbers. 10 = 1010 , 100 = 1100100 , 1000 = 1111101000 How can I find a formula for the number of zeroes between the last and the second last 1?
0
votes
1answer
19 views

decimal to binary conversion of recurring decimal numbers in matlab

I have made a function convert fractional part of a decimal number to binary, the code is given below: ...
1
vote
2answers
54 views

Subtracting Binary Numbers with one and two's complement

An example: $01001 - 11010 = -10001 = -17$ one's complement: $00101$ two's complement: $00110$ so the above statement should evaluate the same as: $01001 + 00101 = 01110$ (inverting it) $= 10001$ ...
0
votes
2answers
24 views

why shifting left 1 bit is the same as multiply the number by 2

I have recently faced a problem .The problem is here.We know that if we represent a decimal number in binary and move left all the bits by one. The left most bit is lost! and at the rightmost, a zero ...