You are on page 1of 13

Experiment#7

ADDERS, SUBTRACTORS AND MAGNITUDE


COMPARATORS
Objective

-To construct and test various adders and subtractor circuits.

- To construct and test magnitude comparator circuits.

Apparatus

-IC type 7486 quad 2-input XOR gates.

-IC type 7408 quad 2-input AND gates.

-IC type 7404 HEX inverter.

-IC type 7483 4-bit binary adder.

-IC type 7485 4-bit magnitude comparator.


Part 1: Addition

Part 2: subtraction
Part 3: magnitude comparison
Procedures:

Part 4:(a) half adder with XOR and NAND only

A B S C
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Part 5:(b) full adder with XOR and NAND only

A B Ci S Co
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
‫)‪Part 6:(c‬‬

‫السويتش(‪ )carry input‬اللي تحت احطه قروند او ‪0‬‬


If I change the carry input to 1 then 1 will be added in the results.
Part 7:(d)

9+5=14 ➔ 1001+0101=1110

9-5=4 ➔ take the 2's for 5 ➔ 1001+1011=0100 with carry

9+13=22➔ 1001+1101=0110 with carry

9-9=0 ➔ take the 2's for 9 ➔ 1001+0111=0000 with carry

10+6=16>15 ➔ 1010+0110=0000 with carry

6-10=-4 ➔ take the 2's for 10 ➔ 0110+0110=1100


-show that Co =1 when sum exceeds 15:

9+13=22>15

10+6=16>15

-comment on sum and Co for the subtraction operations when A>B and
A<B:

Sum : if A>B the Co will = 0 ➔ A=9, B=5 ,,,, 9+5=14<15 no carry

But if A<B the Co will = 1 ➔ A=9, B=13 ,,,, 9+13=22>15 has CARRY

Subtraction: if A>B the Co will = 1 ➔ A=9, B=5 ,,,, 9-5=4<15 has carry

But if A<B the Co will = 0 ➔ A=6, B=10 ,,,, 6-10=-4

so we need 2's complement to get the real result


Part 8:(e)

A B output proof
1001 0110 A>B 9>6
1100 1110 A<B 12<14
0011 0101 A<B 3<5
0101 0101 A=B 5=5
Part 9:(f)

X=1 ➔ A=B ➔ex: 9=9

Y=1 ➔ A<B ➔ex: 9<10

Z=1 ➔ A>B ➔ex: 9>5


Conclusion

-4 bit adder-subtractor circuit can be constructed using full adders and


XOR gates.

-the logic circuit has an additional input called the control input, which
determines the addition 0 or subtraction 1.

-a magnitude digital comparator is a combinational circuit that


compares two digital or binary numbers and determines their relative
magnitudes in order to find out whether one number is =,< or > than
the other digital number.

You might also like