Code Converters - BCD(8421) to/from Excess-3
Last Updated :
28 Aug, 2024
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 since a decimal number can be nines' complemented (for subtraction) as easily as a binary number can be ones' complemented; just by inverting all bits.
For example, the excess-3 code for 3(0011) is 0110, and to find the excess-3 code of the complement of 3, we just need to find the 1's complement of 0110 -> 1001, which is also the excess-3 code for the 9's complement of 3 -> (9-3) = 6.
What is BCD?
BCD is a class of binary encodings of decimal numbers in which each decimal digit is represented by its own binary sequence. In the most common BCD encoding, the 8421 code, each decimal digit is represented by a 4-bit binary number. In the most common BCD encoding, the 8421 code, each decimal digit is represented by a 4-bit binary number:
0 is 0000
1 is 0001
2 is 0010
3 is 0011
4 is 0100
5 is 0101
6 is 0110
7 is 0111
8 is 1000
9 is 1001
BCD is used in systems that require the digital manipulation of decimal numbers as it is a technique that can be used for the arithmetic of BCD numbers. It gives an easy method of passing from one base to the other and saves much time in calculations where the accuracy of decimal is necessary.
What is Excess-3 Code?
Excess-3 code is one of the BCD code where every single decimal number is represented by a four bit binary number which is three in excess of BCD value. For instance, the decimal digit 0 will be represented in Excess-3 code as 0010 as since the scheme adds 3 to the original numbers. It is an unweighted self-complementary code which is employed in the digital systems with the intention of having it facile in taking complements and in arithmetic subtraction.
The self-complementary aspect to Excess-3 is that the 1’s complement of an Excess-3 number is equal to the Excess-3 code of the 9’s complement of the decimal form of the given numeral. Great care has been taken here to ensure that this feature can be used to compute the 9’s complement by just flipping all the bits.
Converting BCD(8421) to Excess-3
As is clear by the name, a BCD digit can be converted to its corresponding Excess-3 code by simply adding 3 to it. Since we have only 10 digits(0 to 9) in decimal, we don't care about the rest and marked them with a cross( X ).
Let A,\:B,\:C,\:and\:D be the bits representing the binary numbers, where D is the LSB and A is the MSB, and
Let w,\:x,\:y,\:and\:z be the bits representing the gray code of the binary numbers, where z is the LSB and w is the MSB.
The truth table for the conversion is given below. The X's mark is don't care condition.

To find the corresponding digital circuit, we will use the K-Map technique for each of the Excess-3 code bits as output with all of the bits of the BCD number as input.

Corresponding minimized Boolean expressions for Excess-3 code bits -
w = A+BC+BD\\ x = B^\prime C + B^\prime D +BC^\prime D^\prime\\ y = CD + C^\prime D^\prime \\ z = D^\prime
The corresponding digital circuit-

Converting Excess-3 to BCD(8421)
Excess-3 code can be converted back to BCD in the same manner.
Let A,\:B,\:C,\:and\:D be the bits representing the binary numbers, where D is the LSB and A is the MSB, and
Let w,\:x,\:y,\:and\:z be the bits representing the gray code of the binary numbers, where z is the LSB and w is the MSB.
The truth table for the conversion is given below. The X's mark is don't care condition.

K-Map for D

K-Map for C

K-Map for B

K-Map for A

Corresponding minimized Boolean expressions for Excess-3 code bits -
A = wx+wyz\\ B = x^\prime y^\prime + x^\prime z^\prime +xyz\\ C = y^\prime z+ yz^\prime \\ D = z^\prime
The corresponding digital circuit -
Here E_3,\:E_2,\:E_1,\:and\:E_0 correspond to w,\:x,\:y,\:and\:z and B_3,\:B_2,\:B_1,\:and\:B_0 correspond to A,\:B,\:C,\:and\:D .

