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

learn more… | top users | synonyms

-1
votes
0answers
15 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 ...
-1
votes
0answers
47 views

XOR binary matrix multiplication $AX=B$? [on hold]

Let $A$, $B$, and $X$ be binary matrices (in F2 ) {0,1} positive values, where $A$ and $B$ are of size $n \times m$ with $n > m $ (more equations than variables). $X$ is an $m \times m$ matrix. ...
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 ...
-1
votes
1answer
16 views

Signed binary number [closed]

What is the range of number that can be represented by a 16 bit signed binary numbers ? How many are negative and positive numbers ? Thanks.
0
votes
1answer
21 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
1answer
31 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
2answers
24 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
1answer
24 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
2answers
53 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
16 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
23 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
0answers
10 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 ...
0
votes
1answer
46 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 ...
1
vote
0answers
57 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
14 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
44 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
55 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
18 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
27 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
88 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
11 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
34 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
21 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 ...
0
votes
1answer
13 views

Retrieve position from binary number ordered by number of ones

I have binary numbers of length s. They are ordered by numbers of ones, and they can have at most j zeros. That is: first are ordered all numbers containing (s; 0) possible subsets of s numbers, next ...
0
votes
0answers
16 views

Binary Tree - Determin Number of Nodes

Given a full balanced binary tree where at depth 0, the number of nodes is 1, at depth 1, the number of nodes is 3, at depth 2, the number of nodes is 7. At depth X, what is the number of nodes?
0
votes
1answer
19 views

Prove by induction the number of edges in a tree given the leaves.

Define a cs130A tree to be a single leaf node or an internal node (the root) connected to two disjoint subtrees, which are themselves cs130A trees. Prove by induction that for all cs130A trees the ...
0
votes
1answer
17 views

Find what row a given number exists in within a binary heap tree.

If I have a binary heap tree like so: 1 2, 3 4, 5, 6, 7 8, 9, 10, 11, 12, 13, 14, 15 16 ... 31 32 ... 63 64 ... 127 I ...
1
vote
0answers
49 views

Probability of having n more 0's than 1's in a subsequence

We have a number K>2 and a sequence of m binary values $$b_1, ... b_m $$ Given a subsequence $$b_i, ... b_j, i>j $$ we define: W(i,j) is the number of 1's in the sequence L(i,j) is the number ...
0
votes
1answer
17 views

Determining if the result of adding (subtracting) two binary numbers is correct as NBC and 2's

My task is to convert two numbers to binary, add them and determine if the result is correct as a NBC and 2's. Then I have to subtract B from A by converting by using 2's for calculating -B [that is ...
4
votes
2answers
100 views

Integers with consecutive nonzero digits in base 2

Note that $2016=11111100000$. How many integers $\le n$ have their nonzero bits consecutive in their binary (base $2$) expansion? The case $n=2^m-1$ is easy. The question is about a closed formula for ...
0
votes
1answer
33 views

Binary subtraction with borrowing vs. 2's complement

Consider the following two binary numbers which are using sign-magnitude representation. Therefore, both are positive numbers. ...
0
votes
0answers
43 views

Two's complement involving binary numbers [Single-precision floating point number]

Given the following bit pattern: 0010 0100 1001 0010 0100 1001 0010 0100 What decimal number does it represent, assuming it is a single-precision floating point number?
-3
votes
1answer
52 views

Two's complement involving binary numbers [closed]

$$0010\ 0100\ 1001\ 0010\ 0100\ 1001\ 0010\ 0100$$ What decimal number does it represent, assuming it's a two’s complement integer?
0
votes
0answers
29 views

Designing a Turing machine for Binary Division

I'm trying to design a TM to binary divide 2 numbers. The best approach I've found is the method: division as repeated subtraction, but I don't know if there's a fastest way or an easier way. ...
0
votes
1answer
42 views

Find a function comparing two variables that is equal to 1 when they are equal and 0 when they are not

I am trying to find a function that compares two variables. When these two variables are equal, the function should equal 1. For any other value, the function should equal 0. Is there a way to do this ...
0
votes
0answers
10 views

Proof by induction that $\sum \limits _{i=1} ^n d^{-l_i} = 1$ sentence in a full tree [duplicate]

How do I prove by induction that $\sum \limits _{i=1} ^n d^{-l_i} = 1$ where: $d$ = the number of children of each node; $n$ = the number of leaves; $l$ = the depth of each leaf $l_1, \ldots, l_n$? ...
-2
votes
3answers
70 views

Generating binary array

Programming side (C++) I have this task where I need to get 5 numbers in binary array, but i cant think of way to generate it. The building process is: Starts Width 10 then adds same number but 1 ...
0
votes
1answer
15 views

Convex or Quasiconvex Relaxed Binary Quadratic Optimization Problem

Let's say I have a quadratic problem with nonnegative triangular matrix Q and binary decision variables x. $$min_{x} f(x) = ...
2
votes
2answers
64 views

Binary number with base $-2$ (minus two) arithmetic algorithm

I have a number X represented as a sequence of $a_i \in {0,1}$ so $$X = \sum_{i=0}^{N-1} a_i(-2)^i$$ where $N \in \{ 1, \ldots, 100000 \}$. I need to find an algorithm to produce a number $Y = -X$ ...
1
vote
0answers
18 views

largest number machine number that this comp has, numerical analysis, mantissa

I am having trouble understanding the basics on how to calculate the m, s and c of the formula. I have looked in my textbook but not much of an explanation, also on the IEEE websites but nothing much. ...
1
vote
2answers
23 views

Formulating the bitwise OR operation

Considering the bitwise OR operation, wikipedia states, $$x\;\mathrm{OR}\;y = \sum_{n=0}^b ...
0
votes
0answers
8 views

How would I round the number $-(1.01101|01)_2$ down?

I'm trying to round $-(1.01101|01)_2$ in binary down. The $|01$ are the guard bits. The answer is $-(1.01110)_2$ My attempt is as follows: $-(1.01101|01)_2$ $-(0.00001|00)$ = $(1.01100)$ Not ...
0
votes
1answer
59 views

How many 10-bit binary sequences begin and end with the same bit?

Can you please teach me how to solve this? There are other similar questions that I have, but I don't understand how to solve them. Another question is: How many 10-bit binary sequences contain an odd ...
1
vote
1answer
36 views

Binary variable in a constraint

I have the following optimization problem: Model I: $$f(x,y) \\ s.t., \\ y\leq x+M(1-V)\\ y \leq MV \\ x \geq 0, y \geq 0$$ where x and y are continuous variables whereas V is a binary variable. M ...
0
votes
2answers
27 views

About 2-adic representation of integers

How would I express -3 in 2-adic representation? Is it just revercimal calculation of binary expression of -3? like: -3 = -11 in binary, so using revercimal, -11. in binary = 01. ?
0
votes
1answer
40 views

Prove that the set of all binary sequences is uncountable

Question: Prove that the set of all infinite binary sequences is uncountable. Comments: I think that there are a couple of ways of going about this. My first approach was to show that the set of all ...
3
votes
1answer
40 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.$ ...
5
votes
7answers
622 views

How to find the unique sums in the values 1,2,4,8,16, 32

I apologize but I'm not sure what you would even call this problem. I have some data that provide a numeric code for race as follows: hispanic(1) + american_indian_or_alaska_native(2) + asian(4) + ...
0
votes
1answer
31 views

What actually determines a 'borrow' in binary subtraction?

Given Byte1 and Byte2 in binary. How to determine whether Byte1 - Byte2 results in a borrow ...