Arithmetic Operations and Circuits

Binary Arithmetic

Addition

0 + 0 = 0 carry 0

0 + 1 = 1 carry 0

1 + 0 = 1 carry 0

1 + 1 = 0 carry 1

For Example:

Add the binary numbers 00111 and 10101 and show the equivalent decimal addition.

Subtraction

0 – 0 = 0 borrow 0

0 – 1 = 1 borrow 1

1 – 0 = 1 borrow 0

1 – 1 = 0 borrow 0

For Example:

Subtract the binary number 00111 from 10101 and show the equivalent decimal subtraction.

 

One's Complement Representation

 

Two's-Complement Representation

 

Two's-Complement Arithmetic

 

 

Hexadecimal Arithmetic

 

BCD Arithmetic

 

Arithmetic Circuits

 

 

 

 

 

Four-Bit Full-Adder ICS

 

 

 

 

 

System Design Applications

 

Arithmetic/Logic Units

 

Additional Notes

Signed numbers can be represented with the two's-complement form. In this form the most significant bit is the sign bit. With one bit used as a sign then the magnitude of the number is reduced by one bit. for a data word with 8-bits, the normal capacity would be 256 numbers. With the sign bit there are 128 positive numbers (0 to +127) and 128 negative numbers (–1 to –128). This is still 256 numerical combinations.

Care must be taken, however, when working with signed numbers not to exceed the range of positive or negative numbers. For example: if the number +2 (0000 0010) is added to +126 (0111 1110) the results will be 1000 0000.

This is not +128 but a negative number –127. Two positive numbers added together resulted in a negative answer. This is a condition called overflow. Most computers have special circuits to detect an overflow condition.