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

  • Thread starter Thread starter nesta
  • Start date Start date
  • Tags Tags
    Binary
Click For Summary

Discussion Overview

The discussion revolves around the process of binary subtraction, specifically focusing on the subtraction of binary fractions. Participants are exploring the steps involved in performing this operation and addressing a specific example provided by one user.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related
  • Mathematical reasoning

Main Points Raised

  • Nesta presents a binary subtraction problem and expresses confusion over the steps leading to the answer, questioning if they are making a mistake.
  • KM suggests that binary subtraction is similar to decimal subtraction and provides a step-by-step breakdown of the process, including borrowing techniques.
  • KM introduces the concept of using complement subtraction as an alternative method, explaining how to apply it in binary and mentioning the overflow handling.
  • Some participants express interest in learning about complement subtraction in the decimal system, while others humorously indicate their apprehension towards subtraction.

Areas of Agreement / Disagreement

There is no consensus on the best method for binary subtraction, as participants are exploring different approaches and expressing varying levels of understanding and comfort with the topic.

Contextual Notes

The discussion includes various methods of subtraction without resolving which method is preferable or more accurate. Some assumptions about the understanding of binary operations may not be explicitly stated.

Who May Find This Useful

Individuals interested in binary arithmetic, particularly those learning about binary subtraction methods or seeking clarification on the topic.

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
 

Similar threads

Replies
5
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
2K
Replies
3
Views
10K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
1
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K