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
2
votes
1 answer

Binary division, with reminder

I'm trying to do a binary division to find a remainder. Here's what I've done: 10011100/1001 = 10001 1001 ---- 00001 0 ----- 11 0 ---- 110 0 ----- 1100 1001 ---- 0011 This gives me a remainer of 0011 or…
2
votes
1 answer

Explanation of carry in carry out borrow in and borrow out for binary addition and subtraction with examples

Hi I am having a hard time understand what carry in, carry out, borrow in and borrow out mean can anyone help me out and show me some examples thanks
jyuserersh
  • 391
  • 1
  • 6
  • 15
2
votes
1 answer

Binary representation with more coefficients

Given a positive integer $n$, how many ways are there to write it as $a_0+2a_1+4a_2+\dots+2^na_n$ such that $a_i\in\{0,1,2,3\}$ for all $i$? If the coefficients were allowed to be in just $\{0,1\}$, there would be a unique representation. But here,…
pi66
  • 7,164
2
votes
2 answers

Unsigned Integer Binary Subtraction

So I am having a bit of an issue. First, what is the difference between doing an unsigned binary integer subtraction and doing a signed integer subtraction? I think that is what is confusing me. For an unsigned integer, I was told that you have to…
2
votes
2 answers

Do trailing zeroes after the radix point matter in binary?

In decimal I can discard zeros after the radix point, e.g.: $$ 0.250_{10} = 0.25_{10} $$ It seems to me that I can do the same with binary: $$ 0.10_2 = 0.1_2 $$ Because $$ 1\times\frac{1}{2}+0\times\frac{1}{4} = 1\times\frac{1}{2} $$ Am I right?
2
votes
1 answer

How to convert decimal with scientefic notation, to binary?

I have number $-1e35$, and I'm supposed to convert it to binary. The answer is : $-1.10101001010110100101101...\text{e}–117.$ I can't figure out how to get this! and how we can calculate numbers partially as you see here. Originally it is a…
shayan
  • 145
2
votes
2 answers

How to compute two's complement of a negative number?

I made the search on here and on google and couldn't find anything that answered the topic title. From my bit of understanding, two's complement can be used to make a decimal number, negative. Which is to say, computing the two's complement of 5…
ŽaMan
  • 133
2
votes
1 answer

Binary dividing with a remainder

How much is $\frac{101000}{1001}$ in binary? I checked in 3 sites, each displayed another result. The result I get is 100 with a reminder of 100. Can you please try and solve it and show how you did?
Mor Haviv
  • 135
2
votes
1 answer

Decimal - Binary

Let N = 1 000 … 000 1 (n zeros), and M = 111 … 1110 (n ones). What is the decimal value of M and N assuming: a) Unsigned Binary Representation b) Two's compliment Representation c) Signed/Magnitude Representation I have figured out that: a) N =…
Kevin Zakka
  • 1,544
2
votes
1 answer

Binary Multiplication Counting Ones

Excuse my formatting. I have noticed the following but know no way to prove it. Given the multiplication $y=(2^n-1)\cdot m$, where n,m are positive integers and $m\leq(2^n-1)$. Prove that the count of the number of 1s in the binary representation…
2
votes
5 answers

What is 6.5 in binary?

I just stumbled across a problem I never actually thought about before: decimals in binary. Can someone explain how to do it? Thanks! Note: If possible, I'd like the answer in decimals not fractions, but this may not be possible.
Kurtbusch
  • 632
1
vote
1 answer

Is it really possible to make all possible numbers with an infinite binary table?

Suppose I have an imaginary computer, with an infinite binary table, like the one below: $$ \begin{array}{|c|c|c|c|c|c|c|c|c|} \cdots & 128s & 64s & 32s & 16s & 8s & 4s & 2s & 1s \end{array} $$ If you don't already know how to make integers with a…
1
vote
2 answers

Trying to understand binary number equation

I'm reading a book called "The Elements of Computing Systems" by Noam Nisan/Shimon Schoken. There's an excerpt which includes some math that I'm struggling to understand (limited math background; I was hoping someone might be able to "hold my hand"…
Jarom
  • 13
1
vote
2 answers

Guessing Birthday Binary-Implementation Set Size

Guessing a persons birthday day-of-month, i.e. a number ranging from 1 to 31 by dividing the numbers 1 to 31 up in 5 sets. A binary number for decimal integers between 1 and 31 has at most five digits. Thus, $b_5b_4b_3b_2b_1 = b_50000 + b_4000 +…
1
vote
2 answers

Half-Adder Exercise

My exercise is the following: Make a circuit which outputs X^3 of two bit input of X. Use the lowest number of HALF ADDERS as you can. I don't really understand how to compute $X^3$ with half adders. Any hints or any help is appreciated. Edit: the…
Alan
  • 2,791