# Rise and rise again until lambs become lions

Rise and rise again until lambs become lions 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 Rise and rise again until lambs become lions

Requirement Rise and rise again until lambs become lions IC： 7408 x 1、7432 x 1、7483 x 2、7447(DCBA) x 1、LED x 1、7 -Segment LED x 1

Binary and Decimal Rise and rise again until lambs become lions 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

Rise and rise again until lambs become lions LAB BCD Adder 4 -bit Binary Full Adder Combinational logic BCD-to-7 Segment Decoders

4 -bit Binary Full Adder 74 LS 83 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 Rise and rise again until lambs become lions

Combinational logic of BCD decoder ex: 7+8=15 BCD : 0 +1 1 +0 1 0 1 1 0 1 >9 => add 6 0 1 Rise and rise again until lambs become lions

0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 Binary Sum K T 8 T 4 T 2 T 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 1 1 BCD Sum C S 8 S 4 S 2 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 S 1 0 0 1 1 0 2 1 3 0 4 1 5 0 6 1 7 0 8 1 9 0 10 1 11 0 12 1 13 0 14 1 15 0 16 1 17 0 18 1 19 Rise and rise again until lambs become lions When to add 6? 1) T 8 T 4 T 2 T 1 > 9 T 2 T 1 00 01 11 10 11 1 1 1 T 8 T 4 00 01 10 T 8 T 4 + T 8 T 2 2) Carry is 1 F = T 8 T 4 + T 8 T 2 + K

Rise and rise again until lambs become lions BCD Adder T 8 T 4 + T 8 T 2 + K Add 6 or not

BCD-to-7 -Segment Decoders 74 LS 47 Don’t care Rise and rise again until lambs become lions

7 -Segment LED Rise and rise again until lambs become lions Type “common anodes” seven-segment LED – Common anode pin ‘A’ and ‘k’ connect to VCC a f – LED illuminate when it’s input pin is low e g d b c dp Reference – http: //zh. wikipedia. org/wiki/%E 4%B 8%83%E 5%8 A%83%E 7%AE %A 1

7 -Segment LED Rise and rise again until lambs become lions 330Ω(橘橘棕)

7 -Segment LED Rise and rise again until lambs become lions

Input Rise and rise again until lambs become lions T 8 T 4 + T 8 T 2 + K Add 6 or not A, k connect to +5 V and dp don’t care Sum Carry ( LED )

- Slides: 15