The Open Source Swiss Army Knife

/programmingToolBox/comp_orgI/
/programmingToolBox/comp_orgI/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /programmingToolBox   /comp_orgI 
Permalink: bin_addit.txt
Title: add
article options : please login   |  raw source view  

that is the equivalent of exclusive or (same for subtraction) because

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 and carry the one

When designing this using a logic circuit, the exclusive-or part is called the "sum" output, and the carry is called the "carry" ouput. See type "adding binary numbers" in the search engine. Is under 'toolbox' category. This allows us to design a circuit which will mimic binary addition.

This circuit is called an "half-adder".

The web link above shows a full-adder.

overflow

an example of overflow is

0101
0110


1011 this is the wrong answer. The top number is: 5 base 10, bottom is 6.
Sum is 11, not 11. However, we are on a 4-bit system and we require a 5 bit
number (including sign) because the most significant bit is required to hold
the sign.

Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top