140 likes | 349 Views
Lab 4. BCD Adder. Presenter: Chun-Hsien Ko Contributors: Chung-Ting Jiang and Lin-Kai Chiu. 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
E N D
Lab 4. BCD Adder Presenter: Chun-Hsien Ko Contributors: Chung-Ting Jiang and Lin-Kai Chiu 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
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 represent10 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
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
BCD Adder 4-bit Binary Full Adder Combinational logic BCD-to-7-Segment Decoders Dept. of Electrical and Computer Eng., NCTU
4-bit Adder: 74LS83 No C0 in this LabPin 13 connect to GND 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
7-segment LED Display • Common anode pin ‘A’ and ‘k’ connect toVCC • LED illuminate when its input pin is low • Therefore, we need to decode the numberfor display with the 7-segment display • For example, if we want to show ‘1’,we need to input [1 0 0 1 1 1 1 1] in term of[a b c d e f g dp] • Reference • https://en.wikipedia.org/wiki/Seven-segment_display Dept. of Electrical and Computer Eng., NCTU
BCD-to-7-Segment Decoders (7447) N = 8*A+4*B+2*C+D = (A;B;C;D)2 Don’t care Dept. of Electrical and Computer Eng., NCTU
7-segment LED Display Dept. of Electrical and Computer Eng., NCTU 330Ω(橘橘棕)
https://en.wikipedia.org/wiki/Electronic_color_code Dept. of Electrical and Computer Eng., NCTU
Lab 4: BCD Adder Dept. of Electrical and Computer Eng., NCTU