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

Binary arithmatic. Overflow, carry, Zero flags

I am abit confused on how the binary arithmetic works. I though i got it right but after encountering this question i feel like i am wrong. ...
0
votes
1answer
88 views

Permutation and combination and binary numbers

what is the sum(in base 10) of all natural numbers less than 64 which have exactly three ones in their base 2 representation. answer given -630 I just need a starting point like from where should I ...
0
votes
1answer
37 views

$\lfloor\log_2(x)\rfloor + 1 \ \neq \lceil\log_2(x)\rceil?$

Is there any case where $$\lfloor\log_2(x)\rfloor + 1 \ \neq \lceil\log_2(x)\rceil ?$$ I'm in discrete mathematics, and my teacher stated the former formula to be finding how many bits are needed ...
1
vote
1answer
47 views

The limit points of a subset of binary space with ultra metric

let $Z$ be the subset of binary space $B$ consisting of all points that are eventually $0$. Then what is set of all limit points of $Z$. Binary Space $(B,d)$ is a metric space as follows. Let $BB$ be ...
0
votes
3answers
42 views

Determine if the solution to a division is odd or even

Is there a way to quickly determine if the solution to a division operation will be odd or even? I need a quick way determine that in a program. Doing a complete a complete division takes up too much ...
2
votes
1answer
26 views

Binary dividing with a remainder

How much is $\frac{101000}{1001}$ in binary? I checked in 3 sites, each displayed another result. The result I get is 100 with a reminder of 100. Can you please try and solve it and show how you did? ...
0
votes
0answers
26 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 ...
1
vote
0answers
81 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 ...
1
vote
0answers
14 views

solution of equations with inter-dependent variables.

Suppose I have few equations of the form a12*x+a13*y+a14*z+a15*xy+a16*xz+a17*yz=d1 In short I have n free variables and other (n choose 2) dependent variables. ...
-1
votes
1answer
54 views

The set of all limit points of a binary space with ultra metric

Binary Space (B,d) is a metric space as follows. Let BB be the set of all infinite sequences of 0's and 1's. That is, points of B are of the form x=(x1,x2,x3,…), where xi=0 or 1 for every i=1,2,3,…. ...
3
votes
4answers
2k views

Why b%2==1 implies that rightmost digit of b in binary form is 1

How one can deduce that if b is any number and if b%2==1 then rightmost digit of b in binary form will be 1 without checking it manualy
0
votes
0answers
51 views

Ones and twos complement on hexadecimal numbers?

I have a question as below: Give the data representation of each of the following integers assuming 16 bits and each of the representations of sign and magnitude, one’s complement, and two’s ...
3
votes
3answers
84 views

How many numbers are in this set?

Let M a positive integer is called “Minos” if in its binary representation, any two consecutive appearance of digit 1 are separated by 2 or more 0. Example 36= 100100 (binary) is “Minos” number, but ...
3
votes
1answer
155 views

What are the three different ways negative numbers can be represented in Binary?

I am new to Binary and we are learning it for my computer hardware class. Since I am just learning, I am not very sure how to represent negative numbers in binary. I believe they are Signed ...
0
votes
1answer
89 views

A nice form of a given function

First let, $\oplus(a_1,a_2,\ldots,a_n)$ denote the bitwise xor of $a_1,a_2,\ldots,a_n$. Define the function $\Delta(a_1,a_2,\ldots,a_n)$ to be the maximum value of $a_i - ...
0
votes
0answers
14 views

Multiplying numbers in two's complement

I have 2 numbers, both in two's complement form. The problem is 101011 x 100111. I already sign extended the multiplicand to 2n bits, making it 111111101011. I arrived at my answer, 110100001101 which ...
1
vote
1answer
21 views

Integer division and modulo by $\mathbb{2^n-1}$

Dividing an integer number $k$ by $2^n$ (i.e., computing $\lfloor k/(2^n)\rfloor$) is easy: it is just equivalent to bitshifting $k$ by $n$ binary places, therefore removing the last $n$ binary digits ...
2
votes
1answer
35 views

Decimal Number to Octal

