Bµi 2.4: Bé so s¸nh 1. Bé so s¸nh b»ng nhau. ! Ph©n tÝch yªu cÇu: "#$%& "#$'& 1.1 Bé so s¸nh b»ng nhau 1 bit: ( % )* +,-./ % % +,-./ % 01+ 0 02+ ≠ ! B¶ng ch©n lý: ! Tèi thiÓu hãa: ! S¬ ®å logic: #$% #$' 3+ 2 2 1 4 2 1 2 5. 1 2 2 5. 1 1 1 4 iiiiiii bababag ⊕=+= ! Ph©n tÝch yªu cÇu: "#$%& "#$'& 1.2 Bé so s¸nh b»ng nhau 4 bit: 6.789:;0 < 1 2 %=40 < 1 2 >01+;04 >02+;≠4 >* .?.1)%=& 000 111 222 333 bag bag bag bag ⊕= ⊕= ⊕= ⊕= 3@';04+ < 0 < ) 0 ) 1 0 1 ) 2 0 2 ! B¶ng ch©n lý: g 3 g 2 g 1 g 0 G ! Tèi thiÓu hãa: 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 1 1 2 2 1 2 2 2 2 1 2 1 2 2 1 1 2 2 2 1 1 1 2 1 2 2 2 2 1 2 2 1 2 1 2 1 2 2 1 2 1 1 2 1 1 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 1 1 1 0123 ggggG ⋅⋅⋅= ! S¬ ®å logic: < < 1 1 2 2 < 1 2 > 2. Bé so s¸nh. .7= A'BC. ! Ph©n tÝch yªu cÇu: "#$%& "#$'& 2.1 Bé so s¸nh 1 bit: % 01+ D 01+ E ! B¶ng ch©n lý: #$% #$' 3+ 2 2 2 2 0 2 1 2 1 E 1 2 1 2 D 1 1 2 2 0 ! Tèi thiÓu hãa: iii bal = iii bam = ! S¬ ®å logic: ! Ph©n tÝch yªu cÇu: "#$%& "#$'& 2.2 Bé so s¸nh 4 bit: F.'G.789H8-I$J '*@)K'*@ G=+8L.+'*@8AHH. 6.789:;0 < 1 2 %=40 < 1 2 5+,-.& >01+;04) 01+ 0 01+;D4) 01+ D M01+;E4) 01+ E ! B¶ng ch©n lý: "4-9NO& < 1 2 < 1 2 3+ ;D4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "4-9NO& < 1 2 < 1 2 M 3+ ;E4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ! Tèi thiÓu hãa: 0 < " < " < 1 " < 1 2 M0 < " < " < 1 " < 1 2 ! Tèi thiÓu hãa: 0 < " < " < 1 " < 1 2 M0 < " < " < 1 " < 1 2 ! S¬ ®å logic: M < 1 < 1 2 < 1 2 . thiÓu hãa: 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 1 1 2 2 1 2 2 2 2 1 2 1 2 2 1 1 2 2 2 1 1 1 2 1 2 2 2 2 1 2 2 1 2 1 2 1 2 2 1 2 1 1 2 1 1 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 1 1 1 0 123 ggggG ⋅⋅⋅= ! S¬. >01+;0 4 >0 2 +;≠ 4 >* .?.1)%=& 000 111 22 2 333 bag bag bag bag ⊕= ⊕= ⊕= ⊕= 3@';0 4 + < 0 < ) 0 ) 1 0 1 ) 2 0 2 ! B¶ng ch©n lý: g 3 g 2 g 1 g 0 G ! Tèi thiÓu hãa: 2 2 2 2 2 2. 0 2 + ≠ ! B¶ng ch©n lý: ! Tèi thiÓu hãa: ! S¬ ®å logic: #$% #$' 3+ 2 2 1 4 2 1 2 5. 1 2 2 5. 1 1 1 4 iiiiiii bababag ⊕=+=