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

learn more… | top users | synonyms

0
votes
1answer
24 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
2answers
32 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
22 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
19 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
48 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 ...
1
vote
1answer
52 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, ...
6
votes
1answer
64 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 ...
0
votes
1answer
19 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 ...
0
votes
1answer
22 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
2answers
2k views

binary representation of a fraction in two's complement

Could any one please explain what is a 16-bit two's-complement representation of -0.375 and the steps to calculate it? Also, what happens if I convert it back to decimal? Thanks
0
votes
1answer
20 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
2answers
41 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
0answers
37 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 ...
1
vote
1answer
401 views

The maximum number of digits in binary multiplication

Given 2 binary numbers of n digits. (n can be from 1 to something large) What is the maximum number of digits of their product? I think it's 1 in 1-digit*1-digit, and 2n otherwise. But I want some ...
0
votes
1answer
16 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 ...
0
votes
2answers
46 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
31 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
508 views

Convert hexadecimal numbers to floating-point format using single-precision IEEE 754 format

I need help with converting hexadecimal numbers to floating-point format using single-precision IEEE 754 format. Hex numbers such as 312A. how do I go about converting it? I know how to convert from ...
1
vote
1answer
42 views

How Leibniz invented the Binary System?

Do you know which reasoning and observations made Leibniz invent the Binary system ? Some say that he was inspired by Chinese mathematicians do we have any record of how he came with this idea ?
2
votes
2answers
38 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
75 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 ...
0
votes
5answers
136 views

Why are sums of powers of 2 able to give all numbers?

It is known that If we sum up a combination of numbers that are positive powers of 2(starting from 0 to infinity), we can get any number possible. (Correct me if this is wrong). Can anyone ...
1
vote
1answer
44 views

External operation: binary and unary perhaps???

Consider the following examples from which some definitions are derived: Let us take an element from the set R of real numbers (say, the number 8) and another from the set L of lengths (say, 4m). ...
0
votes
1answer
42 views

Why is 2's complement called this way?

So, I'm preparing for a test and one of the preparation questions is as follows: I can tell easily that 'a' and 'e' are just wrong and therefore these answers are irrelevant, but taking a look at ...
2
votes
2answers
349 views

Counting binary strings that have atmost k consecutive 0's

I know how to count how many binary strings with length n and having exactly k 0's are there but i am not able to find a way to count the number of binary strings that have exactly x 0's and y 1's and ...
1
vote
1answer
26 views

Given two dot products with the same vector in a prime finite field of 2 (Galois Field), how can one figure out future dot products?

I've stumbled upon an interesting "rule" derivation for the value of a dot product in $\mathbb{R}^{n}$ like this: Given an arbitrary vector $\vec a \in \mathbb{R}^{n}$ and the values of two dot ...
0
votes
1answer
41 views

How many bits to represent this integer?

If $$x = \left(\frac{n+1}{4}\right)^{(n+1)/2},$$ then how many bits do we need to represent $x$ in binary?
1
vote
1answer
50 views

Binary Integer Programming

I need to form teams. There are 8 projects and 60 students. Each project has different requirements. For example, out of 5 total requirements, project 1 has 2 requirements: must have a programmer and ...
2
votes
3answers
64 views

Why does the division algorithm work for converting between number bases?

I know and have observed that the the division algorithm can be used to convert any number in the decimal system to the binary system. However, I have tried searching for an intuition of why this ...
0
votes
1answer
30 views

Algorithm for Converting Non-balanced Base-n to Balanced Base-n (for odd n)

Let $n \in 2 \mathbb{N} - 1$. I was wondering what sort of algorithms there are for converting (non-balanced) base-n to balanced base-n, where "balanced" is as is described in this article: ...
0
votes
0answers
18 views

Closest finite series representation of original number < 1

I have another question related to this Decompose negative power of ten in finite series. Suppose we have number $0.1$ decomposed in finite sum of two in negative power: $10^{-1} = 2^{-4} + 2^{-5} + ...
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 ...
4
votes
1answer
21 views

Number of ways to choose rows with inclusion condition

I have a large collection of lists consisting of 1's and 0's, each list the same length. I call each list a row. I want to know the number of ways to select rows such that their cumulative OR results ...
1
vote
3answers
91 views

Exponential generating function for the number of binary strings of length $n$

