Code Converters: Section 3-4 Mano & Kime
Code Converters: Section 3-4 Mano & Kime
Code Converters
BCD-to Excess-3 Code Converter Hex-to-Seven-Segment Decoder Lab 3 ALU2
Arithmetic and Logic Instructions 7-Segment Decoder
inp(3:0)
Excess3
outp(3:0)
Code Converters
BCD-to Excess-3 Code Converter Hex-to-Seven-Segment Decoder Lab 3 ALU2
Arithmetic and Logic Instructions 7-Segment Decoder
Hex-to-Seven-Segment Decoder
q0 q1 q2 q3 seg7dec
a b c d e f g dp
Turning on an LED
No current +5V R LED no light +5V GAL output pin 1
7-Segment Display
a +5V f g b
7-Segment Display
a
f g e c b
0 1 2 3 4 5 6 7
a 1 0 1 1 0 1 1 1
b 1 1 1 1 1 0 0 1
c 1 1 0 1 1 1 1 1
d 1 0 1 1 0 1 1 0
e 1 0 1 0 0 0 1 0
f 1 0 0 0 1 1 1 0
g 0 0 1 1 1 1 1 0
7-Segment Display
a
f g e c b
8 9 A b C d E F
a 1 1 1 0 1 0 1 1
b 1 1 1 0 0 1 0 0
c 1 1 1 1 0 1 0 0
d 1 1 0 1 1 1 1 0
e 1 0 1 1 1 1 1 1
f 1 1 1 1 1 0 1 1
g 1 1 1 1 0 1 1 1
Hex-to-Seven-Segment Decoder
q0 q1 q2 q3 seg7dec a b c d e f g dp
a f g e c d b
Code Converters
BCD-to Excess-3 Code Converter Hex-to-Seven-Segment Decoder Lab 3 ALU2
Arithmetic and Logic Instructions 7-Segment Decoder
y a+b b-a a and b a or b a xor b true if a = 0 false otherwise true if a < 0 false otherwise true if b > a (unsigned) false otherwise
000
y(n-1:0)
001 010
sel(2:0)
011 100
dig1
dig2
dig3
dig4
Pins
AtoG(6 downto 0)
Digilab XLA
7-segment displays
LEDs pushbuttons
switches
Digilab Board
dig4
dig3
dig2
dig1
Pins
CA CB CC CD CE CF CG
seg7dec q
AtoG
AtoG(6:0)
Display y on dig4
A(1:4)
ldg
Lab3