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

learn more… | top users | synonyms

1
vote
2answers
322 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
1answer
46 views

Dyadic rationals representation in the computer memory.

So I know what a dyadic rational is and that is represented with a finite number of binary digits in memory. The idea is that I want an explanation why is it represented in this way ? Thank you.
0
votes
1answer
108 views

binary division and remainder

Q=A/B , Q is a real number expressed as a pair of 8 bits: most significant 8 bits for the integer part least significant 8 bits for the fractional part the number is unsigned for example: 0 0 1 ...
1
vote
2answers
50 views

Binary Numbers system for Programming

So, the maximum number 1 byte (8 bits) can have is 255, so does that mean 255 combinations of 0 & 1 in the 8 places?
1
vote
2answers
117 views

Arithmetic operation of binary numbers - Is my answer correct?

Does the arithmetic operation - 102 (base 10)- 39 (base 10), represented in 8-bit, when converted to binary have an overflow or underflow? My Ans - It has no problem. I mean there is neither ...
2
votes
2answers
341 views

Hexadecimal to Octal and Vice Versa

Convert Hexadecimal number to Octal - $(FD56.52A)_{16}$ to octal My answer - $(176526.2452)_8$ Convert Octal to Hexadecimal $(37.27)_8$ My answer - $(1F.5C)_{16}$. Correct or incorrect? Please ...
0
votes
1answer
85 views

Inserting values left to right in a binary search tree

What does it mean to build a binary search tree by inserting values from left to right starting from an empty tree? The "left to right" part confuses me..I know how to build one by normally inserting ...
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
149 views

running time of a multiplication algorithm

Here is a multiplication algorithm: given inputs x and y, add x to itself y - 1 times: z = 0 while y > 0: z = z + x y = y - 1 return z What is the running time of this algorithm? Is it ...
0
votes
1answer
54 views

consider the following subroutine, what is the running time

Suppose A(.) is a subroutine that takes as input a number in binary, and takes time O($n^2$), where n is the length (in bits) of the number. (a) Consider the following piece of code, which starts ...
0
votes
2answers
39 views

how long does this subroutine and loop take

Suppose A(.) is a subroutine that takes as input a number in binary, and takes linear time (that is, O(n), where n is the length (in bits) of the number). Consider the following piece of code, which ...
5
votes
1answer
175 views

Efficient division using binary math

I'm writing code for an FPGA and I need to divide a number by $1.024$. I could use floating and/or fixed point and instantiate a multiplier but I would like to see if I could do this multiplication ...
0
votes
2answers
84 views

Why the binary division of the two has the same quotent

I am trying to divide 110000 with 1101 in binary (long division). I use XOR each time. The divisions above should have quotent 100. However I might must misunderstood something. Could please anyone ...
0
votes
2answers
881 views

Arithmetic Overflow and Underflowing

I am a bit unclear about underflowing in terms of binary representation. Let's say that an unsigned 8-bit variable gets overflown from the addition of $150+150$. A signed 8-bit variable gets ...
0
votes
2answers
125 views

fill-in-the-blank induction proof

I'm stuck at homework task I'm working on. I would really appreciate some help. Here is the task: Let $f$ be a function on binary numbers defined recursively as follows. $f(0) = 1$ and ...
3
votes
2answers
162 views

Finite bit strings that do not contain '$00$'

I am studying for an exam and I am having trouble with this practice question: In this question, we consider finite bit strings that do not contain $00$. Examples of such bitstrings are $0101010101$ ...
1
vote
4answers
133 views

17539 decimal to binary not getting the same result

I'm trying to convert 17539 to binary. My math says its 110000010010001, but online calculators like this and this say it equals to 100010010000011. Who is making something wrong.
1
vote
4answers
619 views

How many bitstrings of length n contain an equal number of zeros and ones?

How many bitstrings of length n contain an equal number of zeros and ones? Progress Does $n!/2$ work as a solution since we know $n$ is even? For example, 000111 rearranged, $6!/2$? What ...
0
votes
2answers
629 views

creating a Binary tree based on a prefix expression

I want to find the value of a the prefix expression -/+8,10,2*3,2 and build its binary tree I am trying to learn this for a math course, but have absolutely no clue ...
3
votes
1answer
78 views

comparing bit lengths of binary numbers

Suppose I have two binary numbers x and y that have bit lengths of nx and ...
2
votes
2answers
167 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 ...
0
votes
1answer
75 views

Implement a 1-bit adder.

The truth table is: A B Sum 0 0 0 0 1 1 1 0 1 1 1 0 So no carry. Is this correct?
1
vote
0answers
70 views

Probability of getting a Column full rank binary matrix

Suppose I have a $m \times n$ ($m>>n$) zero matrix (all of the elements are $0$). I want to flip $k$ ($k \ge n$ and can be controlled by the user) elements of the matrix randomly. After this ...
0
votes
2answers
124 views

Simplex and mathematical models: Truncating expresion to 0 if negative

Is there a simplex compatible way to model an expression that "truncates" (sorry for not finding a better word for it) the value to 0 if it turns negative? I have the following restrictions: ...
0
votes
5answers
84 views

Converting Hexadecimals