I know that the generating function of the sequence counting the number of binary strings of length $n$ is $e^{2x}$. But my book doesn't explain why this is the case. Could you give me a little more ...
1
vote
1answer
43 views

Given a binary number, how do we get the last decimal digit?

Given a binary representation of 25 i.e 11001, if I am interested only in the last decimal digit, how do I get it?
2
votes
1answer
14 views

Binary addition preserving Hamming weights

Let $x,y$ be two $n$-bit strings, with Hamming weights (number of $1$ bits) equal to $w_{1},w_{2}$, respectively. Let $z$ be the binary representation of the sum $x+y$, where we interpret $x$ and $y$ ...
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. ...
0
votes
3answers
30 views

binary representation of integers congruent 1 and 3 modulo 4

Let $k=b_nb_{n-1}\ldots b_3b_2b_1b_0$ be the binary representation of an odd positive integer. Prove: If $k\equiv 1 \mod 4$ then $b_1=0$. If $k\equiv 3 \mod 4$ then $b_1=1$. I think that to prove ...
0
votes
0answers
72 views

A binary plot of the Catalan numbers and the pseudo-Fibonacci series that can be found inside. Why do they appear?

I was trying to find in Internet a binary plot of the Catalan numbers, and I did not find anyone... so I did it by myself and here it is (about 2000 elements): There are not clear patterns inside ...
1
vote
2answers
67 views

How many bit-flips are required to achieve random distribution?

If I have a binary number W bits wide, initially all set to zero, and I repeatedly pick a random bit and toggle it from zero to one or vice versa, how many times would I need to do this to achieve ...
0
votes
0answers
13 views

Using the algebraic expression ((x-2)+3) / ((2-(3+y))*(w-8)) show the results of performing a preorder, an inorder, and a postorder search.

Using the algebraic expression ((x-2)+3) / ((2-(3+y))*(w-8)) show the results of performing a preorder, an inorder, and a postorder search. Preorder is root, left, right. Inorder is left, root, ...
0
votes
0answers
23 views

Signed Number's Binary Addition

I'm going to discuss about Signed Number's Binary addition, I searched about it and even read books. Now I make little changes in it's logic and start my own logic to solve it. Let me show 4 bit ...
3
votes
5answers
147 views

Simplifying sum equation. (Solving max integer encoded by n bits)

Probably a lack of understanding of basic algebra. I can't get my head around why this sum to N equation simplifies to this much simpler form. $$ \sum_{i=0}^{n-2} 2^{-i+n-2} + 2^i = 2^n - 2 $$ ...
1
vote
3answers
660 views

Quick logarithm calculation

In coming up with an algorithm for finding log (10) base 2, these are my thoughts. I wanted to know if this makes sense and how could I truly make it more efficient. The requirements are strictly not ...
1
vote
1answer
42 views

Looking for expectation of the number of substrings

The question is formulated as follows: if we are given $n$ random binary strings of length $n$, what is the expectation of the number of substrings they have in common? Sounds pretty simple, but if ...
1
vote
1answer
24 views

Multiplication and binary xor

I have to prove one thing that combines logical xor and arithmetical sum of binary representation of some numbers. Could you direct me what can I read on this topic? Specifically, I need to prove ...
2
votes
1answer
22 views

What is the minimum length of maximal palindrome of a binary word of length $n$?

For example if we have $n=4$ then the minimum length of maximal palindrome is 2. Here are all four digit possible binary words along with their maximal palindromes: ...
1
vote
1answer
192 views

Can every periodic binary sequence be expressed as the output of a Linear or Non-Linear Feedback Shift Register?

Quick background: The output of a Linear Feedback Shift Register (LFSR) with length $n$ is a binary sequence which is periodic of length dividing $2^n-1$. From a mathematical point of view, such a ...
2
votes
3answers
197 views

What is the last digit? [closed]

Consider all 100 digit numbers, i.e., those between $0$ and $10^{100} - 1$ (inclusive). For each number, take the product of non-zero digits (treat the product of digits of $0$ as $1$) , and sum ...
0
votes
2answers
30 views

How many bytes with this configuration given in bits?

If the maximum number of bits of certain field is set to be 10 bits max. How many bytes can be set within this limitation? The solution of such a problem suggests number of bytes ranged is 1023. Can ...