4. Overflow
In any circumstances, the results of operations can be
greater than that can accommodate the size of the word in
use.
When an overflow occurs, the ALU must clear the signal
about this state so there is no attempt to use the results of
the operation
When two numbers are added, and both are positive or
both negative, the overflow will occur if and only when it
has the opposite sign
5. Adder
Half Adder
The function : to add two
binary digits with the result
of an increase and a carry
of.
Input : 2 kinds of A and B
Output : Sum and Cout
The carry of results is not
added to the next
calculation
Full Adder
The function : to add two
binary digits and carry of the
previous calculation with the
result of the increment and a
carry of.
Input : A, B and Cin
Output : Sum and Cout
Result of carry of also added
at next calculation
8. Addition and Subtraction
Normal binary addition
Monitor sign bit for overflow
Take twos compliment of subtrahend and add to
minuend
i.e. a - b = a + (-b)
So we only need addition and complement circuits
9. Exercise
Gunakan perhitungan biner untuk mencari hasil
perhitungan desimal dari :
a. 5 + 2 =
b. (-3) + (-6) =
c. 7 – 7 =
d. (-6) + 3 =
e. 6 – 3 =
10. Refference
Stalling, William, Computer Organization
and Architecture, 10th Edition, Pearson,
2015
Abdurohman, Maman, Organisasi dan
Arsitektur Komputer revisi ke-4, Penerbit
Informatika, 2017