Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App

BCD Adder in Digital Logic

Last Updated : 28 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

BCD stands for binary coded decimal. It is used to perform the addition of BCD numbers. A BCD digit can have any of ten possible four-bit representations. Suppose, we have two 4-bit numbers A and B. The value of A and B can vary from 0(0000 in binary) to 9(1001 in binary) because we are considering decimal numbers. 

The output will vary from 0 to 18 if we are not considering the carry from the previous sum. But if we are considering the carry, then the maximum value of output will be 19 (i.e. 9+9+1 = 19). When we are simply adding A and B, then we get the binary sum. Here, to get the output in BCD form, we will use BCD Adder.

What is BCD Adder?

A BCD adder is a circuit for the addition of two binary-coded decimal numbers. BCD is another format used in representing numbers where each digit will be represented using a 4-bit binary code. In BCD, it is obvious that the most significant bit (leftmost) is always 0, and therefore each digit will be confined to the range 0-9.

A BCD adder contains four full-adder circuits in cascade. Each full-adder is contrived to consider both the two BCD digits being added and a carry-in from the previous stage. The output of each full-adder produces a sum bit and a carry-out bit, which becomes the input to the following stage.

When adding BCD numbers, if the sum of two BCD digits is greater than 9, the result is greater than 1001 in binary and hence is not valid in BCD. A correction needs to be performed by adding 0110 (6 in BCD) to the sum to get the correct BCD result.

A BCD adder is, overall, a design capable of correctly adding two BCD numbers and making all necessary corrections so that the answer is also a valid BCD number.

Steps to Design a BCD Adder

  • Find Number of Digits : Find out how many Extended digits of BCD the adder should support. A BCD digit requires 4 bits.
  • Adder Structure : The full adder connected in series could be selected as the general adder structure. Any extra full-adder shall be incremented by one BCD digit addition plus a carry from the previous stage.
  • Full-Adder Circuit Implementation : Implement a full-adder circuit capable of adding two 4-bit BCD digits with a carry-in. The full adder shall output a sum bit and a carry-out bit
  • Interconnect the Full-Adders : Now, full-adders are connected in series with each other; at this point, carry-out from each stage will be given to carry-in of the next higher order stage.
  • Provide BCD Correction : The logic is implemented detecting whether the sum of two BCD digits is greater than 9. In the case of such, 0110 is added to the sum, and carry propagates to the next higher order stage.
  • Test the BCD Adder : The BCD adder functionality needs to be checked with the application of different BCD numbers to its input for the correctness of addition and correction handling.

Example 1:

Input : A = 0111 B = 1000 Output : Y = 1 0101 Explanation: We are adding A(=7) and B(=8). The value of binary sum will be 1111(=15). But, the BCD sum will be 1 0101, where 1 is 0001 in binary and 5 is 0101 in binary.

Example 2:

Input : A = 0101 B = 1001 Output : Y = 1 0100 Explanation: We are adding A(=5) and B(=9). The value of binary sum will be 1110(=14). But, the BCD sum will be 1 0100, where 1 is 0001 in binary and 4 is 0100 in binary.

Note: If the sum of two numbers is less than or equal to 9, then the value of BCD sum and binary sum will be same otherwise they will differ by 6(0110 in binary). Now, lets move to the table and find out the logic when we are going to add "0110". 

 We are adding "0110" (=6) only to the second half of the table. The conditions are:

  1. If C' = 1 (Satisfies 16-19)
  2. If S3'.S2' = 1 (Satisfies 12-15)
  3. If S3'.S1' = 1 (Satisfies 10 and 11)

So, our logic is

C' + S3'.S2' + S3'.S1' = 1

Advantages of BCD Adder

There are various reasons why a BCD adder is beneficial in digital logic.

  • Decimal Precision : BCD adders guarantee that when adding decimal numbers, they do not make mistakes since the process is conducted on digits that are Binary-Coded Decimal direct (0-9) this rules out any error related to switching from base 10 to base 2 or vice versa.
  • Simplified Decimal Arithmetic : When it comes to decimal arithmetic operations, BCD adders offer computerized systems with an easier way out making them fit for fields where calculations are predominantly in decimals such as, anywhere money is involved – shopping stores or market areas; calculators; and even real-time clocks.
  • Common Display Compatibility : The common display technologies such as 7-segment displays are directly compatible with BCD numbers thus making BCD adders suitable for applications where output should be displayed directly in decimal format.
  • Mistake Recognition : Just a simple addition is all that is required by such devices so as to find out the parity of invalid BCDs (for instance those larger than digit 9), making it easier for FEC systems. In this manner it forms part of an error detection system and correction scheme that ensure precision results.
  • High-Efficiency Circuit Design : BCD adders facilitate the creation of efficient, optimized circuits specifically designed for decimal arithmetic, which results in speedier processing times and less complicated digital circuits.