Difference Between BCD and Excess-3
Feature | BCD | Excess-3 |
---|
Coding Method | Represents directly each decimal digit with its binary equivalent. | Represents each decimal digit with its binary equivalent plus 3. |
---|
Value range | Encodes decimal digits 0-9. | Encodes decimal digits 3-12 (with 0-9 wrapped around). |
---|
Arithmetic Operations | Additional logic needed for arithmetic operations. | Arithmetic operations are simplified by self- complementary. |
---|
Error Detection | Not very effective in detecting and correcting errors. | It is better in the error detection capability since it applies an encoding technique. |
---|
Complement Operation | The operation is slightly harder in implementing complex operations. | Complement operation in a more straightforward way due to self-complementing nature. |
---|
Binary Representation | Uses 4-bit binary to represent each decimal digit. | Uses 4-bit binary, but added 3 to the binary representation of each decimal digit. |
---|
Conversion Complexity | Direct conversion to/from decimal. | For conversion, add or subtract 3 for the binary value. |
---|
Conclusion
The article per excellence has sought to reveal the essence of Excess-3 code, as a highly effective BCD encoding scheme. One of this is that it is self-complementary and this characteristic makes arithmetic calculations and error checking easy in digital systems. Excess-3 code can be effectively used where exactness of digital computation is desirable, hence can be considered an efficient code to use in computing.
Similar Reads
Flip-Flop types, their Conversion and Applications In this article, we will go through the Flip-Flop types, their Conversion and their Applications, First, we will go through the definition of the flip-flop with its types in brief, and then we will go through the conversion of the flip-flop with its applications, At last, we will conclude our articl
7 min read
Synchronous Sequential Circuits in Digital Logic Synchronous sequential circuits are digital circuits that use clock signals to determine the timing of their operations. They are commonly used in digital systems to implement timers, counters, and memory elements.What is Sequential Circuit?A sequential circuit is a digital circuit, whose output dep
5 min read
Counters in Digital Logic A Counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. Counters are used in digital electronics for counting purpose, they can count specific event happening in the circuit. For example, in
4 min read
Ring Counter in Digital Logic A ring counter is a typical application of the Shift register. The ring counter is almost the same as the shift counter. The only change is that the output of the last flip-flop is connected to the input of the first flip-flop in the case of the ring counter but in the case of the shift register it
7 min read
n-bit Johnson Counter in Digital Logic Prerequisite - Counters Johnson counter also known as creeping counter, is an example of synchronous counter. In Johnson counter, the complemented output of last flip flop is connected to input of first flip flop and to implement n-bit Johnson counter we require n flip-flop. It is one of the most im
5 min read
Ripple Counter in Digital Logic Counters play a crucial role in digital logic circuits, enabling tasks such as clock frequency division and sequencing. This article explores the concept of ripple counters, a type of asynchronous counter, their operation, advantages, and disadvantages in digital logic design. What is a Counter?Coun
5 min read
Design counter for given sequence A Counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. Counters are used in digital electronics for counting purpose, they can count specific event happening in the circuit. For example, in
3 min read
Master-Slave JK Flip Flop Prerequisite -Flip-flop types and their ConversionRace Around Condition In JK Flip-flop - For J-K flip-flop, if J=K=1, and if clk=1 for a long period of time, then Q output will toggle as long as CLK is high, which makes the output of the flip-flop unstable or uncertain. This problem is called race
4 min read
Asynchronous Sequential Circuits An asynchronous sequential circuit does not have the clock signal; the transitions between different states occur due to the âchange of inputsâ. This makes them suitable for applications which involve low power input or when a clock signal may not be needed. In this article, we explain how these cir
6 min read
Shift Registers in Digital Logic Pre-Requisite: Flip-FlopsFlip flops can be used to store a single bit of binary data (1 or 0). However, in order to store multiple bits of data, we need multiple flip-flops. N flip flops are to be connected in order to store n bits of data. A Register is a device that is used to store such informati
8 min read