Questions tagged [binary]

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

Binary (base $2$) represents numbers using only the digits $0$ and $1$.

We write:

$$n=\sum\limits_{k=n}^0 a_k2^k$$

to represent a nonnegative integer, so for example $27_{10}=16+8+2+1=11011_2$

To represent nonnegative real numbers, we use:

$$n=\sum\limits_{k=n}^{-m} a_k2^k$$

where $m$ can be $\infty$. So, for example $11.001_2=3.125_{10}$.

1703 questions
0
votes
1 answer

Binary subtraction with borrow

$1000_2 - 0111_2$ = $8_{10}-7_{10} = 1_{10}$. When there are no more on-bits to borrow from the number that is being subtracted from, is the resultings bits in the sum all zeros? (Se pic) We know the result is $1$. So when there are no bits to…
user366820
0
votes
2 answers

Binary subtraction : $0.1000 - 0.1001$

I have the following subtractrion to do: $0.1000 - 0.1001$, the result is $-0.0001$, but I don't know how to obtain it. This is my attempt: $$\begin{array}{lcl} 0. & \not{1}^0 & \not0^1 & \not0^1 & ^10 & - \\ 0. & 1 & 0 & 0 & 1…
JB-Franco
  • 852
0
votes
2 answers

Do 79-42 in binary using 2's Complement

I did: 79_10 = 1001111 42_2 = 101010 I took 2's Complement of 42 and got 010110. Then I did 1001111 + 010110 and got 1100101 but this is 101. If I remove the leftmost one it becomes 37 which is correct... where did it go wrong?
0
votes
1 answer

Representing a number

I have a number in base $10$. The number is $N$. $N=-127$. Assuming $16$ bit 2's complement number representation, I need to convert $N$ to hexadecimal I am not sure how to proceed. I know that the binary representation of $-127$ is…
0
votes
1 answer

How to convert a decimal (2^x) to binary?

Everything will be considered in 2's complement. So from my understanding, since binary is base 2: 236 (decimal) = 1001002 (binary) Apparently, my understanding was not very understanding. 236 = 10000000000000000000000000000000000002 (36 0's) Would…
Amai
  • 89
0
votes
1 answer

Overflows in binary addition

This site has got 2 example for binary addition. The first, $0110 + 0111$ I can follow. The second, $1101 + 0101$ is being used as an example where overflow will happen, because the number of columns in the result is more than the number of columns…
ChrisW
  • 184
  • 1
  • 9
0
votes
2 answers

Binary division: 1/11

The exercise in the book goes like this: In the decimal system the fraction 1/3 is written as 0.3333... (pure periodic number). What happens in the binary system? So I've been practising with other divisions in binary and, comparing my result with…
0
votes
2 answers

Help with exercise: Binary pattern generating rule

I'm having some trouble in trying to crack the logic behind this pattern. Up to binary 7 (111) I can see that the '1' holds the positions that can be occupied by moving from right to left. However, it becomes increasingly complex and can't see the…
0
votes
1 answer

How many bit are needed to represent 32 digit decimal number?

A large number, 32 digit decimal number is given. How many bit are needed to represent in binary ?
0
votes
2 answers

How to explain this binary number problem.

If I have a number made of 128 1 and 128 0 (256 bits) and I convert it to 10 base integer I get: 115792089237316195423570985008687907852929702298719625575994209400481361428480 and if I square the number 2 with 256 I…
0
votes
1 answer

binary, hexadecimal to decimal conversion.

I've one point that couldn't wrap in my mind when we talk about (binary, octal, hex) to decimal conversions? For example, to convert binary 011 to decimal we multiply each bits starting from the LSB by the power of 2. $011 =…
0
votes
1 answer

Two's complements

Calculate 111000_2 - 1100111_2 and convert the result into a 8-Bit two's complement. My suggestion: I'm inverting 1100111_2 into 0011000_2 and add +1, so the result would be: 0011001_2. Then I'm adding this result to 0111000_2 and get…
0
votes
2 answers

Converting Large Decimal Numbers to Octal and Binary

I have large numbers that I need to convert to Octal and Binary systems. Examples of numbers that I am working with are $10^{10}$, $10^{20}$, $10^{30}$ ... (powers of 10) and numbers that are multiplied by $10^n$ for example $123.175*10^{31}$ and so…
0
votes
2 answers

Digits of a number between 0 and 1.

I'm currently working on a problem that requires me to know, for some $x=.x_1x_2x_3....x_n \in [0,1]$, when the $nth$ digit is equal to $0$ or $1$, in base $2.$ For example the interval where $x_1 = 1$ in base $2$ is $[\frac{1}{2}, 1)$, I think. And…
mXdX
  • 571
  • 3
  • 14
0
votes
1 answer

What did I do wrong in calculating $765_{18} - 210_{3}$?

So I wanted to calculate $$765_{18}- 210_{3}$$ First converting $765_{18}$ into decimal: $765_{18} = 2381_{10}$. Then converting $2381_{10}$ into binary: $2381_{10} = 100101001101_2$ Now converting $210_3$ into decimal: $210_3 =…
user608796