These benefits show how critical BCD adders are in processing decimal arithmetic using digital logic well and correctly.

Disadvantages of BCD Adder

  • Memory Misallocation : In comparison to binary digits, the BCD figures take up more memory to portray comparable values, hence generating greater memory use within BCD operational systems.
  • Restricted Set of Values : BCD adders are constrained to only decimal digits (0-9) hence cannot carry out direct arithmetic on values that are beyond this range without extra conversion circuitry thus restricting their versatility in some applications.
  • Lower Speed of Arithmetic Operations : Since they require BCD correction and manage decimal numbers, BCD adders may have lower operational speeds than binary ones affecting the overall performance of digital systems.
  • Compatibility concerns : BCD arithmetic could be at odds with some techniques or algorithms especially those that are improved to perform better in binary arithmetic; hence you get such compatibility problems when using both types of arithmetics within a system.
  • High Circuit Complexity​ : BCD adders are more complicated than binary adders owing to BCD correction logic requirements that make sure valid BCD outputs are produced. This increased complexity can also lead to bigger circuit sizes as well as more difficult designs.

Co​nclusion

To sum up, an accurate BCD adder circuit design in digital logic contains the assemblage of full adders that connect to multiple BCD digits for addition process, the addition and testing of such a circuit for BCD correction logic implementation will guarantee the correct functioning of this BCD adder. This design is important as it allows an efficient addition of binary-coded decimal numbers in computer systems.


S

sudiptadandapat
Improve
Article Tags :
  • Misc
  • GATE CS
  • Digital Logic
Practice Tags :
  • Misc

Similar Reads

    Difference between Combinational and Sequential Circuit
    In digital electronics, circuits are classified into two primary categories: The combinational circuits and the sequential circuits. Where the outputs depend on the current inputs are called combination circuit, combinational circuits are simple and effective for functions like addition, subtraction
    4 min read
    Half Adder in Digital Logic
    A half adder is a combinational logic circuit that performs binary addition of two single-bit inputs, A and B, producing two outputs: SUM and CARRY. The SUM output which is the least significant bit (LSB) is obtained using an XOR gate while the CARRY output which is the most significant bit (MSB) is
    3 min read
    Full Adder in Digital Logic
    Full Adder is a combinational circuit that adds three inputs and produces two outputs. The first two inputs are A and B and the third input is an input carry as C-IN. The output carry is designated as C-OUT and the normal output is designated as S which is SUM. The C-OUT is also known as the majorit
    5 min read
    Half Subtractor in Digital Logic
    A half subtractor is a digital logic circuit that performs the binary subtraction of two single-bit binary numbers. It has two inputs, A and B, and two outputs, Difference and Borrow. The Difference output represents the result of subtracting B from A, while the Borrow output indicates whether a bor
    4 min read
    Full Subtractor in Digital Logic
    A Full Subtractor is a combinational circuit used to perform binary subtraction. It has three inputs:A (Minuend)B (Subtrahend)B-IN (Borrow-in from the previous stage)It produces two outputs:Difference (D): The result of the subtraction.Borrow-out (B-OUT): Indicates if a borrow is needed for the next
    3 min read
    Half Adder and Half Subtractor using NAND NOR gates
    A Half Adder is a digital circuit that adds two single-bit binary numbers and outputs the sum and carry. It can be implemented using either NAND gates or with NOR gates. When using NAND gates : The sum output is given by A AND B. The carry output is given by the A AND B. ​​W​hen NOR gate is used : T
    4 min read
    Encoders and Decoders in Digital Logic
    Binary code of N digits can be used to store 2N distinct elements of coded information. This is what encoders and decoders are used for. Encoders convert 2N lines of input into a code of N bits and Decoders decode the N bits into 2N lines. 1. Encoders - An encoder is a combinational circuit that con
    4 min read
    Encoder in Digital Logic
    An encoder is a digital circuit that converts a set of binary inputs into a unique binary code. The binary code represents the position of the input and is used to identify the specific input that is active. Encoders are commonly used in digital systems to convert a parallel set of inputs into a ser
    7 min read
    Binary Decoder in Digital Logic
    A binary decoder is a digital circuit used to convert binary-coded inputs into a unique set of outputs. It does the opposite of what an encoder does. A decoder takes a binary value (such as 0010) and activates exactly one output line corresponding to that value while all other output lines remain in
    5 min read
    Combinational circuits using Decoder
    Combinational circuits utilizing decoders are basic parts in a computerized plan, assuming a significant part in making an interpretation of parallel data into noteworthy results. Decoders are combinational rationale gadgets that convert twofold information signals into an extraordinary arrangement
    8 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences