logic design lab 4
DESCRIPTION
Logic Design LAB 4. 授課老師:伍紹勳 課程助教:邱麟凱、江長庭. BCD Adder. Outlines Requirement Binary and Decimal LAB 4-bit binary full adder Combinational logic of BCD decoder BCD Adder BCD-to-7-Segment Decoders 7-Segment LED. Requirement. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/1.jpg)
Rise and rise again until lambs become lions
授課老師:伍紹勳課程助教:邱麟凱、江長庭
![Page 2: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/2.jpg)
Rise and rise again until lambs become lions
BCD Adder
Outlines– Requirement– Binary and Decimal– LAB
• 4-bit binary full adder• Combinational logic of BCD decoder• BCD Adder• BCD-to-7-Segment Decoders• 7-Segment LED
![Page 3: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/3.jpg)
Rise and rise again until lambs become lions
Requirement
IC : 7408 x 1 、 7432 x 1 、 7483 x 2 、 7447(DCBA) x 1 、 LED x 1 、 7-Segment LED x 1
![Page 4: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/4.jpg)
Rise and rise again until lambs become lions
Binary and Decimal
Binary– 4-bit binary digits can represent 16 different numbers
(0~15)– Easy to compute in digital circuit
Binary-Coded Decimal(BCD)– A decimal digit can represent 10 different numbers
(0~9)– Using 4-bit binary digits to represent a decimal digit– Familiar to most people
![Page 5: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/5.jpg)
Rise and rise again until lambs become lions
LAB
Two 4-bitbinary inputA(A4;A3;A2;A1)
B(B4;B3;B2;B1)Output 4-bit
binary coded-decimal
Carry Sum
7-segment
LED
A
B
4-bit Binary
Full Adder
BCD Adder
Combinational logic
BCD-to-7-Segment Decoders
![Page 6: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/6.jpg)
Rise and rise again until lambs become lions
4-bit Binary Full Adder
74LS83
![Page 7: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/7.jpg)
Rise and rise again until lambs become lions
Combinational logic of BCD decoder
Input 0≦A, B ≦9 → Output 0≦A+B ≦18– If A+B = 0~9
• Output Carry = 0,Sum = A+B
– If A+B = 10~18• Output Carry = 1, Sum = A+B+6
Two 4-bit binary input A(A4;A3;A2;A1) and B(B4;B3;B2;B1)
![Page 8: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/8.jpg)
Rise and rise again until lambs become lions
Combinational logic of BCD decoder
ex: 7+8=15 BCD :
0 1 1 1 +1 0 0 0 1 1 1 1 +0 1 1 0 1 0 1 0 1 Carry Sum
>9 => add 6
![Page 9: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/9.jpg)
Rise and rise again until lambs become lions
Binary Sum BCD Sum K T8 T4 T2 T1 C S8 S4 S2 S1
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 2 0 0 0 1 0 0 0 0 1 0 2 3 0 0 0 1 1 0 0 0 1 1 3 4 0 0 1 0 0 0 0 1 0 0 4 5 0 0 1 0 1 0 0 1 0 1 5 6 0 0 1 1 0 0 0 1 1 0 6 7 0 0 1 1 1 0 0 1 1 1 7 8 0 1 0 0 0 0 1 0 0 0 8 9 0 1 0 0 1 0 1 0 0 1 9 A 0 1 0 1 0 1 0 0 0 0 10 B 0 1 0 1 1 1 0 0 0 1 11 C 0 1 1 0 0 1 0 0 1 0 12 D 0 1 1 0 1 1 0 0 1 1 13 E 0 1 1 1 0 1 0 1 0 0 14 F 0 1 1 1 1 1 0 1 0 1 1510 1 0 0 0 0 1 0 1 1 0 1611 1 0 0 0 1 1 0 1 1 1 1712 1 0 0 1 0 1 1 0 0 0 1813 1 0 0 1 1 1 1 0 0 1 19
When to add 6?
1) T8 T4 T2 T1 > 9
00 01 11 10
00
01
11 1 1 1 1
10 1 1
T8T4
T2T1
T8T4 + T8T2
2) Carry is 1
F = T8T4 + T8T2 + K
![Page 10: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/10.jpg)
Rise and rise again until lambs become lions
BCD Adder
T8T4 + T8T2 + K
Add 6 or not
![Page 11: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/11.jpg)
Rise and rise again until lambs become lions
74LS47
BCD-to-7-Segment Decoders
Don’t careCorresponding illustrations to common anodes LED
when using 74LS47 decoder
The4-bit binary digits order
Eights: DFours: CTwos: B
Ones: A
![Page 12: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/12.jpg)
Rise and rise again until lambs become lions
7-Segment LED
Type “common anodes” seven-segment LED– Common anode pin ‘A’ and ‘k’ connect to VCC
– LED illuminate when it’s input pin is low
Reference– http://zh.wikipedia.org/wiki/%E4%B8%83%E5%8A%83
%E7%AE%A1
ab
cd
e
fg
dp
![Page 13: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/13.jpg)
Rise and rise again until lambs become lions
7-Segment LED
330Ω( 橘橘棕 )
Connect LED and resistant in series connection
to prevent LED burn out
![Page 14: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/14.jpg)
Rise and rise again until lambs become lions
7-Segment LED
![Page 15: Logic Design LAB 4](https://reader036.vdocuments.us/reader036/viewer/2022062410/56815a6b550346895dc7c4e1/html5/thumbnails/15.jpg)
Rise and rise again until lambs become lions
T8T4 + T8T2 + K
Carry ( LED )
Sum
Add 6 or not
A,k connect to +5Vand dp don’t care
Input