0% found this document useful (0 votes)
34 views17 pages

Deld Report

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views17 pages

Deld Report

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

A MINI PROJECT REPORT ON:

BCD TO DECIMAL CONVERTER

SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE IN THE PARTIAL FULFILLMENT OF THE
REQUIREMENTS FOR THE AWARD OF THE

BACHELOR OF ENGINEERING (COMPUTER ENGINEERING) BY group 12 :

Hajare Vishal Mahadev (S.E-A:45)

Ishan Jadhav (S.E-A:46)

Jade Shruti Kiran (S.E-B:47)

Jadhav Shravani Nitin (S.E-B:48)

DEPARTMENT OF COMPUTER ENGINEERING

SHALAKA FOUNDATION’S KEYSTONE SCHOOL OF ENGINEERING

NEAR HANDEWADI CHOWK, PUNE-412308

ACADEMIC YEAR 2024-25


Index:

Sr.No: Topic Page No:

1 Acknowlegdement 01

2 Certificate 02

3 Abstract 03

4 System Specification 04

5 Introduction 05

6 Implementation 06-08

7 Application & Conclusion 09-10


ACKNOWLEDGEMENT

It takes immense pleasure in presenting the complete Mini-Project report on BCD to Decimal Converter
which involves a circuit that can converts Binary Coded decimal (BCD) inputs into a decimal output. I
extend my deepest gratitude to my guide, Prof. Manjusha Mishra for their unwavering support and
guidance. I also wish to thank my Head of Department, Prof. Sagar Rajebhosale, for his invaluable
insights. My heartfelt appreciation goes to Dr. Sandeep Kadam, Principal of our institution, and Prof. Y.R.
Soman,Director, for their encouragement and cooperation throughout the Mini-Project. This Mini-Project
would not have been possible without the support of our faculty members, dear parents, and friends .

Hajare Vishal Mahadev (S.E-A:45)

Ishan Jadhav (S.E-A:46)

Jade Shruti Kiran (S.E-B:47)

Jadhav Shravani Nitin (S.E-B:48)

SHALAKA FOUNDATION’S

KEYSTONE SCHOOL OF ENGINEERING DEPARTMENT OF COMPUTER ENGINEERING


CERTIFICATE

This is to certify that the SPPU Curriculum-based Mini-Project report entitled

BCD to Decimal Converter: Stimulate a circuit that converts Binary Coded Decimal (BCD) inputs into a decimal

output

Submitted by group 12:

Hajare Vishal Mahadev (S.E-A:45)

Ishan Jadhav (S.E-A:46)

Jade Shruti Kiran (S.E-B:47)

Jadhav Shravani Nitin (S.E-B:48)

have satisfactorily completed the curriculum-based Mini-Project under the guidance of Prof.Manjusha Mishra
towards the fulfillment of 2nd year Computer Engineering , Academic Year 2024-25 of Savitribai Phule Pune
University.

Prof. Manjusha Mishra Prof. Sagar Rajebhosale Dr. Sandip Kadam

Mini Project Guide Head of Department Principal

Place: Pune

Date :21/10/2024
Abstract:

 This mini project presents the design and implementation of a Binary-


Coded Decimal (BCD) to Decimal converter, a crucial tool for converting
numerical values represented in BCD format into their corresponding
decimal representations.
 BCD is a binary encoding scheme where each digit of a decimal number
is represented by its own binary sequence, facilitating easier human
readability and manipulation of decimal numbers in digital systems.
 The converter is designed to take a BCD input, process each nibble (4
bits) corresponding to individual decimal digits, and output the
equivalent decimal number.
 The project employs both software and hardware components, utilizing
a microcontroller for the implementation and a simple user interface for
input and output. This converter not only enhances the understanding of
number systems but also serves practical applications in embedded
systems and digital electronics, where BCD representation is commonly
used.
 The effectiveness of the converter is demonstrated through various test
cases, showcasing its accuracy and reliability in performing conversions.
The systems ensures accurate and efficient conversions, catering to
applications in digital instrumentation, computing and embedded
system.

