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
1
vote
1 answer

Is there a binary system where $1000 = -1 $? And if not, why?

My first thought after seeing that $0000 = 0$ and $1000 = -0$ waste one possible number, was to start negative numbers with $1000 = -1$. So that you just have to write the number flip the first bit and subtract one. It's way easier to see which…
XBagon
  • 13
1
vote
0 answers

Binary to decimal conversion by grouping

It is possible to convert a binary number to a hexadecimal number by grouping digits in groups of 4 and getting a hexadecimal digit out of each group. Can the same be done in a binary to decimal conversion? Say I have 1110010110 and I want to…
1
vote
1 answer

Signed binary subtraction using two's complement method

I'm sorry about this, but I'm at my wit's end. I'm trying do to an incredibly simple calculation. I want to calculate 4 - 7 using the two's complement method for signed binary numbers with a 4 bit register. I've been doing this calculation over and…
Runic
  • 11
1
vote
1 answer

Get upper bound on extremely high powers of number very close to 1 from below

It's kind of weird, but I want to get a sense of how small $(\frac{2^{64}-1}{2^{64}})^x$ where $x=2^{56}.$ Is there an elegant way how bound this number from above? (maybe there're tricks in binary basis)
sel
  • 320
1
vote
2 answers

Binary counter: base 10 adjustment

In a microcontroller (MSP430F5659) the RTCB timer provides clock-based interrupts at register-controlled intervals. These may be 1,2,4,8,16,32,64,128,256,512,1024 (and higher) interrupts per second. The same timer also provides a 1-second…
1
vote
1 answer

Why is decimal number 10 represented as 0001 0000 in BCD(binary coded decimal) and not 1001 in BCD?

As we know BCD is weighted as 8421. If we just place 1010 it becomes 10. But in reality its 0001 0000. Why is it like this ?
Soham De
  • 131
1
vote
0 answers

interpret reduced cost of all binary variables

I have prepared and run a Linear Programming model in SAS. I have some questions about the output that I can’t find answers to, and am hoping that someone can help. My model contains the decision variables X1, X2 …………..X12, and all are binary. The…
sherry
  • 11
1
vote
3 answers

Two's complement but no flipping bits

In my one class we learned about two's complements. I know there's one way to do it flipping bits and adding 1, but last time in class at the end the instructor said no flipping bits and adding one in the class. I've looked all over and through my…
Saral45
  • 11
1
vote
1 answer

How to convert these numbers?

I am trying to understand number systems binary and decimal number systems. How can I convert the following numbers using the least amount of digits? $(47)\text{base}-10$ to signed binary. $(-27)\text{base}-10$ to signed and binary…
1
vote
1 answer

Compare two numbers

This question comes from this answer to my another question. I have the following two statements in binary to compare: $$ |0.11 - 0.1101110111...|\quad\quad|1.00 - 0.1101110111...|$$ I need to figure out the way to make comparison based only on the…
1
vote
1 answer

Understanding offset-k method of representing negative integers

I'm reading this article about offset-k method of representing negative integers. Can someone please explain the following passage using some examples: One logical way to represent signed integers is to have enough range in binary numbers so that…
1
vote
2 answers

How do I know that the number is halfway in between

I was shown the following: $$ 0.110 < 0.1101 < 0.111$$ and told that the middle number is halfway in between those two numbers. Is this correct? How can I see that? Update: If I add a zero to the first and the last number, I get: $$ 0.1100 < 0.1101…
1
vote
1 answer

Binary multiplication how to carry a 001 in case of adding 4 times 1?

I am doing binary arithmetic for the first time and I want to know how to carry over 1+1+1+1 in binary multiplication $$\begin{align} &1101000\\ &0101100\\ &1011000\\ &0001000\\ \end{align}$$ now the fourth column has 1+1+1+1=100, How can I carry…
Onix
  • 637
1
vote
2 answers

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$ which is almost the same except $+17$ rather than…
1
vote
1 answer

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 2's complement of this positive binary…