Simple Binary Subtraction: Learn How to Calculate with Step-by-Step Guide

  • Thread starter Thread starter nesta
  • Start date Start date
  • Tags Tags
    Binary
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 8K views
nesta
Messages
7
Reaction score
0
Hi Friends,

I'm scratching my head for not able to figure out this problem of binary (fraction) subraction.


0.1101 - 0.00000011 = 0.11001101

Can someone please help me with steps how do i get the answer as sshown above .

I tried as shown below and I am getting a different answer. Am i doing something terribly wrong.

0.11010000
- 0.00000011
---------------
0.10000011 ----> this answer is wrong

Thanks,
Nesta
 
Engineering news on Phys.org
Is this class homework?

KM
 
NO it is not.. if its a class homework how will know its answer..
 
It's quite simple, and is done in exactly the same way as with decimal numbers. You have:

0.11010000
-0.00000011
_____________
0.11001101

1) Rightmost column: 1>0, so you must borrow "10" from the next column, and then 10-1=1
2) Next Column: This column had "0" in it, so you borrow "10" from the next, but you have already borrowed "1" from this column, so that leaves 1 in the numerator, and 1 - 1 = 0
3) Next column, same as previous, and you get 1 - 0 = 1
4) and so fourth

Actually the easier way is to complement the subtrahend and add it to the minuend. In this you have:

000.11010000
111.11111100
(1)000.11001100

Then, you add the "1" that overflows at the left back in the rightmost column, and get:

000.11001101

KM

B.T.W. Would anyone like to see how complement subtraction works in the decimal system?
 
*tentatively raises hand*
 
I'm scared of subtraction! ::Hides::
 
Nobody expressed interest, but here's how to do complement subtraction in decimal. First, we use the following to get the 'inversion' of each digit (subtrahend only):

0 -> 9
1 -> 8
2 -> 7
3 -> 6
4 -> 5
5 -> 4
6 -> 3
7 -> 2
8 -> 1
9 -> 0
Now, for each digit in the 'subtrahend', substitute its inversion from the list above (remember. leading zeros all go to nine). Then add "1" to the inverted subtrahend value, to get the complement. Then simply add. Any "1" that carries out beyond the end is dropped (or it can be described as being used in an "end-around-carry" in place of the one that was previously added). Try it!

KM