KEYWORDS: BCD, Decimal Converter, Microcontroller, Digital Electronics,


Embedded Systems.

-----------------------------------------------------------------------------------------------------
System Specifications:
The BCD to Decimal Converter is designed to convert numbers from Binary-
Coded Decimal (BCD) format to standard decimal format. This document
outlines the specifications for the system, including functionality, input/output
requirements, hardware and software components, and performance criteria.
System Overview :
The converter will take a BCD input, process it, and display the corresponding
decimal output. The system will be user-friendly and efficient, suitable for
educational purposes and practical applications in digital electronics.

1]Functional Requirements:
Input Handling :
- Accept BCD input as a binary string or through switches.
- Support for 4-bit nibbles representing decimal digits (0-9).

Conversion Logic :
- Process each nibble to extract decimal values.
- Accumulate the decimal values into a final output.

Output Display :
- Display the resulting decimal number on a 7-segment display or LCD.
- Provide error handling for invalid BCD inputs (e.g., nibbles greater than
1001).

2] User Interface:
Input Method:
- A keypad or set of switches for user input
Output Method:
- A visual display (LCD or 7-segment display) to show the converted decimal
number.

Control Buttons:
- Buttons for initiating the conversion and resetting the system.

3] Hardware Specifications:
Microcontroller:
- A microcontroller (e.g., Arduino, PIC) to perform the conversion logic
manage inputs/outputs.

Display:
- 7-segment display or LCD module for output.

Input Devices:
- Keypad or switch panel for BCD input.

Power Supply:
- Suitable power source (e.g., USB or battery) to power the microcontroller
and display.

4] Software Specifications:
Programming Language:
- The converter will be programmed in C/C++ or Python
Algorithm:
- Input parsing to read BCD values.
- Conversion algorithm to compute decimal output.
- Error checking for valid BCD input.

5] Performance Requirements:
Conversion Speed:
- The system should provide instantaneous feedback (conversion within
milliseconds).

Accuracy:
- The conversion must accurately reflect decimal values corresponding to the
BCD input.

Error Handling:
- Clearly indicate errors for invalid inputs through display or LED indicators.

6] Testing and Validation:


Test Cases:
- Validate conversion with known BCD values and check for correct decimal
outputs.

Edge Cases:
- Test maximum (9999) and minimum (0000) BCD values.
- Test invalid inputs (e.g., BCD values like 1010 or higher).
Introduction:
Binary Coded Decimal (BCD) is a widely used numeric representation in digital
systems, where each decimal digit is encoded using 4 binary bits. However,
many applications require decimal numbers for display, computation, or human
interaction. The conversion of BCD numbers to decimal representations is
crucial in various fields, including digital instrumentation, embedded systems,
and computing.
 Problem Statement:
The conversion of BCD numbers to decimal numbers is a complex process,
requiring efficient algorithms and precise implementation. Existing conversion
methods often involve manual calculations or software-based solutions, which
can be time-consuming, prone to errors, and limited in scalability.

 Project Objective:
The objective of this mini project is to design, develop, and implement a
reliable and efficient BCD to Decimal Converter using
[Microcontroller/Programming Language]. The converter should accept 4-bit/8-
bit BCD inputs and produce equivalent decimal numbers, displaying the results
on a [LCD/LED display].

 Project Scope:
This project aims to:s
1. Understand BCD and decimal number systems.
2. Design and implement an efficient BCD to decimal conversion algorithm.
3. Utilize [Microcontroller/Programming Language] for hardware/software
implementation.
4. Verify and validate the converter's accuracy and performance.
5. Develop a user-friendly interface for input/output operations.
Project Significance

The successful implementation of this project will provide:

1. Efficient conversion of BCD numbers to decimal representations.


2. Improved accuracy and reliability in digital instrumentation and computing.
3. Enhanced understanding of binary and decimal number systems.
4. A compact and low-power solution for embedded systems.

Project Outline

This project report will cover:

1. Literature Review
2. Methodology
3. Circuit Diagram and Hardware Implementation
4. Software Implementation (Algorithm and Code)
5. Results and Discussion

-----------------------------------------------------------------------------------------------
Implementation:

