lab 7
TRANSCRIPT
![Page 1: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/1.jpg)
Islamic University
EE-261Digital Logic Design
![Page 2: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/2.jpg)
Functional Block: Half-Adder
• A 2-input, 1-bit width binary adder that performs the following
computations:
• The sum is expressed as a sum
bit , S and a carry bit, C
• The half adder can be specified as a
truth table for S and C
X 0 0 1 1
+ Y + 0 + 1 + 0 + 1
C S 0 0 0 1 0 1 1 0
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
![Page 3: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/3.jpg)
Logic Diagram-Half adder
![Page 4: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/4.jpg)
Full adder
• A full adder is combinational circuit that forms the
arithmetic sum of three input bits. It consists of three
inputs and two outputs.
• Two of the input variable represented by x and y. The third
input Z represent s the carry from previous lower
significant position.
![Page 5: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/5.jpg)
Full adder
![Page 6: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/6.jpg)
Logic Diagram-Full adder
![Page 7: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/7.jpg)
Half Subtractor
Subtracting a single-bit binary value Y from anther X (I.e. X -Y ) produces a
difference bit D and a borrow out bit B-out.
X Y B D
• 0 0 0 0
• 0 1 1 1
• 1 0 0 1
• 1 1 0 0
o D(X,Y) = S (1,2)
o D = X’Y + XY’
o D = X Å Y
o B= S (1)
o B = X’Y
![Page 8: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/8.jpg)
Logic Diagram-Half Subtractor
![Page 9: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/9.jpg)
• The circuit has three inputs and two outputs. The three
inputs X, Y, Z denote the minuend, subtrahend, and
previous borrow respectively. The two outputs D and B
represent the difference and output borrow, respectively.
• Easy way to write the truth table
B=1 if (X<Y+Z)
D=X-Y-Z (Don’t bother about sign),If B=0
D=(2+X)-Y-Z, If B=1
Full Subtractor
![Page 10: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/10.jpg)
X00001111
Y00110011
D01101001
B 0 1 1 1 0 0 0 1
Z 0 1 0 1 0 1 0 1
Inputs Outputs
D = X’Y’Z + X’YZ’ + XY’Z’ + XYZ
B = X’Z + X’Y + YZ
![Page 11: lab 7](https://reader036.vdocument.in/reader036/viewer/2022082815/563db874550346aa9a93d9ea/html5/thumbnails/11.jpg)