Digital SRP
Digital SRP
Digital SRP
A
A
A B A.B A+B A’ (A.B)’ (A + B)’ XNOR
Digital logic : basis for digital computing and provides XOR B
B
a fundamental understanding on how circuits and
hardware communicate within a computer. 0 0 0 0 1 1 1 0 1
0 1 0 1 1 1 0 1 0
Digital circuits are made from a large collection of 1 0 0 1 0 1 0 1 0
logic gates
1 1 1 1 0 0 0 0 1
Logic Gates : Logic gates are the basic building blocks
of any digital circuit.
Universal logic gates
They are called as “Universal Gates” because-
•Annulment law – •A + B = B + A
A.B = B.A POS = Maxterms = Sum terms (Number of 0’s in Kmap)
•A.0 = 0
A+1=1
•Associative law –
•Identity law – •A+(B+C) = (A+B)+C
•A.1 = A A.(B.C) = (A.B).C
A+0=A
•Distributive law –
•Idempotent law – •A.(B+C) = (A.B)+(A.C)
•A + A = A A+(B.C) = (A+B).(A+C)
A.A = A
•Absorption law –:-
•Complement law – •A.(A+B) = A
•A + A’ = 1 A + AB = A
A.A’ = 0
•De Morgan law –
•Double negation law – ((A)’)’=A •(A.B)’ = A’ + B’
USED IN ALGEBRAIC MANIPULATION
(A+B)’ = A’.B
D7 D6 D5 D4 D3 D2 D1 D0 X Y Z
Binary code of N digits can be One limitation of this encoder is 0 0 0 0 0 0 0 1 0 0 0
used to store 2N distinct that only one input can be
0 0 0 0 0 0 1 0 0 0 1
elements of coded information. active at any given time.
0 0 0 0 0 1 0 0 0 1 0
This is what encoders and To overcome this, we use 0 0 0 0 1 0 0 0 0 1 1
decoders are used for. Priority Encoders.
Encoders convert 2N lines of 0 0 0 1 0 0 0 0 1 0 0
Another ambiguity arises when
input into a code of N bits all inputs are 0. In this case, 0 0 1 0 0 0 0 0 1 0 1
and Decoders decode the N bits encoder outputs 000 which 0 1 0 0 0 0 0 0 1 1 0
into 2N lines. actually is the output for D0 1 0 0 0 0 0 0 0 1 1 1
active.
Priority Encoder – D3 D2 D1 D0 X Y V Using 4x 1 MUX we can
A priority encoder is an encoder
0 0 0 0 x x 0 implement ALL the
circuit in which inputs are given functions of 3 variables
priorities. When more than one 0 0 0 1 0 0 1 and 1 inverter.
inputs are active at the same time,
the input with higher priority takes 0 0 1 x 0 1 1 Using 8 x 1 MUX , we
precedence and the output can implement ALL the
0 1 x x 1 0 1
corresponding to that is generated. functions of 4 variables
1 x x x 1 1 1 and 1 inverter.
Multiplexers in Digital Logic
Multiplexer can act as universal combinational circuit.
Many input to one output.
(NOT, AND,OR,NAND,NOR,EXOR,EXNOR)
For N input lines, log n (base2) selection lines.
Multiplexers are also known as “Data n
All the standard logic gates can be implemented with
SRP 11
selector, parallel to serial convertor, many to
one circuit, universal logic circuit”. multiplexers
•C
Finally, we have the following equations-
1 = C0P0 + G0
•C1 = C0P0 + G0
•C = C P P + G0P1 + G1
•C22 = C00P00P11+ G0P
•C
•C3 = C0P0P1P2 + G0P0P
3 = C 0 P 0 P1 P 2 + 1 + G1
G 1P2 + G1P2 + G2
1 P 2 + G1 P 2 + G2
SRP 13
•C
•C44=C=C00PP00P
P11PP22P3
P3++GG P P P + GPP3 2+PG3 2+P3G+2P3 +
0P01P12P23 +3G1P21
GG3 3
FORMULA :
For a n-bit carry look ahead adder to evaluate all
the carry bits, it requires-
•Number of AND gates = n(n+1) / 2
•Number of OR gates = n
Decimal to Binary = Divide by 2 & print result in Binary to Decimal = Multiply 2 with powers.
reverse. Binary to Octal = Make group of 3 bits and add zero if
Decimal to Octal = Divide by 8 and print result in required
reverse. Binary to hexadecimal = Make group of 4 bits and add
Decimal to Hexadecimal = Divide by 16 & print result in zero if required.
reverse. Octal to Binary = Make group of 3 bits in binary and
remove zeroes
For Decimal value (0.25) = Multiply 2 (B), 8(O), 16 (H) Octal to Decimal = Multiply 8 with powers
Octal to Hexadecimal = Convert to Binary in 3 bits and
make it 4 bits from RHS
Hexadecimal to Binary = Convert into binary in 4
754
bits and remove extra zeroes
Hexadecimal to Decimal = Multiply 16 SRP 14
Hexadecimal to Octal = Convert to binary in 4
bits and then 3 bits from RHS
SRP 15
Half Adder = Add 2 “1” bit numbers
Sum = A xor B UNSIGNED 0 to 2n - 1 0 to 7
MAGNITUDE
Carry = AB
Using 5 NAND , 5 NOR SIGNED −(2N−1 − 1) to (2N−1 − 1) -3 to +3
MAGNITUDE
Half Subtractor = Subtract 2 “1” bit numbers 1’S −(2N−1 − 1) to (2N−1 − 1) -3 to +3
Difference = A xor B COMPLEMENT
Borrow = A’B
Using 5 NAND , 5 NOR 2’S −(2N−1 ) to (2N−1 − 1) -4 to +3
COMPLEMENT