BCD to Decimal Conversion (bcd_to_decimal function)

1. Initialize decimal variable to store the decimal result.


2. Initialize power variable to keep track of the decimal place value (10^0,
10^1, ...).
3. Iterate through each nibble (4-bit binary number) in the BCD string:
- Extract the current nibble using slicing (bcd[i*4:(i+1)*4]).
- Convert the nibble to decimal using int(nibble, 2).
- Multiply the decimal value by the current power of 10 (power).
- Add the result to the decimal variable.
- Increment power by multiplying it by 10.
4. Return the final decimal result.

Decimal to BCD Conversion (decimal_to_bcd function)

1. Initialize an empty string bcd to store the BCD representation.


2. Iterate num_digits times:
- Calculate the last digit of the decimal number using decimal % 10.
- Convert the digit to binary using format(nibble, '04b').
- Prepend the binary string to the bcd string.
- Divide the decimal number by 10 (decimal //= 10).
3. Return the final BCD string.
Key Concepts

- BCD (Binary Coded Decimal) representation: Each decimal digit is encoded as


a 4-bit binary number.
- Nibbles: 4-bit binary numbers representing each decimal digit.
- Decimal place value: The power of 10 associated with each decimal digit.

Example Walkthrough

Suppose we want to convert the BCD string "01001010" to decimal.

- bcd_to_decimal function:
1. Initialize decimal = 0, power = 1.
2. Iterate through nibbles:
- Nibble 1: "0100" -> decimal 4, decimal = 4.
- Nibble 2: "1010" -> decimal 8, decimal = 4 + 8*10 = 84.
3. Return decimal = 82 ( corrected).

Now, let's convert the decimal number 82 to BCD.

- decimal_to_bcd function:
1. Initialize bcd = "".
2. Iterate 2 times (num_digits = 2):
- Digit 1: 2 -> binary "0010", bcd = "0010".
- Digit 2: 8 -> binary "1000", bcd = "1000" + "0010" = "10000010".
3. Return bcd = "10000010" (padded with leading zeros).
BCD TO DECIMAL CONVERTER:

A digital circuit that can convert a binary-coded decimal (BCD) number into an
equivalent decimal number is referred to as a BCD-to-decimal converter.

The input to a BCD to decimal converter is an 8421 BCD code and the output
generated by the converter is a decimal number.

The following is the truth table of the BCD to decimal converter describing its
operation.

BCD Code
Decimal
B3 B2 B1 B0

0 0 0 0 D0

0 0 0 1 D1

0 0 1 0 D2

0 0 1 1 D3

0 1 0 0 D4

0 1 0 1 D5

0 1 1 0 D6

0 1 1 1 D7

1 0 0 0 D8

1 0 0 1 D9

We can derive the Boolean expressions for each of the decimal outputs in terms of 8421 BCD
code. These Boolean expressions are given below −

D0=B3¯B2¯B1¯B0¯
D1=B3¯B2¯B1¯B0
D2=B3¯B2¯B1B0¯
D3=B3¯B2¯B1B0
D4=B3¯B2B1¯B0¯
D5=B3¯B2B1¯B0

D6=B3¯¯¯¯¯¯B2B1B0¯¯¯¯¯¯D6=B3¯B2B1B0¯
D7=B3¯¯¯¯¯¯B2B1B0D7=B3¯B2B1B0
D8=B3B2¯¯¯¯¯¯B1¯¯¯¯¯¯B0¯¯¯¯¯¯D8=B3B2¯B1¯B0¯
D9=B3B2¯¯¯¯¯¯B1¯¯¯¯¯¯B0D9=B3B2¯B1¯B0

The logic circuit implementation of the BCD to decimal converter is shown in


the following figure.
Applications :

Conclusion:

 The design and implementation of a Simple ALU illustrate the


fundamental operations that underpin digital computation.
 Through this project, we have demonstrated how basic arithmetic and
logic operations are performed using binary numbers, emphasizing the
significance of ALUs in modern computing architectures.
 As technology advances, the principles laid out in this report remain
relevant for understanding more complex computing systems.

You might also like