+ All Categories
Home > Documents > BCD 2 Binary

BCD 2 Binary

Date post: 26-Dec-2015
Category:
Upload: -
View: 68 times
Download: 1 times
Share this document with a friend
Description:
bcd to binary
25
BCD TO BINARY CONVERTER Mohammad Atiqul Islam Riasat Khan EEL 6726 Advanced VLSI Design Gonzalo Medina David Viviescas
Transcript
Page 1: BCD 2 Binary

BCD TO BINARY CONVERTERMohammad Atiqul IslamRiasat Khan

EEL 6726 Advanced VLSI Design

Gonzalo MedinaDavid Viviescas

Page 2: BCD 2 Binary

Contents

Introduction Explanation of BCD History and Applications of BCD

Mentor Graphics Approach Algorithm / Block Diagram

Circuit Diagrams Simulation Results Conclusion

2

Page 3: BCD 2 Binary

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

BCD8 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

Page 4: BCD 2 Binary

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

Page 5: BCD 2 Binary

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

Page 6: BCD 2 Binary

Introduction

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

BCD representation as Binary: 0110 0101Bin = 1x20 + 1x22 + 1x25 +1x26 = 1

+ 4 + 32 + 64 = 101Dec

PROBLEM: 0110 0101Bin ≠ 65Dec!!

BCD to Binary: We want to show 01100101BCD as 0100 0001Bin

6

Page 7: BCD 2 Binary

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: 65Dec= 0110 0101BCD 65Dec = (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

Page 8: BCD 2 Binary

Algorithm

Decimal to BCD

Decimal to BCD

BCD to BinaryBCD to Binary

8

Page 9: BCD 2 Binary

Circuit Creation Breakdown

8-Bit Adder

1-Bit Adder (x8)

Combinational Logic (XOR, OR, AND)

CMOS Inverter Logic

9

Page 10: BCD 2 Binary

CMOS Inverter Circuit Design

Circuit

10

Symbol

CMOS Inverter Logic

Page 11: BCD 2 Binary

CMOS Inverter Simulation11

InputOutpu

t

0 1

1 0

Truth Table

Page 12: BCD 2 Binary

AND Gate Circuit Design12

Circuit Symbol

Combinational Logic (XOR, OR, AND)

Page 13: BCD 2 Binary

AND Gate Simulation13

InputOutpu

tA B

0 0 0

0 1 0

1 0 0

1 1 1

Truth Table

Page 14: BCD 2 Binary

OR Gate Circuit Design14

Circuit Symbol

Combinational Logic (XOR, OR, AND)

Page 15: BCD 2 Binary

OR Gate Simulation15

InputOutpu

tA B

0 0 0

0 1 1

1 0 1

1 1 1

Truth Table

Page 16: BCD 2 Binary

XOR Gate Circuit Design16

Circuit Symbol

Combinational Logic (XOR, OR, AND)

Page 17: BCD 2 Binary

XOR Gate Simulation17

InputOutpu

tA B

0 0 0

0 1 1

1 0 1

1 1 0

Truth Table

Page 18: BCD 2 Binary

1-Bit Adder Circuit Design18

Circuit Symbol

1-Bit Adder (x8)

Page 19: BCD 2 Binary

1-Bit Adder Simulation19

Page 20: BCD 2 Binary

8-Bit Adder Circuit Design20

Circuit Symbol

Page 21: BCD 2 Binary

BCD to Binary Circuit Design

21

Page 22: BCD 2 Binary

BCD to Binary Truth Table

DecBCD

7BCD

6BCD

5BCD

4BCD

3BCD

2BCD

1BCD

0BIN7

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 832 +4+2 =

38

64 + 1 = 65

Page 23: BCD 2 Binary

BCD to Binary Simulation23

BCD Input Binary Output

0

Page 24: BCD 2 Binary

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

Page 25: BCD 2 Binary

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-p

roduce-its-a5-chip/ http://www.innovatoys.com/images/thumbs/led-binary-clock_1262

290.jpg http://www.meegoexperts.com/wp-content/uploads/2010/12/258_

mentor_logo.jpg http://pixhost.me/avaxhome/2006-12-01/epcb1.gif

25


Recommended