0% found this document useful (0 votes)
10 views21 pages

Decimal Adders

The document discusses decimal adders, specifically the BCD (Binary-Coded Decimal) code and its implementation in digital circuits. It explains how to perform binary addition with corrective procedures for sums between 10-19, and introduces decoders and encoders, including priority encoders, highlighting their roles in converting binary information and their applications in logic design. Additionally, it covers the use of enable inputs for decoders and the construction of larger decoders from smaller ones.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views21 pages

Decimal Adders

The document discusses decimal adders, specifically the BCD (Binary-Coded Decimal) code and its implementation in digital circuits. It explains how to perform binary addition with corrective procedures for sums between 10-19, and introduces decoders and encoders, including priority encoders, highlighting their roles in converting binary information and their applications in logic design. Additionally, it covers the use of enable inputs for decoders and the construction of larger decoders from smaller ones.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Decimal Adders

8421 weighted coding scheme or BCD Code


Decimal Digit BCD
0 0000
1 0001
2 0010 Forbidden codes: 1010,
3 0011 1011, 1100, 1101, 1110,
1111
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Decimal Adder
• Inputs: 𝐴3 𝐴2 𝐴1 𝐴0 , 𝐵3 𝐵2 𝐵1 𝐵0 , 𝐶𝑖𝑛 from
previous decade.
• Output: 𝐶𝑜𝑢𝑡 (carry to next decade),
𝑍3 𝑍2 𝑍1 𝑍0 .
• Idea: Perform regular binary addition and
then apply a corrective procedure.
Comparing Binary and BCD Sums
Decimal Sum K 𝑷𝟑 𝑷𝟐 𝑷𝟏 𝑷𝟎 𝑪𝒐𝒖𝒕 𝒁𝟑 𝒁𝟐 𝒁𝟏 𝒁𝟎 𝐶𝑜𝑢𝑡 is
set to 0
0-9 ---------Same-----------
10 0 1 0 1 0 1 0 0 0 0
11 0 1 0 1 1 1 0 0 0 1
12 0 1 1 0 0 1 0 0 1 0
13 0 1 1 0 1 1 0 0 1 1
14 0 1 1 1 0 1 0 1 0 0
15 0 1 1 1 1 1 0 1 0 1
16 1 0 0 0 0 1 0 1 1 0
17 1 0 0 0 1 1 0 1 1 1
18 1 0 0 1 0 1 1 0 0 0
19 1 0 0 1 1 1 1 0 0 1
Decimal Adder
• No correction needed when the decimal sum is
between 0-9.
• Must apply a correction when the sum is
between 10-19.
• Case 1:
– 16-19: K is set to 1. Add binary quantity 0110 to
𝑃3 𝑃2 𝑃1 𝑃0 .
– 10-15: 𝐾𝑃3 𝑃2 𝑃1 𝑃0 are set to 01010, 01011, . . ,
01111. Need to add 6. Use a K-map to obtain a
Boolean expression to detect these six binary
combinations.
A single-decade BCD Adder
Decoder
• Digital information represented in some
binary form must be converted into some
alternate binary form.
• 𝑛 to 2𝑛 -line decoder.
• Only one of the 2𝑛 output lines responds, with
a logic-1, to a given input combination of
values on its 𝑛-input lines.
Realization

Symbol

Logic Diagram

Truth Table
Decoder
• Input combinations can be regarded as binary
numbers with the consequences that the j-th
output line is at logic-1 for j = 0, 1, . . , 7 only
when input combination j is applied.
Other types of Decoders
• Function-specific decoders with less than 2𝑛
outputs exist.
• Example: Decoder with 4 inputs and 10
outputs in which a single responding output
line corresponds to a combination of the 8421
code.
• Example: Four input, seven output decoder
that accepts the 4 bits of the 8421 code and is
used to drive a seven-segment display.
Logic Design Using Decoders
• An 𝑛-to-2𝑛 line decoder is a minterm generator.
• By using or-gates in conjunction with an 𝑛-to-2𝑛
line decoder, realizations of Boolean functions are
possible.
• Do not correspond to minimal sum-of-products.
• Are simple to produce. Particularly convenient
when several functions of the same variable have
to be realized.
Minterms using OR Gates
Minterms using NOR Gates
Implementing a Decoder using NAND

Symbol

Logic Diagram

Truth Table
Minterms using AND gates

𝑓1 = ∑𝑚 0,2,6,7 , 𝑓2 = ∑𝑚(3,5,6,7)
Decoders with an Enable Input

Symbol
Logic Diagram

Truth Table
Decoders with enable inputs
• When disabled, all outputs of the decoder can either
be at logic-0 or logic-1.
• Enable input provides the decoder with additional
flexibility. Idea: data is applied to the enable input.
• Process is known as demultiplexing.

𝑥0 𝑥1 𝐸

If 𝑥0 = 0, 𝑥1 = 0 then
data appears on line 𝑧0 .
Data

• Enable inputs are useful when constructing larger


decoders from smaller decoders.
Constructing Larger Decoders
Encoders
• Encoders provide for the conversion of binary
information from one form to another.
• Encoders are essentially the inverse of
decoders.
• 2𝑛 -to-𝑛-line encoder in which an assertive
logic value on one of its 2𝑛 -input lines causes
the corresponding binary code to appear at
the output lines.
Encoders
• Equations for 8-to-3-line encoder:
𝑧0 = 𝑥1 + 𝑥3 + 𝑥5 + 𝑥7
𝑧1 = 𝑥2 + 𝑥3 + 𝑥6 + 𝑥7
𝑧2 = 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7
• In general, the Boolean expression for the output 𝑧𝑖 is the sum of each
input 𝑥𝑗 in which the binary representation of 𝑗 has a 1 in the 2𝑖 -bit
position.
Priority Encoder
• The assumption that at most a single input to the
encoder is asserted at any time is significant in its
operation.
– Example: Both 𝑥3 (11) and 𝑥5 (101) are asserted.
What is the output?
– 111 𝑥7
• Priority Encoder:
– A priority scheme is assigned to the input lines so that
whenever more than one input line is asserted at any
time, the output is determined by the input line
having the highest priority.
Priority Encoder

The output is determined by the asserted input having the highest index.
𝑥𝑖 has higher priority than 𝑥𝑗 if 𝑖 > 𝑗.
“Valid” indicates that at least one input line is asserted.
This distinguishes the situation that no input line is asserted from when the
𝑥0 input line is asserted, since in both cases 𝑧2 𝑧1 𝑧0 = 000.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy