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
6k views

Modulo 2 binary division (XOR not subtracting) method

I have attached an image showing a Modulo 2 binary division. I can roughly understand the working below which is using XOR calculation but I am not sure how the answer (in red) is being computed ...
3
votes
1answer
25 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 ...
4
votes
1answer
74 views

Disjoint subsets and Number of 1's in the binary representation

For a subset $S$ of $[n]$, let $\chi(S)$ denote the $n$ bit 'characterisitc vector' of $S$, i.e., $\chi(S)=(a_1, a_2, \ldots, a_n)$ where $a_i=1$ if $i \in S$ and $a_i=0 $ if $i \notin S$. Think of ...
-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 = ~ ??? $
-2
votes
0answers
22 views

Can anyone solve that binary conversion? [closed]

How to convert convert 100010010111 three decimal digit in the 84-2-1 code
6
votes
1answer
684 views

Finding the binary representation of the $n$th Fibonacci term

Objective: To find the binary representation ( or no. of 1's in binary representation) of nth term in Fibonacci sequence where n is of the order 10^6. My current approach: Find nth term (in decimal) ...
0
votes
2answers
24 views

Base-n arithmetic and multi-dimensional matrices

Interesting thing about binary numbers is to find their decimal value you can represent them as a multidimensional array, where each cell is indexed, starting from 0. For simplicity, let's start with ...
0
votes
0answers
11 views

Find minimum algorithm complexity

So, I have this task: Let us have square matrix $A \ size\ n\ \times\ n$ for which is true: $$A(k,l)<=A(m,p)\ if \ k <=m, l<=p$$ I need to find algorithm, which finds value X in such matrix, ...
0
votes
2answers
477 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 ...
0
votes
0answers
52 views

Looking for a best binary division tutorial

All I can found is such confusing "tutorials" like the below examples.. Even if i search it on Youtube, most videos are having dislikes and with short or unclear explanation. Is it a really hard ...
0
votes
0answers
18 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 ?
0
votes
3answers
47 views

Convert from binary to quinary

How to convert a number from binary to quinary system without using decimal system ? It is possible ? I want to write a program who does it.
10
votes
2answers
339 views

Sum of series with binary parity in the numerator

I'm now stuck with this question, and I don't even know where to start: Find sum of series$$\sum_1^\infty \frac{f(n)}{n(n+1)}$$, where f(n) - number of ones in binary representation of n. I wish I ...
-2
votes
2answers
133 views

Convert decimal to Binary Floating Point - 8 Bit [closed]

I am trying to convert +3.5 to binary floating point, but im struggling to find the exponent. (8 Bit) Where 1st bit is the Sign, 3 bits for Exponent and 4 bits for Mantissa. Hope somebody can explain ...
0
votes
0answers
18 views

Determining whether two trees are isomorphic

Is there a (probably recursive) algorithm that can be used to determine whether two not necessarily binary ordered (sub)trees are isomorphic or not?
0
votes
2answers
1k 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
2
votes
0answers
50 views

How to check quickly $\frac{2}{3}=.101010… $ holds?

Every $x \in [0, 1]$ can be expressed in the form $\dfrac{a_1}{2}+\dfrac{a_2}{2^2}+\dots + \dfrac{a_m}{2^m}+\dots$ , where each $a_i$ equals either $0$ or $1$. For such $x$, we have the binary ...
0
votes
1answer
309 views

Probability of a binary communication system

A binary communication system is used to send one of two messages: message A is a sequence of 0s with probability 2/3, message B is a sequence of 1s with probability 2/3, The ith received bit is ...
0
votes
3answers
27 views

modulus to find 10-bit samples in 8-bit memory

For one of my electronics projects I am using an EEPROM chip that holds up to 512k bits of information, arranged in 8-bit (1 Byte) address registers. Multiply 512 x 1024 and divide by 8 and you'll get ...
0
votes
0answers
11 views

Distribution of binary sequences?

I have two binary sequence and wanted to test if there is a similar patterns between the two. This is a completely new topic for me. Are there ways to define distribution of a binary sequence ...
0
votes
0answers
12 views

why use Unpacked BCD

I wonder why someone should ever use unpacked BCD, as packed BCD is a lot more compact, and you can also form each number. Is there a good reason to use it or not?
0
votes
0answers
23 views

What are the possible relations?

If there are two sets A and B. Set A has two elements so does Set B. How many different possible relations can we have from A to B. For example. Set A has (David, Max) and Set B has (x,y). Would the ...
1
vote
1answer
23 views

Why is the enumeration of binary strings misaligned?

If you enumerate the set of binary strings in ascending order, you get: ...
0
votes
0answers
32 views

Performing arithmetical operations (with binary numbers) using propositional logic

Clarifying some terms. By arithmetical operations I mean the four basic operations of addition, subtraction, multiplication and division. By binary numbers I mean numbers in the binary system. By ...
0
votes
1answer
8 views

haw to find the values of binary numbers in octal?

what is the value of 101111.0111 of base 2 (binary) in octal(base 8) we know that in order to translate from binary to octal we need to group the bits in groups of three and the value is going to be ...
0
votes
0answers
35 views

What are the possible dimensions of a binary cyclic code of length 37?

What about the possible dimensions of a 16-ary cyclic code of length 37? [Edit]: The cyclic codes of length $37$ are in a bijective correspondence with factors of $x^{37}-1$. Furthermore, the ...
0
votes
3answers
28 views

Binary subtraction A0 - E4

I have two numbers. The negative one is translated using 2's complement. $$ a = 160_{10} = A0_{16} = 1010 0000_{2} \\ b = -28_{10} = E4_{16} = 1110 0100_{2} $$ And I have to perform the following ...
0
votes
1answer
33 views

What is a signed number?

When is the meaning of "signed number"? A signed number simply means a number that is negative, correct? Sorry if this seems like a stupid question but I'm just starting to get deep into ...
5
votes
1answer
50 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. ...
0
votes
2answers
10k views

Subtract Binary Numbers with 1`s Complement

I'm trying to figure out how to subtract two binary numbers with a complementary one or two, When I need to address carrier and when not? Do I need to solve the problem in decimal numbers? And ...
1
vote
2answers
44 views

What am I doing wrong when multiplying binary numbers together?

This is from Discrete Mathematics and its applications I was able to get sum pretty easy. I am trying to follow this example in the book to get the product of the two binary numbers Here's my ...
0
votes
1answer
118 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 ...
0
votes
1answer
37 views

Converting from twos complement to decimal?

I am currently reading a textbook and I can't seem to understand what the examples in the book did. I do believe it is an error with the book, but if not can someone explain? How come there is no ...
0
votes
0answers
30 views

How to convert a decimal to a $2$'s complement [duplicate]

On this link How can I convert 2's complement to decimal? is a good description. I need to know how to convert from a negative say $-26$ to a two's complement binary and from a decimal with a decimal ...
0
votes
1answer
25 views

Simplifying Simple Boolean XOR Expression (!AB + A!B)

I am trying to simplify the 5 gate XOR from a A!B + !AB expression to a (A + B)!(A + B) implementation. How can I convert ...
0
votes
1answer
81 views

How to convert from floating point binary to decimal in half precision(16 bits)?

I'm trying to convert a 16 bit precision binary number to decimal format however I am completely failing to do so. The binary I'm trying to convert is $0101011101010000$ My current method is: ...
0
votes
2answers
66 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
0answers
24 views

Binary to Decimal Floating Point Number

I seem to be having difficulties trying to figure this out: I have a Binary 0101011101010000 and I'm trying to compute the decimal floating point number, in the IEEE-754 format Can somebody help? ...
0
votes
1answer
96 views

Grade School Multiplication Algorithm for Binary Numbers explanation

I under stand the shifting but not why it will always give the right answer? For Example: ...
0
votes
1answer
33 views

Converting from Octal to Decimal.

I have the value $(3738)_8$ and I want to convert it to decimal. The answer i believe is $$(3 \times 8^3) + (7 \times 8^2)+ (3 \times 8^1) + (8 \times 8^0) = 2016$$. My question is that on some ...
1
vote
0answers
45 views

Generating function from a set of binary strings

So this question is in my textbook and there's no solution, so I'm seeing if I can get a confirmation? Q: Let $S$ be the set of all binary strings of length 4, where for each string $a\in S$, the ...
7
votes
1answer
183 views

$N$ perfect logicians wearing hats

I once came across the following riddle: (assume $N$ to be extremely large) There are $N$ perfect logicians arranged in a vertical row. They are allowed to strategize before the game, during the ...
1
vote
0answers
40 views

Has anyone established an upper bound for the least integer $k$ such that infinitely many primes have at most $k$ ones in their binary representation?

Has anyone established an upper bound for the least integer $k$ such that infinitely many primes have at most $k$ ones in their binary representation? $2$ is the only prime with $1$ one, the Fermat ...
1
vote
3answers
78 views

Defining a bijection with binary strings

Let $n\in\mathbb N$. Then a binary string of length $n$ has the form $a_1a_2...a_n$ such that each $a_i$ is either 0 or 1. Define $E_n$ to be the set of all binary strings of length $n$ with even ...
0
votes
1answer
41 views

Understanding binary combinatorial problem

It has been quite some time since I've done permutations and combinations, and I'm attempting to remember the proper way to go about solving this issue (not a homework assignment, more of a thought ...
0
votes
1answer
65 views

Using XOR operation repeatedly

There are $n$ binary digits, from $A_0$ to $A_{n-1}$. Each operation consists of the following 2 steps: Each digit is replaced by the XOR addition of itself with the next digit. ...
2
votes
2answers
54 views

Mathematical Relations in Computing - Unary

I have this question that's bugging my mind: "Discuss by giving suitable examples the role of mathematical relations (Unary, binary and ternary) in computing." I'm sure it's a very simple question, ...
0
votes
0answers
20 views

Binary Overflow Detection

I am trying to solve several problems, which are binary and encoded using the 2's complement system. One problem has stuck out to me: 0111 + 0001 Both are positive, with 0111 being 1+2+4 or 7, and ...
0
votes
1answer
76 views

Find number between $A$ and $B$ with maximum set bits?

Given two integers $A,B$. Find number $N$ which has maximum number of set bits in its binary form and lies between $A$ and $B$ inclusive. Is there any approach for this question. Also if there are ...
1
vote
2answers
52 views

Converting Decimal to Hexadecimal

MathExchange, I am trying to learn more about computers, and one thing I have opted to teach myself is decimal to binary, and decimal to hex conversion. From the web, I have found tutorials on ...