Sunteți pe pagina 1din 25

BCD TO BINARY

CONVERTER
Mohammad Atiqul Islam
Riasat Khan
EEL 6726
Advanced VLSI Design
Gonzalo Medina
David Viviescas
Contents
Introduction
Explanation of BCD
History and Applications of BCD
Mentor Graphics Approach
Algorithm / Block Diagram
Circuit Diagrams
Simulation Results
Conclusion

2
Introduction
What is BCD?
Binary Coded Decimal
(BCD) is a class of binary
encoding where decimal
numbers are represented by
a fixed number of binary
digits. The table below
shows the 4-bit
representation of decimal
digits (0-9) as BCD.


Decimal
Digit
BCD
8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
3
Introduction
Why BCD?
BCD is used in computing
and electronics system,
mainly because it allows for
easy conversion to decimal
digits for printing, display
and fast decimal arithmetic
calculations.


4
Introduction
Where can you find BCD?
BCD is common in digital logic for purposes of displaying a
numeric value in an electronic system. Storing the same value to
be displayed as a binary would require conversion to ASCII to be
understood once displayed, resulting in a more expensive
process.
Examples of BCD in electronics: 7 Segment Displays, Digital Watches,
Automotive Displays

5
Introduction
Converting from decimal to BCD:
65
Dec
= 0110 0101
BCD

BCD representation as Binary:
0110 0101
Bin
= 1x2
0
+ 1x2
2
+ 1x2
5
+1x2
6
= 1 + 4
+ 32 + 64 = 101
Dec

PROBLEM: 0110 0101
Bin
65
Dec
!!

BCD to Binary:
We want to show 01100101
BCD
as 0100 0001
Bin
6
Algorithm
How do we go about converting from BCD to
Binary?
Our Internet research led us to find circuits that could
convert from Binary to BCD, but not BCD to Binary.
So we just made our own, working algorithm.

Continuing with previous example: 65
Dec
= 0110 0101
BCD

65
Dec
= (6 x10) + 5

Our Concept:
Use the left most nibble and multiple by 10.
Use adder to then add output of multiplication with
right nibble and ultimately obtain the desired binary
result.
7
Algorithm
Decimal to BCD BCD to Binary
8
Circuit Creation Breakdown
8-Bit Adder
1-Bit Adder (x8)
Combinational Logic (XOR, OR, AND)
CMOS Inverter Logic
9
CMOS Inverter Circuit Design
Circui
t

10
Symb
ol

CMOS Inverter Logic
CMOS Inverter Simulation
11
Input Output
0 1
1 0
Truth Table

AND Gate Circuit Design
12
Circui
t

Symb
ol

Combinational Logic (XOR, OR, AND)
AND Gate Simulation
13
Input
Output
A B
0 0 0
0 1 0
1 0 0
1 1 1
Truth Table

OR Gate Circuit Design
14
Circui
t

Symb
ol

Combinational Logic (XOR, OR, AND)
OR Gate Simulation
15
Input
Output
A B
0 0 0
0 1 1
1 0 1
1 1 1
Truth Table

XOR Gate Circuit Design
16
Circui
t

Symb
ol

Combinational Logic (XOR, OR, AND)
XOR Gate Simulation
17
Input
Output
A B
0 0 0
0 1 1
1 0 1
1 1 0
Truth Table

1-Bit Adder Circuit Design
18
Circui
t

Symb
ol

1-Bit Adder (x8)
1-Bit Adder Simulation
19
8-Bit Adder Circuit Design
20
Circui
t

Symb
ol

BCD to Binary Circuit Design
21
BCD to Binary Truth Table
Dec
BCD
7
BCD
6
BCD
5
BCD
4
BCD
3
BCD
2
BCD
1
BCD
0
BIN7 BIN6 BIN5 BIN4 BIN3 BIN2 BIN1 BIN0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
2 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0
.
.
.
.
.
.
.
.
.
38 0 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0
.
.
.
.
.
.
.
.
.
65 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1
.
.
.
.
.
.
.
.
.
99 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1
22
6 5
3 8
32 +4+2 = 38
64 + 1 = 65
BCD to Binary Simulation
23
BCD Input

Binary Output

0
Conclusion
MENTOR GRAPHICS
Mentor Graphics gives engineers the ability to design, model, and test a system from
the high level of abstraction down to the structural gate level with the inclusion of:
Various Building Blocks
Simulation of Circuitry
User Defined Symbols
Availability to work with analog, digital and/or mixed signals.
Simple circuits can be completed with schematics while more complex circuits can
be implemented with Verilog or VHDL.
Easy integration with current channel length sizes used by foundries (i.e. TSMC -
Taiwan Semiconductor Manufacturing Company).
BCD 2 BINARY
Easy conversion to decimal numbers that can be displayed or used for simplifying
calculations.
Main component for proper implementation is the 8-Bit Full Adder, easily created in
Mentor Graphics through schematic representation.

24
References
http://cryptodox.com/Binary-coded_decimal
http://en.wikipedia.org/wiki/Binary-coded_decimal
http://www.flickr.com/photos/33947113@N03/4696915622/sizes/l/in/set-
72157620266822943/
http://www.tuaw.com/2011/03/09/apple-selects-taiwans-tsmc-to-produce-its-
a5-chip/
http://www.innovatoys.com/images/thumbs/led-binary-clock_1262290.jpg
http://www.meegoexperts.com/wp-
content/uploads/2010/12/258_mentor_logo.jpg
http://pixhost.me/avaxhome/2006-12-01/epcb1.gif
25

S-ar putea să vă placă și