Professional Documents
Culture Documents
Combinational Logic
Jee-Hwan Ryu
School of Mechanical Engineering Korea University of Technology and Education
Combinational circuits
Outputs are determined from the present inputs Consist of input/output variables and logic gates
Binary signal to registers
Sequential Circuits
Outputs are determined from the present inputs and the state of the storage elements The state of the storage elements is a function of previous inputs Depends on present and past inputs
Analysis procedure
To determine the function from a given circuit diagram Analysis procedure
Make sure the circuit is combinational or sequential
No Feedback and memory elements
Example
Design Procedure
Procedure to design a combinational circuit
1.
2. 3. 4. 5.
Determine the required number of input and output from specification Assign a symbol to each input/output Derive the truth table from the required relationship Obtain the simplified Boolean functions Draw the logic diagram and verify design correctness
Design procedure
1)Determine inputs/outputs Inputs : A,B,C,D (00001001) Outputs : W,X,Y,Z (00111100)
Example
Design a combinational circuit with three inputs and one output. The output is 1 when the binary value of the inputs is less than 3. The output is 0 otherwise.
Binary adder-subtractor
Binary adder
Half adder : performs the addition of 2-bits (x+y) Full adder : performs the addition of 3-bits (x+y+z) Two half adder can be employed to a full adder
Half Adder
Sum of 2 binary inputs Input : X(augend), Y(addend) Output : S(sum), C(carry)
S=xy+xy C=xy
Half Adder
Full adder
Sum of 3 binary inputs Input : X,Y(2 significant bits),Z(1 carry bit) Output : S(sum),C(carry)
Full Adder
C = z ( xy + xy ) + xy = xyz + xyz + xy
Binary Adder
Sum of two n-bit binary numbers 4-bit adder
A=1011, B=0011
Binary Adder
Ai Bi
Pi Si
Gi
Ci 1 1
Ci
Binary Subtractor
A-B equals A+(2complement of B) When M=0(act as adder) M=1(subtractor)
Overflow
Sum of n digit number occupies n+1 digit Always occurs when two numbers are same sign
(examples of overflow)
Decimal Adder
Calculate binary and represent decimal in binary coded form 9 inputs and 5 outputs
4 bits for each decimal numbers input and output carry
Wide variety of decimal adder circuit depending on the code In this Chapter, decimal adder for the BCD code
BCD Adder
BCD digit output of 2-BCD digit sum Correction is needed
K=1 1010~1111
Binary Multiplier
2bit x 2bit = 4bit(max)
Binary Multiplier
(K-bit) x (J-bit)
(K x J) AND gates, (J-1) K-bit adder needed B3B2B1B0 x A2A1A0
Magnitude Comparator
A = A3 A2 A1 A0 B = B3 B2 B1 B0
xi = Ai Bi + Ai' Bi'
for
i = 0,1,2,3
( A = B ) = x3 x2 x1 x0 ( A > B ) = A3 B3' + x3 A2 B2 '+ x3 x2 A1 B1 '+ x3 x2 x1 A0 B0 ' ( A < B ) = A3 ' B3 + x3 A2 ' B2 + x3 x2 A1 ' B1 + x3 x2 x1 A0 ' B0
A = 101 B = 110
Compare from the most significant bit
Magnitude Comparator
Decoders
A decoder is a combinational circuit that converts binary information from n input lines to a maximum of 2^n unique output. Generate the 2(or less) minterms of n input variables Eg)3 to 8 line decoder
w =0 0000 ~ 0111
w =1 1000 ~ 1111
C( x, y, z) = (3,5,6,7)
S ( x, y, z) = (1,2,4,7)
Example
A combinational circuit is defined by the following three Boolean functions: F1= xyz + xz F2= xyz + xy F3 = xyz + xy Design the circuit with a decoder and external gates.
Encoders
Inverse operation of a decoder Generate n outputs of 2 input values
Ex) octal to binary encoder
z = D1 + D3 + D5 + D7 y = D2 + D3 + D6 + D7 x = D4 + D5 + D6 + D7
Only one input can be active at any given time
Priority Encoder
Problem happens two or more inputs equal to 1 at the same time Give a priority function to circuit V is valid bit, 1 when one or more inputs are 1, then inspect
D3 D2 D1 y
D0
Example
Design a 4-input priority encoder with inputs as in Table 4-8, but with input D0 having the highest priority and input D3 the lowest priority
Multiplexers
Select a binary information from many input lines Directs it to a single output line Selection is controlled by a set of selection lines 2 input lines have n selection lines
2-to-1-line Multiplexer
I0 I0 Y I1 I1 1 0 MUX Y
4-to-1-Line Multiplexer
F ( x, y, z ) = (1,2,6,7 )
Three-state Gates
Three-state gates
Logic 1, 0 and high-impedance state High-impedance state behaves like an open circuit