Full Adder


A full adder adds two binary numbers (A,B) together and includes provision for a carry in bit (Cin) and a carry out bit (Cout).


The truth table for a full adder is:


A B Cin Cout Sum

0 0 0 0 0

0 0 1 0 1

0 1 0 0 1

0 1 1 1 0

1 0 0 0 1

1 0 1 1 0

1 1 0 1 0

1 1 1 1 1

->

Sum = Cin + B + A + ABCin

Cout = BCin + ACin + AB + ABCin


Decoder


A decoder accepts a binary encoded number as input and puts a logic 1 on the corresponding output line.


For 2 inputs -> 4 output lines

3 inputs -> 8 output lines


eg for 3 inputs with the signal 101 on them:

the 5’th output line will be 1, the rest 0



I1 I0 A B C D

0 0 1 0 0 0 A =

0 1 0 1 0 0 B = I0

1 0 0 0 1 0 C = I1

1 1 0 0 0 1 D = I1 I0


Decoder with output enable



All outputs will be 0 unless (Output Enable) is Low


I1 I0 A B C D

0 0 0 1 0 0 0 A = OE

0 0 1 0 1 0 0 B = I0 OE

0 1 0 0 0 1 0 C = I1 OE

0 1 1 0 0 0 1 D = I1 I0 OE

1 0 0 0 0 0 0

1 0 1 0 0 0 0

1 1 0 0 0 0 0

1 1 1 0 0 0 0



Design a simple decoder for 4 bit numbers....


159.233 Lecture 2 -