I need help converting Hexadecimals. How do I go about converting something like E0D base 16 to decimal? How about to binary?
1
vote
1answer
321 views

Binary relation composition (with itself)

To start off on the right foot. I've read: Relations (Binary) - Composition but I still can't really figure it out because those deal with finite sets. I have a infinite set: $R= \{(n,n+2)|n \in ...
0
votes
1answer
178 views

Complement Calculations - Why do I get different answers with ones' and twos' complement?

I am finishing an assignment related to complement calculations. The question is as follows: ...
0
votes
1answer
758 views

Add Hexadecimal that is in 2's complement.

Perform the following additions. The corresponding 16-bit binary numbers are in 2's complement notation. Provide your answers in hexadecimal. I'm not sure about this one, am I doing the 2's ...
4
votes
1answer
56 views

How many bits in position i are turned on in a list of values 0-N?

Is there an equation that reflects how many values have a bit in position $i$ turned on for a list of values $0-N$?. For example if $N=5$, our numbers are represented in binary as: 000, 001, 010, ...
0
votes
0answers
48 views

Probability, linear independence and study of variant of Lights Out

Using Arduino, some leds and pushbuttons I've created a simple variant of the mathematically popular game "Lights Out". In my variant, the starting configuration is always all lights on; what changes ...
0
votes
1answer
107 views

What is the significance of the last two digits of a 2's complement number being 00?

What is the significance of the last two digits of a 2's complement number being 00? The first part of this question is what is the significance of the last digit being 0? I said that the digit ...
0
votes
1answer
760 views

Write the 6-bit 2's compliment representation of -32.

Write the 6-bit 2's compliment representation of -32. I think the answer is supposed to be something like "overflow" or some error. Because 32 in binary would be 10 0000, right? And -32 would be ...
1
vote
1answer
255 views

Range two's complement

The most used formula's to calculate the range of numbers in a two's complement system are + $2^{n-1}-1$ for the highest number and $-2^{n-1}$ for the lowest number. The problem is that this only ...
1
vote
1answer
91 views

Signed binary arithmetic

I'm having trouble with a fairly simply concept, signed binary arithmetic. I know how to do 1's and 2's complement, convert from binary, decimal, octal, and hex, multiply and add bytes and bits, but ...
1
vote
1answer
35 views

Question on irreducible polynomials and primes.

Consider the polynomial $p(x) = 1+\sum_{i=1}^d a_i x^i$ where $a_i$ is binary and not all $a_i$ are $0$. Is it possible that $p(2^n)$ is prime for all integer $n>-1 ?$
3
votes
1answer
67 views

How to take one's complement of a positive integer?

Of course we can do that by converting the number to binary and then converting it back to decimal, but to do that directly in decimal?
0
votes
2answers
63 views

Number of ones to the left of every zero in binary representation

I am seeking the computationally fastest way to determine the total number of ones to the left of every zero in the binary representation of a number. That is: for every zero, count the number of ...
4
votes
3answers
292 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 ...
1
vote
1answer
509 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
2answers
534 views

Why should we append zeros during CRC calculation?

Say we have M as message bits , why do we need to append r-zeros to M message bits before performing the division to obtain r-bit checksum. Why don't we directly perform the division on the M message ...
1
vote
0answers
222 views

Recurrent relation for number of ways to get a balanced n-binary tree

In answering a question related to binary trees, I came up with the following recurrent relation: Base cases: $$ f \left (1 \right ) = 1 $$ $$ f \left (2 \right ) = 2 $$ Recurrent relations: $$ f(n) ...
0
votes
4answers
3k 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$$ $$.$$ ...
1
vote
2answers
164 views

Binary to Decimal

Is it possible to convert a binary pattern to decimal pattern consists of 0's and 1's without loop (iterations). Suppose if I have. ...
7
votes
1answer
119 views

Matrix + combinatorial or conditional probability: bit patterns

I'm trying to get my head around a problem, and it's not working. The problem: consider an NxN matrix that represents a binary number. For instance, a 4x4 matrix is a 16 bit number, a 6x6 matrix is ...
1
vote
1answer
199 views

Find the largest divisor of an integer $b$.

I want to find out an efficient method to calculate the largest divisor of a very big integer $b$ which can be up to $\large 2^{1000}$. That is, I want to find out an integer $a < b$, such that ...
0
votes
1answer
35 views

Relation on $n$-digit binary strings…

Let $X$ be the set of all $7$-digit bit strings 0100011, and let two elements in $X$ be related if the first and last bit matches. How many equivalence classes are there? Further, how many ...
2
votes
1answer
100 views

number of binary sets - combinatorics

Just ran into this question: let $f(n,m)$ be the number of binary strings where there are at most $n$ 1's and at most $m$ 0's. the empty string also counts as a string. show that ...
0
votes
1answer
129 views

Simplifying the Boolean binary equation

A'B + A'B'C + ABC'C' + AB' + AB'C' I need to simplify this boolean equation in simplest form but im not sure of my answer.
1
vote
2answers
1k views

Maximum run of zeros in a $n$-bit binary string

I came to know that, in a random string, one expects the longest sequence of zeros to be roughly of length $\log n$. I want to be able to prove this. For this I need to know the probability that the ...
4
votes
3answers
262 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 ...