I have the number $9243$ In Decimal (Base 10), I'm trying to convert it to octal and then Binary. What I've done is (r IS THE REMAINDER) $4096 | 9243| 2$ $ R = 1051$ $512|1051| 2$ $r = 27$ ...
1
vote
0answers
22 views

Binary operations and proofs

$\text{binary}(a)$ = binary representation of a base 10 number $a$ Are the following statements correct? If yes, where can I find the proofs? (1) $\text{binary}(a\times b)=\text{binary}(a)\times ...
0
votes
1answer
28 views

Proof of function that gives 1's in binary representation

There is an older question here that asks about the function $f(n)$ that gives the number of 1's in the binary representation of $n$. Stated in an equivalent way, this function is: $f(n) = ...
0
votes
0answers
26 views

is the Root of a binary Tree counted as a node

I am working on this Homework questions and there's one thing I can't seem to understand. We are trying to proof using structural induction that some elements in T hold for the following statement ...
0
votes
1answer
28 views

Converting from Binary to Decimal help?

Can anyone help me solve this? Converting to decimal from binary that is signed...so also using twos-compliment. ...
0
votes
0answers
19 views

Questions about this type of problem

Problem Consider the general chip-and-be-conquered recurrence relation: $T(n) = b_1T(n - 1) + b_2T(n - 2) + ... + b_kT(n - k) + f(n)$; for $n >= k$ for some constant $k >= 2$. The ...
0
votes
1answer
44 views

How would one go about solving these types of problems?

I'm totally lost. All I know is it has to do with binary trees and may need to be solved using induction. Show that every 2-tree with $n$ internal nodes has $n + 1$ external nodes. Show that the ...
2
votes
1answer
60 views

What was the original purpose for the binary system?

Obviously computers weren't around when binary was first created... was there a particular use for binary back then or was it just developed as another number system?
0
votes
1answer
54 views

Is this sum of Binary Numbers an Overflow?

I have a question of the likes of 21 + 11 I converted each number to binary getting: 010101 + 001011 I got a result of : $100000$ which is $32$ in decimal Thus it is correct that $21+11 = 32$. ...
2
votes
1answer
40 views

Decimal - Binary

Let N = 1 000 … 000 1 (n zeros), and M = 111 … 1110 (n ones). What is the decimal value of M and N assuming: a) Unsigned Binary Representation b) Two's compliment Representation c) Signed/Magnitude ...
0
votes
2answers
24 views

How many binary numbers can be represented with X number of number places?

How do we find out that in the binary number system, how many different numbers can be represented with a certain number of number-places? For example, suppose we have 8 number places, i.e. a 1's ...
0
votes
1answer
48 views

Binary expansion and bijection

Using the idea of binary expansion ($1011$ is $1\cdot2^0 + 1\cdot2^1+0\cdot2^2+1\cdot2^3 = 11$) to find a bijection that (a) maps $\mathbb{N}$ to the set of all finite subsets of $\mathbb{N}$ (b) ...
1
vote
1answer
45 views

Decoding BCH codes with permuted parity-check matrix

A normal t-error correcting $BCH(n,k)$ code over $GF(2^m)$ would be constructed using a generator polynomial g(x), which is the LCM of the minimal polynomials of $a,a^2,..a^{2t}$, with $a$ being a ...
0
votes
0answers
30 views

Operations on binary numbers, that have equal numbers of two available digits, that preserve this property?

I'm looking for operations on binary numbers that have the same number of the available digits, $0$ and $1$, such as $100011$, $100101$ and $10$. These could be integers as the examples given are, or ...
1
vote
1answer
51 views

Expected number of evaluated nodes

I have an array of zeroes with a length of $1024$. Suppose $n$ random elements are changed to $1$, the array now has $(1024-n)$ zeroes and $n$ ones. I want to find the position of all $n$ elements ...
4
votes
2answers
105 views

Switch flipping sequence with no repeats

Okay, you have N switches. They are all off. You may flip one switch at a time. You must visit each possible state of switches being flipped without repeating any state. At the end, you must be ...
1
vote
1answer
94 views

Find a recursive definition for inorder: binary Tree(T) → list(T ) where inorder(T ) is the list of nodes from an inorder traversal of T .

