Lecture-3
Lecture-3
Binary codes
BCD
Decimal
8421 Excess-3 84 -2 -1 2421
digit
23222120
Weighted code Unweighted code Weighted code Weighted code
Gray code:
The Gray code is unweighted and is not an arithmetic code; that is, there are no
specific weights assigned to the bit positions. The important feature of the Gray
code is that it exhibits only a single bit change from one code word to the next
in sequence.
x y z=x.y x y z=x+y
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1
07/01/2024
x y z=(x.y)′
x z=x′
0 0 1
0 1
0 1 1
1 0
1 0 1
1 1 0
z = (x ⊕ y)′
07/01/2024
x.x = x x + xy = x x+x=x
Statement Statement Statement
x.x = xx + 0 x + xy = x . 1 + xy x + x = (x + x) . 1
= xx + xx′ = x(1 + y) = (x +x)(x + x′)
= x(x + x′) =x.1 = x . x + x . x′
= x .1 = x = x+0
=x = x
x+1=1
Statement x(x+y)=x x y x+y x(x+y)
x + 1 = (x + 1) . 1 L.H.S
= (x +1)(x + x′) x(x+y) 0 0 0 0
= x . x + 1 . x′ = x . x + xy
0 1 1 0
= x + x′ = x + xy
= 1 = x(1 + y) 1 0 1 1
=x.1
=x 1 1 1 1
07/01/2024
DE Morgan's theorem
x y z=(xy)′ z=x′+y′
(xy)′ = x′ + y′ 0 0 1 1
0 1 1 1
≅ 1 0 1 1
1 1 0 0
≅ x y z=(x+y)′ z=x′y′
0 0 1 1
(x + y)′= x′ y′ 0 1 0 0
1 0 0 0
1 1 0 0