10min help with binary math! ASAP

Associate
Joined
25 Nov 2004
Posts
1,944
ive spent the last 30min just reading through tutorials and i just cant get it! :mad:

Binary Division

1. 1001011 / 110 = 1100
2. 1111100 / 1101 = 1001
3. 11000101 / 10110 = 1000
4. 11101101 / 100010 = 110
5. 111011110 / 10010 = 11010

Floating point

1. (0.1*100)+(0.1011*100) = ?
2. (0.10111*101)-(0.10011*101) = ?
3. (0.11*100)*(0.1001*100)
4. (0.11*101)/(0.1*11) = ?


for both sets of questions i have to show the working out which is the reason i cant use a calculator! i have the answers for the first set i just need to do the working out! :mad:

(answers have to be converted back into standard form!)
 
It's easy :):

1. 1001011 / 110 = 1100
75 / 6 = 12

2. 1111100 / 1101 = 1001
124 / 13 = 9

3. 11000101 / 10110 = 1000
197 / = 22 = 8

4. 11101101 / 100010 = 110
237 / 34 = 6

5. 111011110 / 10010 = 11010
478 / 18 = 26


I don't do floating point though.
 
Pho said:
It's easy :):

1. 1001011 / 110 = 1100
75 / 6 = 12

2. 1111100 / 1101 = 1001
124 / 13 = 9

3. 11000101 / 10110 = 1000
197 / = 22 = 8

4. 11101101 / 100010 = 110
237 / 34 = 6

5. 111011110 / 10010 = 11010
478 / 18 = 26


I don't do floating point though.



pho surley thats wrong? i'm not on about converting it back to denary then to binary i'm on about working it out straight from binary

i only supplied the answer as i did them on a calculator earlier!
 
Dividing binary is just repeated subtraction. Just show your working line after line until you have the quotient and the remainder worked out :/
 
paradigm said:
Dividing binary is just repeated subtraction. Just show your working line after line until you have the quotient and the remainder worked out :/

can you extend on that and show me an example?
 
riddler said:
pho surley thats wrong? i'm not on about converting it back to denary then to binary i'm on about working it out straight from binary

i only supplied the answer as i did them on a calculator earlier!

Oh.. I'm not sure how to divide binary without converting it back to decimal first, I'm sure it makes it far easier:

If you write down on a piece of paper (though it's just as easy to do it in your head once you know):
128 64 32 16 8 4 2 1 (it's just doubled each time if you need more)

then start at the rightmost column (1) and write the rightmost value from what you want to convert and work backwards, so for 1001011 (first question) you would have:

Code:
64 32 16 8 4 2 1
1  0  0  1 0 1 1

Then add it up. Wherever you have a 1 add the above number to your total, i.e.:
64+0+0+8+0+2+1 = 75
 
Pho said:
It's easy :):

1. 1001011 / 110 = 1100
75 / 6 = 12
Yes, this is the easiest way, but seeing as you're doing al l the actual mathematics in decimal it's hardly "binary math" is it?

Trying to set things out on a forum doesn't help, but let's have a go:

To divide 1001011 by 110.
110 x 10000 = 1100000 can't subtract (it's bigger than 1001011).
110 x 1000 = 110000 can subtract, leaving 1001011-110000=11011
110 x 100 = 11000 can subtract, leaving 11011-11000 = 11
110 x 10 = 1100 can't subtract (bigger than 11)
110 x 1 can't subtract.

Answer is the sum of the multipliers when we could subtract; that is: 1000+100 = 1100. (And the remainder is 11).

As for the floating point: what does '*' mean? For various reasons, I expect it's being used to mean the same thing as "E" in normal maths. That is: 11*101 = 11 x 10^101 (binary) = 3 x 2^5 (decimal).
 
1001011 / 110 = 1100

1001011 - 110 = 1000101 / q = 0

1000101 - 110 = 111111 / q = 1

111111 - 110 = 111001 / q = 10

111001 - 110 = 110011 / q = 11

110011 - 110 = 101101 / q = 100

101101 - 110 = 100111 / q = 101

100111 - 110 = 100001 / q = 110

100001 - 110 = 11011 / q = 111

11011 - 110 = 10101 / q = 1000

10101 - 110 = 1111 / q = 1001

1111 - 110 = 1001 / q = 1010

1001 - 110 = 11 / q = 1100


Where q = quotient (just add decimal 1 to quotient every time you complete a line)

1001011 = dividend

110 = divisor

That leaves you with a quotient (answer of) 1100, and a remainder of 11 (whats left of dividend).


EDIT: sorry, had to edit the last line after messing up (i'm tired lol).
 
Last edited:
You can do binary long division in the same way as you do decimal long division, but with binary instead (obviously).

My working for the first looks something like:

Code:
      0001100
    +--------
110 | 1001011
      0000
      ----
      1001
       110
      -----
        110
        110
        ---
          011
That probably makes no sense! But it works in principle. So 1001011 / 110 = 1100 remainder 11.

Second:

Code:
       0001001
     +---------
1101 | 1111100
       ----
       1111
       1101
       ----
         10100
          1101
         -----
           111
so 1111100 / 1101 = 1001 remainder 111.
 
Can you do polynomial long division? For example, can you divide x^2-xy+2y^2 by x-2?

If so, it may help to know that long division in any base system (for example decimal base 10 or binary base 2) is essentially just polynomial long division.

The binary expression 10011 should be interpreted as

x^4 + 0.x^3 + 0.x^2 + x^1 + x^0

with x=2. Just do polynomial long division and set x=2 at the end.
 
Back
Top Bottom