Find a recursive definition for inorder: binary Tree(T) → list(T ) where inorder(T ) is the list of nodes from an inorder traversal of T . I have no idea what this question is even asking me. What ...
1
vote
1answer
151 views

Converting a negative decimal with fractions to binary and hex

I am asking the question even though it has been answered before because I am looking at 3 different pages with 3 different answers right now. I am wondering how to convert a negative decimal with a ...
-1
votes
1answer
213 views

orthogonal binary sequences

How to show that two binary sequences are orthogonal? For an example verify whether [0110001] and [0011101] are orthogonal
2
votes
1answer
121 views

Combinatorics - Counting the number of binary strings with specified length and sum, with substring constraints

Suppose I have a string of bits of length R. The sum of the bits must be equal to S, so there are S ones and R-S zeros. The longest string of ones cannot exceed X in length. Also the number of places ...
6
votes
1answer
81 views

Tzaloa 2015 game problem (piles with $1,2,4 \dots 2^{19}$ coins each)

We have $20$ piles with $1,2,4,8\dots 2^{19}$ coins repectively and two players. In each turn a player must select five piles that have at least one coin and remove exactly one coin from each. Player ...
2
votes
1answer
108 views

Whether a real number is a dyadic rational iff its binary expansion terminates?

In self-studying a textbook on computability theory, I found that many of the exercises depend on the following factlet: A dyadic rational is a rational number whose denominator is a power of two, ...
0
votes
1answer
29 views

inference of causality for binary variables

Let's say that a data set has N random binary variables Xi and we want to infer which of these variables have a causal relationship with X1. The following table would describe the data, where each ...
1
vote
2answers
422 views

How would I convert a long decimal to binary without using a calculator?

I am aware that you can keep dividing a decimal number by two, finding the remainders in the process, in order to convert the number to binary. However, when I am working with a long decimal number ...
0
votes
1answer
26 views

Could you explain this signed fixed point number equation?

How do I interpret this equation? Decimal value of signed fixed point number: $$V=(-1)^{b_{N-1}}\times 2^{N-P-1}+\sum_{i=0}^{N-2}(b_i\times 2^i)\times 2^{-P}$$ Original picture $N$ is ...
0
votes
1answer
209 views

signed 2's complement of 4-bit binary numbers

In signed 2's complement representation of 4-bit positive binary numbers are: 0000 -> +0 0001 -> +1 0010 -> +2 .... 0111 -> +7 Negative binary numbers(from -1 to -7) are obtained by taking ...
0
votes
0answers
66 views

minimum number of leaves in a perfect binary tree

I'm trying to prove that the number of leaves in a perfect binary tree is at least H+1 where H is the height of the tree. This is what I've done up til now: No of leaves at height $H = 2^H$ Base ...
0
votes
2answers
58 views

A function for decimal to binary conversion

I want to convert a decimal (base 10) number to its binary (base 10) equivalent. The binary string has to be of infinite length. Is any of the following functions correct for non-negative integers ...
0
votes
2answers
145 views

When decoding a block code, how do you know which error a syndrome corresponds to?

I'm working with forward error correcting block codes such as Hamming(7,4) and Golay(23,12). I'm quite new to this field, so there are some things that I don't yet understand. I chose these codes ...
0
votes
1answer
226 views

Converting decimal fractions to binary

I know that if we multiply the fraction by 2 repetitively and take out the integer part every time, we will get the binary form. But why does this method work? Why should we multiply by 2 for the ...
0
votes
1answer
50 views

Binary tree node value by level

How can I calculate the value of given node level, for example: (let's use this image I found on Google Images and invert the level: starting at bottom 0..1..2..3..4) Knowing that each node pays ...
1
vote
2answers
158 views

Binary expansion, finding the greatest power of $2$ less than a given number

I'm looking to better understand binary for a CS50 problem set. I'm not understanding transferring decimal notation to binary. For example, use 237. How to find the largest power of $2$ less than ...
1
vote
3answers
123 views

Probability that two numbers differ by one bit

Assuming that t is the bit length of the numbers and that we can pick 2 random numbers (the same number cannot be chosen twice), which is the probability that the two numbers will differ by exactly ...