Project 1: Combinational Logic: I-Conception of Digital Adders and Subtractors
Project 1: Combinational Logic: I-Conception of Digital Adders and Subtractors
Project 1: Combinational Logic: I-Conception of Digital Adders and Subtractors
● Half-Adder:
A B Sn Rn
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
2
● Full-Adder:
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
● Sn=(An⊕(Bn⊕Rn-1))
● Rn=(An⊕Bn)Rn-1+AnBn
3
2) Digital subtractor :
Half-Substractor:
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
4
Full-Substractor:
An Bn Rn-1 Dn Rn
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
● Dn=(An⊕(Bn⊕Rn-1))
● Rn=Rn-1Bn
5
A S
0 D0
1 D1
S=A̅D0+AD1
6
A B S
0 0 D0
0 1 D1
1 0 D2
1 1 D3
S=A̅B̅D0+A̅BD1+AB̅D2+A̅B̅D3
7
A S0 S1
0 D 0
1 0 D
S0=A̅D ; S1=AD
8
9
digital input signals into equivalent coded output signals. Demultiplexer, on the other
hand, does exactly the opposite of what a multiplexer does, which is to consolidate several
A Decoder with Enable input can function as a demultiplexer. A demultiplexer is a circuit that receives
information from a single line and directs it to one of 2^n possible output lines. A 2^n demultiplexor
receives as input, n selection lines and one Input line. These selection lines are used to select one
output line out of 2^n possible lines. To implement a 2^n demultiplexor, we use a n:2^n decoder with
Enable input. The n selection lines of the demultiplexer are the n input lines that the decoder gets and
the one input line of demulitplexer is the Enable input of the Decoder.
10
Decoder is a circuit that generally has n inputs and k=2 n outputs. For each of the possible
combinations of inputs, only one output line is validated. Decoders are often provided with one or
more enable inputs (EN: Enable) which are used to validate the ongoing operation.
Inputs Outputs
D C B A 0 1 2 3 4 5 6 7 8 9
0 0 0 0 0 1 1 1 1 1 1 1 1 1
0 0 0 1 1 0 1 1 1 1 1 1 1 1
0 0 1 0 1 1 0 1 1 1 1 1 1 1
0 0 1 1 1 1 1 0 1 1 1 1 1 1
0 1 0 0 1 1 1 1 0 1 1 1 1 1
0 1 0 1 1 1 1 1 1 0 1 1 1 1
0 1 1 0 1 1 1 1 1 1 0 1 1 1
0 1 1 1 1 1 1 1 1 1 1 0 1 1
1 0 0 0 1 1 1 1 1 1 1 1 0 1
1 0 0 1 1 1 1 1 1 1 1 1 1 0
11