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
Next Article:
Excess-3 Code
Next article icon

Excess-3 Code

Last Updated : 12 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Excess-3 is a binary coded decimal (BCD) code with unquestionable significance, seen for its work in enhancing number shuffling tasks in early enlisting structures and smaller-than-expected PCs. It offers an intriguing depiction for each decimal digit by adding a legitimate worth of 3 to the standard 4-cycle matched depiction. In a paired environment, the goal of this distinctive coding strategy was to smooth out math processes.

Table of Content

  • What is Excess-3 Code?
  • Solved Examples
  • Why we use Excess-3 ?
  • Converting into BCD codes 
  • Self-Complementary Property
  • Advantages
  • Disadvantages
  • Applications
  • Differences

What is Binary Coded Decimal (BCD)?

Binary Coded Decimal is a type of binary encoding method. It is used to represent the decimal number in a form of a binary. In BCD, each digit of the number is encoded by fixed binary numbers.

This type of coding is called Binary Coded Decimal, where it gives the decimal number a binary representation; instead of using one binary bit for every digit to represent in decimal, it uses a group of four binary bits, which then helps in easier human interaction and computation with decimal numbers.

Types of Binary Coded Decimal (BCD)

  1. 8421 BCD (Natural BCD): Nonoverlapping; each decimal digit is represented in 4-bit binary. Example: Decimal 7 = 0111
  2. Excess-3 BCD: Each decimal digit is incremented by 3 before being converted to binary; it is very commonly used for error detection. Example: Decimal 0 = 0011
  3. Packed BCD: Two decimal digits are represented in one byte; that is, 8 bits are used. Example: Decimal 75 = 01110101
  4. Unpacked BCD: One decimal digit per byte; the lower nibble represents the digit. For example: Decimal 7 = 00000111
  5. Gray Coded BCD: Ensures that only one bit change between two consecutive decimal digits to prevent errors.

What is Excess-3 Code?

The Excess-3 code, also known as the Stibitz code, it is a binary coded decimal (BCD) code that is utilized to address decimal digits that are arranged in a particular double structure. In this coding plan, each decimal digit is tended to by its relating 4-bit double portrayal with the extension of 3. The essential job of Excess-3 code is to enhance math undertakings in a twofold environment, especially in early figuring systems and smaller than normal PCs.

Representation of Excess-3 Code

The Excess-3 code for the decimal number is as follows:

DECIMAL DIGIT

BCD CODE

EXCESS-3 CODE

0

0000

0011

1

0001

0100

2

0010

0101

3

0011

0110

4

0100

0111

5

0101

1000

6

0110

1001

7

0111

1010

8

1000

1011

9

1001

1100

In excess-3 code, the codes 1111 and 0000 are never used for any decimal digit. Now let's take few examples of Excess-3 code.

Solved Examples of Excess 3 Code

We have some examples to understand the concept better :

Example - 1 : Decimal number of 9

Binary Representation of 9 is 1001

Now Add 3 to Each Bit: 1001 + 0011 = 1100

Therefore, 1100 is the Excess - 3 code for the decimal number 9

Example - 2 : Decimal number of 15

Add 3 to 1 and 5 both separately after converting them into binary(4 bit).

So, 1 = (0001)2 and 5 = (0101)2

Now add 3 to both the digit, 1+3 = 4 = (0100)2 and 5+3 = 8 = (1000)2

Therefore, 0100 1000 is the Excess - 3 code for the decimal number 15

Example - 3 : Decimal number of 6

Binary Representation of 6 is 0110

Now Add 3 to each Bit: 0110 + 0011 = 1101

Therefore, 1101 is the Excess - 3 code for the decimal number 6

Why we use Excess-3 ?

There are the following advantages of excess-3 code which make it required to use:

  • These codes are generally unweighted binary decimal codes.
  • These codes are self-integral.
  • These codes utilize biased representation.
  • The excess-3 code has no limit, so it significantly works on arithmetic activities.
  • This code plays an essential part in arithmetic tasks. It is on the grounds that it settle inadequacies which are experienced when we utilize the 8421 BCD code for adding two decimal digits whose aggregate is more prominent than 9.

Converting into Binary Coded Decimal (BCD) Codes 

Converting Excess 3 code 1010101 into BCD number.

STEP 1 - Group the number in 4-bit format.

1010101 = 0101 0101

STEP 2 - Subtract the formed number with 0011 0011

0101 0101 - 0011 0011 = 0010 0010

So, the BCD number will be 0010 0010.

Self-Complementary Property

Excess 3 code having the property of self complementary which means they are always complements themselves. If we have 0 then it will complement with 1, or if it will have 1 then it will complements with 1.

Additionally, the XS-3 code is regarded as the Excess-3 code. To address decimal numbers, the excess-3 code is a self-correlative, non-weighted BCD code. The portrayal of this code is biased. This code expects a huge part in calculating undertakings since it settle needs experienced when we use the 8421 BCD code for adding two decimal digits whose total is more unmistakable than 9. As opposed to the typical non-one-sided BCD or the twofold positional number framework, the Overabundance 3 code utilizes an exceptional sort of calculation.

Example

Excess 3 code for 5 = 1000

1's complement of 1000 = 0111

And 0111 is the excess 3 code for 4

Advantages of Excess-3 Code

  • Simplifies Arithmetic Operations: Excess -3's ability to improve on math tasks like expansion and deduction in a binary-coded decimal (BCD) environment is one of its primary advantages. The extension of 3 to each digit streamlines the convey spread process.
  • Decimal to Binary Translation: The clear course of changing over from decimal to Excess -3 makes it more straightforward to make an interpretation of decimal digits into a paired coded structure straightforwardly.
  • Compatibility with Binary Systems: Excess -3 is designed to work with paired frameworks, so it's good for applications that need to show and control decimal digits directly in a parallel coded system.
  • Convey Proliferation Improvement: The extension of 3 to each cycle in Excess -3 adds to a dealt with convey multiplication framework during number shuffling undertakings, particularly in electronic circuits.
  • Unique Representation: Excess -3 gives an original twofold depiction to each decimal digit. This uniqueness deals with botch distinguishing proof and ensures that each digit has an indisputable code.

Disadvantages of Excess-3 Code

  • Limited Applicability in Modern Computing:Excess-3 was for the most part basic, it is less commonly used in current enlisting. More capable coding plans have been made to address express necessities in contemporary structures.
  • Representation that Is Invalid: The addition of three to each piece results in a more prominent code than is required for double-coded decimal representation. This ought to be noticeable as a kind of clear redundancy, and more capable coding plans could avoid such excess.
  • Historical Context: While Excess-3's verifiable importance is significant, it may not consolidate a portion of the developments and improvements that have been created in later coding plans.
  • Reverse conversion complexity: While changing over from Excess-3 to decimal is possible by deducting 3 from each piece, the collaboration may be considered less intuitive appeared differently in relation to other coding plans. This complexity may be a disadvantage in some circumstances.
  • Not Appropriate for Non-Decimal Bases:Excess-3 is expressly expected for decimal digits, and its properties may not be directly appropriate to bases other than 10. For non-decimal bases, elective coding plans may be more appropriate.

Applications of Excess-3 Code

  • Electronic Calculators: In the early electronic adding machines, excess-3 was much of the time used to perform decimal number-crunching. Its clever coding plan enhanced the execution of development and derivation errands in these contraptions.
  • Computer Decimal Arithmetic:Excess-3 discovered PC decimal math applications at the start of processing. It was essential for particular computations and information handling tasks due to its ability to smooth out activities involving number juggling.
  • Error Detection: The excellent depiction of each and every decimal digit in excess-3works with botch acknowledgment. Deviations from expected codes can show botches in calculating exercises or data depiction.
  • Digital Communication Systems: In unambiguous high level correspondence systems where decimal data ought to be conveyed or taken care of, excess-3 can be utilized to chip away at decimal calculating undertakings.
  • Education and Training:Excess-3 is ordinarily used in educational settings to show equal coded decimal number shuffling and to frame coding plans. It gives a genuine delineation to fathoming how parallel conditions address decimal digits.

Differences Between BCD, Gray Code and Excess-3 Code

FEATURE

BCD(Binary Coded Decimal)

Gray Code

Excess-3

Decimal Range

It represents decimal digits from 0 to 9

It represents decimal digits from 0 to 9

It represents decimal digits from -3 to 6

Arithmetic Operation

It is well- suited for arithmetic operation

It is Not well- suited for arithmetic operation

It is well- suited for arithmetic operation

Code Efficiency

Less efficient

More efficient

Less efficient

Bit Changes

Multiple bits change

Only one bit changes

Multiple bits changes

Error Detection

BCD provides good error detection

It provides good error detection due to single bit changes

It provides good error detection

Binary to Decimal Conversion

Straightforward conversion from 4 bit to decimal

More complex conversion due to non linear nature

Subtracting 3 from each 4 bit binary representation

Applications

Commonly used in displays and calculators

it is used in rotary encoders

it is used in BCD adders

Conclusion

In conclusion, the Excess-3 (XS-3) code has had a significant impact on processing throughout its entire history due to its remarkable representation of decimal digits in paired structure. Made to chip away at number shuffling errands in a parallel coded decimal (BCD) environment, Excess-3 found all over use in early electronic smaller than usual PCs and computers. Its specific part of adding 3 to the 4-cycle matched depiction of each and every decimal digit streamlined the course of choice and allowance, enhancing convey multiplication in electronic circuits.


Next Article
Excess-3 Code

S

sadasivareddy
Improve
Article Tags :
  • Digital Logic
  • Geeks Premier League
  • Electronics Engineering
  • Geeks Premier League 2023

Similar Reads

    Code Converters - BCD(8421) to/from Excess-3
    Prerequisite - Number System and base conversions Excess-3 binary code is an unweighted self-complementary BCD code. Self-Complementary property means that the 1's complement of an excess-3 number is the excess-3 code of the 9's complement of the corresponding decimal number. This property is useful
    5 min read
    Contest Experiences | Codeforce Round: #878 (Div. 3)
    About the Contest: The contest was organized by Codeforces on June 6, 2023. It consisted of 8 questions and the time given to solve them was 2 hours 15 minutes i.e. 135 mins. Link of the Contest: Codeforces Round #878 (Div 3) Overview of the Questions:Problem Name Difficulty Pre-Requisite Time to So
    6 min read
    Coding Ninjas Codekaze Interview Experience 2023
    Hello All I Am going to explain About The Coding ninjas Codekaze Experience Coding Ninjas Introduction: It is one of the coding platforms where people will learn about coding. Date: Sep 15th/2023 Time: 8 pm to 10 pm Rounds For Codekaze : Aptitude Round Coding Round Aptitude Round:There are 30 marks
    1 min read
    Contest Experiences | Codeforce Round: #871 (Div. 4)
    About the contest: The contest was organized by Codeforces on May 6, 2023. It consisted of 8 questions and the time given to solve them was 2 hours 30 minutes i.e. 150 mins. Link of the Contest: Codeforces Round #871 (Div 4) Overview of the QuestionsProblem Name Difficulty Pre-Requisite Time to Solv
    8 min read
    Ticket Encoding Sequence
    You are working at a ticketing company that generates unique ticket codes for various events. You have given a number N and your task is to print the Nth ticket code. The ticket codes are generated based on a specific encoding sequence. The encoding sequence follows the recursive formula as describe
    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