Professional Documents
Culture Documents
Introduction To Digital Systems 2 (Specication of Combinational Systems
Introduction To Digital Systems 2 (Specication of Combinational Systems
Time
t
Figure 2.1: Combinational system.
z = F (x )
b b b
High-level specification F
x xb Binary specification zb
Coding Decoding z
C Fb D
n m
Output: z 2 f0 1 2g
; ;
x 0 1 2 3 4 5 6 7 8 9
xb = C (x) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
z 00 01 10 b
z = D(z ) 0 1 2 b
b i
xb 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
z b = Fb (xb ) 00 01 10 00 01 10 00 01 10 00
Examples of vectors
Vector type Example
Digit x = (x 1; x 2; : : : ; x0) x = (7; 0; 6; 3)
x 2 f0; 1; 2; : : : ; 9g
n n
i y = 110100
1. TABLE
x z
A 65
B 66
C 67
D 68
E 69
2. ARITHMETIC EXPRESSION
z = 3x + 2y 2
3. CONDITIONAL EXPRESSION
8
>> a + b if c > d
><
z = >> a b if c = d
>: 0 if c < d
4. LOGICAL EXPRESSION
k 2 f0; 1; 2; 3g
Outputs: z = (z3; z2; z1; z0),
z 2 fA; B; : : : ; Z; a; b; : : : ; zg
i
8
Function: z = xy if j 6= k
><
j
j
if j = k
>:
Input: x = (c,a,s,e) , y = r , k = 1
Output: z = (c,a,r,e)
Fixed-length Variable-length
Code 1 Code 2 Code 3
Al 000 0110 01
Bert 010 0101 001
Dave 100 0011 0001
Jerry 110 1001 00001
Len 111 1111 000001
Codes
Character ASCII EBCDIC
A 100 0001 1100 0001
B 100 0010 1100 0010
C 100 0011 1100 0011
.. .. ..
Y 101 1001 1110 1000
Z 101 1010 1110 1001
0 011 0000 1111 0000
1 011 0001 1111 0001
2 011 0010 1111 0010
.. .. ..
8 011 1000 1111 1000
9 011 1001 1111 1001
blank 010 0000 0100 0000
. 010 1110 0100 1011
( 010 1000 0100 1101
+ 010 1011 0100 1110
.. .. ..
A blank C A B .
01000001 00100000 01000011 01000001 01000010 00101110
Introduction to Digital Systems 2 { Specication of Combinational Systems
12
REPRESENTATION OF POSITIVE INTEGERS
Level 1: Integer 5 6 3 0
(Digit-vector)
Level 2: Bit-vector 1 0 1 1 1 0 0 1 1 0 0 0
x = (x 1; x 2; : : : ; x1; x0)
n n
X1
x = =0 x r
n
i
i
i
x = (1; 0; 0; 1; 0; 1)
()
1 25 + 0 24 + 0 23 + 1 22 + 0 21 + 1 20 = (37)10
5 6 3 0
1 0 1 1 1 0 0 1 1 0 0 0
9 8 7 6
1 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1
Digit BCD
Value 8421 2421 Excess-3 2-Out-of-5
0 0000 0000 0011 00011
1 0001 0001 0100 11000
2 0010 0010 0101 10100
3 0011 0011 0110 01100
4 0100 0100 0111 10010
5 0101 1011 1000 01010
6 0110 1100 1001 00110
7 0111 1101 1010 10001
8 1000 1110 1011 01001
9 1001 1111 1100 00101
SWITCHING FUNCTIONS
f0 1g3
;
- f0 1g
;
000XXXX
XXXz
xn 1 - - zm 1 001@ 0
- - zm >
xn 2 2 010Z@@
Combinational
system
Z
011HH Z@
HZZ @
- - 100 H
@
HHZ
x1 z1
R
@
~
Z
j
H
x0 - - z0
101
-
: 1
110
111
(a) (b)
Figure 2.7: a) BINARY COMBINATIONAL SYSTEM; b) A SWITCHING FUNCTION FOR n = 3
-tuple notation
n Simplied notation
x x x
2 1 0 ( 2 1 0)
f x ;x ;x j () f j
000 0 0 0
001 0 1 0
010 1 2 1
011 1 3 1
100 0 4 0
101 0 5 0
110 1 6 1
111 1 7 1
x2 x1 x0
xyz f
000 0
001 1
010 0
011 {
100 1
101 0
110 {
111 1
or
[ one-set(1,4,7), zero-set(0,2,5) ]
[ one-set(1,4,7), dc-set(3,6) ]
[ zero-set(0,2,5), dc-set(3,6) ]
Introduction to Digital Systems 2 { Specication of Combinational Systems
24
COMPOSITION OF SWITCHING FUNCTIONS
maj(x3; x2; x1; x0) = or(and(x3; x2; x1); and(x3; x2; x0);
and(x3; x1; x0); and(x2; x1; x0))
complementation.
(A) (B ) is a SE. This is referred as \A or B "; it is also called \A plus B " or \sum"
due to the similarity with the corresponding arithmetic symbol.
(A) (B ) is a SE. This is referred to as \A and B "; it is also called \A times B " or
Switching algebra:
two elements 0 and 1
operations , , and 0
0 1 01 0
0 0 1 0 0 0 0 1
1 1 1 1 0 1 1 0
E (1; 0; 1) = 1 10 0 0 10 = 1 0 0 = 1
2 variables n variables
and x1x0 xn 1 xn 2 : : : x0
or x1 x0 xn 1 xn 2 ::: x0
NOT x z z = x’
or
x z
x1
AND z z = x1x0
x0
x1
OR z z = x 1+ x 0
x0
x1
NAND z z = ( x 1 x 0 )’
x0
x1
NOR z z = ( x 1+ x 0 )’
x0
x1
XOR
x0 z z = x 1x ’0 + x ’1x 0
= x1 + x0
x1
XNOR z z = x1’ x ’0 + x 1x 0
x0
x n-1
x n-2
AND z z = x n-1 x n-2 .... x 0
x0
x n-1
x n-2
OR z z = x n-1 + x n-2 ....+x 0
x0
x1 x0 W Z
00 1 1
01 1 1
10 0 0
11 1 1
Equivalent
expressions
LITERALS x, y , z 0 , x0
PRODUCT TERMS x0, x2x1, x3x1x00
SUM OF PRODUCTS (SP) x02 x3x01 x03x01x0
x3
x1 z = x 3 x 1x’0
x0
(a)
x’2
x2
x3
z = x’2 + x’3x 1 + x’3x’1x 0
x1 x’3x 1
x1
x’3x’1x 0
x0
(b)
Figure 2.11: SUM OF PRODUCTS AND and-or GATE NETWORK: a) PRODUCT TERM. b) SUM OF PRODUCTS.
x ! 1; i x0 ! 0
i
MINTERM m , j INTEGER j
=0
i
i
x2x1x0 m0 m1 m2 m3 m4 m5 m6 m7
x02x01x00 x02x01x0 x02x1x00 x02x1x0 x2x01x00 x2x01x0 x2x1x00 x2x1x0
000 1 0 0 0 0 0 0 0
001 0 1 0 0 0 0 0 0
010 0 0 1 0 0 0 0 0
011 0 0 0 1 0 0 0 0
100 0 0 0 0 1 0 0 0
101 0 0 0 0 0 1 0 0
110 0 0 0 0 0 0 1 0
111 0 0 0 0 0 0 0 1
x2
x1 m1
x0
m2
x1 z =Σ m(1,2,6)
x0
x2
m6
x1
Figure 2.12: GATE NETWORK CORRESPONDING TO E (x2; x1; x0) = P m(1; 2; 6).
j x2 x1 x0 f
0 000 0
1 001 0
2 010 1
3 011 1
4 100 0
5 101 1
6 110 0
7 111 0
E = X m(2; 3; 5) = x02x1x00 x02x1x0 x2x01x0
(a)
x3
x2 x’3+ x’2 + x 1
x1
Figure 2.13: PRODUCT OF SUMS AND or-and GATE NETWORK. a) SUM TERM. b) PRODUCT OF SUMS.
x ! 0; i x0 ! 1
i
MAXTERM M , j INTEGER j
x2 M0
x1
x0
x2
M5
x0
x1 z = Π M(0,5,6)
x1
x0 M6
Figure 2.14: GATE NETWORK CORRESPONDING TO E (x2; x1; x0) = Q M (0; 5; 6).
j x2 x1 x0 f
0 000 0
1 001 1
2 010 1
3 011 0
4 100 0
5 101 0
6 110 1
7 111 0
EXAMPLE:
m-NOTATION:
f (x; y; z ) = X m(0; 4; 7)
M -NOTATION:
f (x; y; z ) = Y M (1; 2; 3; 5; 6)
INPUTS: x; y 2 f0; 1; 2; 3g
OUTPUT: z 2 fG,E,Sg
8
G if x > y
>>
><
FUNCTION: z = E if x = y
>>
S if x < y
>:
y
0 1 2 3
0 E S S S
1 G E S S
x2 G G E S
3 G G G E
z
CODING:
x = 2x1 + x0 and y = 2y1 + y0
z z2z1z0
G 100
E 010
S 001
y1 y0
x1x0 00 01 10 11
00 010 001 001 001
01 100 010 001 001
10 100 100 010 001
11 100 100 100 010
z2z1z0
SWITCHING EXPRESSIONS: