Академический Документы
Профессиональный Документы
Культура Документы
Combinational circuit Sequential circuit Combinational Circuit performs an operation that can be specified logically by a set of Boolean functions A combinational circuit consists of logic gates whose outputs at any time are determined from the present combinations of input
Combinational Circuit
Combinational circuits are circuits without memory where the
outputs are obtained from the inputs only. A n-input m-output combinational circuit is of the form
Combinational Circuit
Example: Half/Full adder/substractor - Binary ripple adder/substractor - Look-ahead carry adder - Code converter, Encoder/Decoder - Magnitude comparator - Multiplexer/Demultiplexer - Read-only memory - Programmable logic array - Programmable array logic - Arithmetic logic unit
Design Procedure: 1. Determine the required number of inputs and outputs 2. Derive the truth table that defines the required relationship 3. Obtain the simplified Boolean functions for each outputs 4. Draw the logic diagram and verify its correctness
4
Half Adder
The half adder accepts two binary digits on its input and produce two binary digits on its outputs, the sum bit and carry bit as shown above.
S=XY C = XY
Full Adder
The full adder accepts three inputs and generates a sum and carry out put.
Three inputs. Third is Cin Two outputs: sum and carry
Full Adder
K Map for S
What is this?
K Map for C
Carry out:
Logic diagram
10
11
12
In Ripple Carry Adder Multiple full adders with carry ins and carry outs chained together Small Layout area Large delay time If the delay for each full adder is 8ns then the total delay for four bit parallel adder is 32ns. 13
Subtractor
14
15
16
17
18
Sh
1 1 1 1 1
19
AB 0 S0 S1 S2 S3 00 01 10 11 00 10 11 00
A+B + 1 01 10 11 00
20
21
Gi Pi Ci + Gi = Ci +1
Ci
22
23
25
26
27
28
29
30
Parity generator
Binary information is normally handle by a digital system in a group of bits called words. A word always contains either an even or an odd number of ones. A parity bit is attached to the group of information bits in order to make the total number of 1s even or always odd. An even parity bit makes the total number of ones even, and an odd parity bit makes total odd. Even Odd The parity bit is attached to the at either parity parity beginning or at the end of the code. P 8421 P 8421 note that total number of 1s,including 0 0000 1 0000 the parity bit,is always even for even 1 0001 0 0001 parity and always odd for odd parity. 1 0010 0 0010 0 1 0 0 Table : 8421 BCD code with parity bits. 1 1 0 0011 0100 0101 0110 0111 1000 1001 1 0 1 1 0 0 0 0011 0100 0101 0110 0111 1000 1001
31
32
Parity generator/checker
33
Parity checking
34
35
36
37
38
39
40
Digital Comparators
Digital or Binary Comparators are made up from standard AND, NOR and NOT gates that compare the digital signals at their input terminals and produces an output depending upon the condition of the inputs. For example, whether input A is greater than, smaller than or equal to input B etc. Digital Comparators can compare a variable or unknown number for example A (A1, A2, A3, .... An, etc) against that of a constant or known value such as B (B1, B2, B3, .... Bn, etc) and produce an output depending upon the result. For example, a comparator of 1-bit, (A and B) would produce the following three output conditions. A>B; A<B; A=B This is useful if we want to compare two values and produce an output when the condition is achieved. For example, produce an output from a counter when a certain count number is reached.
41
Equality Comparator
XNOR X Y Z X 0 0 1 1 Y 0 1 0 1 Z 1 0 0 1
Z = not(x y)
42
43
You may notice two distinct features about the comparator from the above truth table. Firstly, the circuit does not distinguish between either two "0" or two "1"'s as an output A = B is produced when they are both equal, either A = B = "0" or A = B = "1". Secondly, the output condition for A = B resembles that of a commonly available logic gate, the Exclusive-NOR or Ex-NOR gate giving Q = A B
44
Magnitude comparator
45
Magnitude comparator
46
47
48
49
50
51
52
1 0 1 0 1 0
0 0 0 0 0 0
Partial products
1 0 1 0 1 0
1 1 1 0 0 1 1 1 0
Result
53
P2
P1
54
P2
P1
55
X2 X2
FA X1
X1 X1
FA X0
X0 X0
HA Y1 Z0
Y0
Y2
Z1
FA X3
FA
FA X1
FA
FA X0
HA Y3
HA
Z2
X2
FA
Z7
Z6
Z5
Z4
Z3
56
58
59
Operation of multiplier
Multiplication Steps:
Initial contents of product register 0 0 0 0 0 0 1 0 1 M (5) (add multiplicand since M=1) 1101 after addition 011010101 after shift 0 0 1 1 0 1 0 1 0M (skip addition since M=0) 0000 after addition 00110 1010 after shift 0 0 0 1 1 0 1 0 1 M (add multiplicand since M = 1) 1101 after addition 1 00000101 after shift 0 1 0000010 (skip addition since M=0) after shift (final answer)
0 0 1 000001
60