It's funny how, in a binary number system, you can just add one to the One's Complement of a negative [signed] binary number (this would be the Two's Complement) and use it with an Adder to achieve subtraction! Amazing!
Now if I could only add a one to every smacktard on the server, we'd have a lot more positi--REPUBLICANS!!!one!!!1! They're everywhere! R0b3r7Z \/\/iLl $3|\|d u$ b4(|< 2 t3h $70|\|3 4g3!
But back to the topic: Adders.
Very poisonous!
But back to the topic before that!: Full Adders
Very poisonous and have just eaten!
Okay, but seriously:
..........................Inp1........Inp2....................
............................|..............|.........................
...........................\ /............\/........................
......................----------------------..................
......................|...........................|..................
Overflow.<---...|....Full Adder..........|..<---...Carry (from prev position)
......................|________________|..................
...................................|...................................
..................................\ /.................................
................................Sum..............................
Inp1......Inp2.......Carry......|...Sum....|...Overflow
...0..........0.............0.......|......0.....|.......0
...0..........0.............1.......|......1.....|.......0
...0..........1.............0.......|......1.....|.......0
...0..........1.............1.......|......0.....|.......1
...1..........0.............0.......|......1.....|.......0
...1..........0.............1.......|......0.....|.......1
...1..........1.............0.......|......0.....|.......1
...1..........1.............1.......|......1.....|.......1
Therefore, our sum form is for Sum(Inp1, Inp2, Carry) is SUMMATION(1,2,4,7) and for Overflow(Inp1, Inp2, Carry) is SUMMATION(3,5,6,7).
Reducing that using a Karnaugh Map should give us canonical sum form, eh?
Let's call Inp1 "x", Inp2 "y", and Carry "z":
Sum
\ yz
..\.....00...01...11...10.
x...0|.....|..1.|.....|..1.|
....1|..1..|.....|..1.|.....|
Sum: x'y'z + xy'z + xy'z' + xyz
(can't be reduced?)
Overflow
\ yz
..\.....00...01...11...10.
x...0|.....|.....|.....|..1..|
....1|......|.1..|.1..|..1..|
Overflow: xz + yz'
Alas, I've screwed up somewhere in there and thus the adder I programmed in lab won't work
Oh well, it's not due for another three weeks.
Anyhow, I've run out of time to make the circuit diagrams. Oh, darn.