Comparators Code Converter
Comparators Code Converter
1
BCD-to-Excess-3 Code Converter -
Specificaiton
The excess-3 code for a decimal digit is the binary combination corresponding
to the decimal digit plus 3. For example, the excess-3 code for decimal digit 5
is the binary combination for 5 + 3 = 8, which is 1000.
Each BCD digit is four bits with the bits, from most significant to least
significant, labeled A, B, C, D. Each excess-3 digit is four bits, with the bits,
from most significant to least significant, labeled W, X, Y, Z.
A W
BCD B BCD-to X Excess-3
digit C Excess-3 Y digit
D Z
2
BCD-to-Excess-3 Code Converter - Formulation
3
BCD-to-Excess-3 Code Converter -
Optimization
4
BCD-to-Excess-3 Code Converter -
Optimization
5
BCD-to-Seven-Segment Decoder -
Specification
Digital readouts found in many consumer electronic products often use Light
Emitting Diodes (LEDs). Each digit of the readout is formed from seven LED
segments. Each segment can be illuminated by a digital signal. A BCD-to-
seven-
segment decoder is a combinational circuit that accepts a decimal digit in
BCD and generates the appropriate outputs for the segments of the display
for the decimal digit. The seven outputs of the decoder (a,b,c,d,e,f,g)
select the corresponding segments in the display. BCD-to-seven-segment
decoder has four inputs, A, B, C, and D for the BCD digit and seven outputs,
a through g, for controlling the segments.
6
BCD-to-Seven-Segment Decoder - Formulation
7
BCD-to-Seven-Segment Decoder -
Optimization
e= A’CD’ + B’C’D’
8
FOUR BIT BINARY TO GRAY CODE CONVERTER
–DESIGN
MSB + + + + Binary code
INPUT ( BINARY) OUTPUTS (GRAY CODE) 0 1 1 0 1
B3 B2 B1 B0 G3 G2 G1 G0 Gray code
0 1 0 1 1
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0
9
Simplification using K-maps
10
Logic Diagram
11
FOUR BIT GRAY CODE TO BINARY CONVERTER
–DESIGN
INPUT ( GRAY CODE) OUTPUTS (BINARY )
MSB + + + + Gray code
1 0 1 0 0
G3 G2 G1 G0 B3 B2 B1 B0
Binary code
1 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 1
0 1 0 1 0 1 1 0
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
1 0 0 0 1 1 1 1
1 0 0 1 1 1 1 0
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 0 1 0 1 1
1 1 1 1 1 0 1 0
12
Puzzles
13
14
MIND MAP
15
Summary
Code Converters
Truth table
K-Map
Excitation Equation
Logic Diagram