Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dept. of Electrical and Computer Eng., NCTU

Similar presentations


Presentation on theme: "Dept. of Electrical and Computer Eng., NCTU"— Presentation transcript:

1 Dept. of Electrical and Computer Eng., NCTU
Lab 6. BCD Adder Presenter: Chun-Hsien Ko Contributors: Chung-Ting Jiang and Lin-Kai Chiu Dept. of Electrical and Computer Eng., NCTU

2 Dept. of Electrical and Computer Eng., NCTU
Outlines Binary and Decimal BCD Adder and Decoder 4-bit Binary Full Adder (7483) BCD Adder Combinational Logic of BCD Decoder 7-segment Decoder BCD-to-7-Segment Decoders (7447) 7-Segment LED LAB 4: BCD Adder Dept. of Electrical and Computer Eng., NCTU

3 Dept. of Electrical and Computer Eng., NCTU
Binary 4-bit binary digits can represent 16 different numbers (0~15) Easy to compute in digital circuit 0x00, 0x01, …, 0x09, 0x0A, 0x0B, … ,0x0F 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 Only use 0x00 ~ 0x09 in 4-bit digits Dept. of Electrical and Computer Eng., NCTU

4 Dept. of Electrical and Computer Eng., NCTU
Two 4-bit binary inputs: A (A4;A3;A2;A1) and B (B4;B3;B2;B1) 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 Why? 0x0A = (1010)2 = (10)10 (10000)2 – (01010)2 = (00110)2 Dept. of Electrical and Computer Eng., NCTU

5 Dept. of Electrical and Computer Eng., NCTU

6 BCD-to-7-Segment Decoders Dept. of Electrical and Computer Eng., NCTU
4-bit Binary Full Adder BCD Adder Combinational logic BCD-to-7-Segment Decoders Dept. of Electrical and Computer Eng., NCTU

7 Dept. of Electrical and Computer Eng., NCTU
4-bit Adder: 74LS83 No C0 in this Lab Pin 13 connect to GND Dept. of Electrical and Computer Eng., NCTU

8 Dept. of Electrical and Computer Eng., NCTU
Combinational Logic of BCD Decoder T8T4 + T8T2 + K Add 6 or not (0110) Dept. of Electrical and Computer Eng., NCTU

9 Dept. of Electrical and Computer Eng., NCTU
7-segment LED Display Common anode pin ‘A’ and ‘k’ connect to VCC LED illuminate when its input pin is low Therefore, we need to decode the number for display with the 7-segment display For example, if we want to show ‘1’, we need to input [ ] in term of [a b c d e f g dp] Reference Dept. of Electrical and Computer Eng., NCTU

10 Dept. of Electrical and Computer Eng., NCTU
BCD-to-7-Segment Decoders (7447) Don’t care N = 8*A+4*B+2*C+D = (A;B;C;D)2 Dept. of Electrical and Computer Eng., NCTU

11 Dept. of Electrical and Computer Eng., NCTU
7-segment LED Display 330Ω(橘橘棕) Dept. of Electrical and Computer Eng., NCTU

12 Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU

13 Dept. of Electrical and Computer Eng., NCTU
Lab 4: BCD Adder Dept. of Electrical and Computer Eng., NCTU


Download ppt "Dept. of Electrical and Computer Eng., NCTU"

Similar presentations


Ads by Google