Bµi 2.7: Bé chuyÓn m· Bµi 1: ThiÕt kÕ m¹ch logic thùc hiÖn viÖc chuyÓn ®æi tõ m· nhÞ ph©n 4 bit sang m· Gray. • Ph©n tÝch yªu cÇu: + §Çu vµo: M· nhÞ ph©n 4 bit: B 3 B 2 B 1 B 0 + §Çu ra: M· Gray 4 bit: G 3 G 2 G 1 G 0 M¹ch chuyÓn m· nhÞ ph©n thµnh Gray B 0 B 1 B 2 B 3 G 0 G 1 G 2 G 3 • B¶ng ch©n lý: • Tèi thiÓu hãa: M· nhÞ ph©n M· Gray B 3 B 2 B 1 B 0 G 3 G 2 G 1 G 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 B¶ng Karnaugh: 00 01 11 10 00 01 11 10 B 3 B 2 G 3 1 1 1 1 1 1 1 1 B 1 B 0 1 1 1 1 1 1 1 1 G 2 1 1 1 1 1 1 1 1 G 1 1 1 1 1 1 1 1 1 G 0 33 BG = 3223232 BBBBBBG ⊕=+= 2121211 BBBBBBG ⊕=+= 1010100 BBBBBBG ⊕=+= • S¬ ®å logic: B 3 B 2 B 1 B 0 G 3 G 2 G 1 G 0 Bµi 2: ThiÕt kÕ m¹ch logic thùc hiÖn viÖc chuyÓn ®æi tõ m· Gray 4 bit sang m· nhÞ ph©n . • Ph©n tÝch yªu cÇu: + §Çu vµo: M· nhÞ ph©n 4 bit: B 3 B 2 B 1 B 0 + §Çu ra: M· Gray 4 bit: G 3 G 2 G 1 G 0 M¹ch chuyÓn m· Gray thµnh nhÞ ph©n G 0 G 1 G 2 G 3 B 0 B 1 B 2 B 3 • B¶ng ch©n lý: • Tèi thiÓu hãa: M· Gray M· nhÞ ph©n G 3 G 2 G 1 G 0 B 3 B 2 B 1 B 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 B¶ng Karnaugh: 00 01 11 10 00 01 11 10 G 3 G 2 B 3 1 1 1 1 1 1 1 1 G 1 G 0 B 2 1 1 1 1 1 1 1 1 B 1 1 1 1 1 1 1 1 1 B 0 1 1 1 1 1 1 1 1 33 GB = 3223232 GGGGGGB ⊕=+= ++= 1231231 GGGGGGB 123123 GGGGGG ++ 321 GGG ⊕⊕= 3211 GGGB ⊕⊕= ++= 012301230 GGGGGGGGB +++ 01230123 GGGGGGGG +++ 01230123 GGGGGGGG 01230123 GGGGGGGG ++ 32100 GGGGB ⊕⊕⊕= • S¬ ®å logic: G 3 G 2 G 1 G 0 B 3 B 2 B 1 B 0 . 10 00 01 11 10 G 3 G 2 B 3 1 1 1 1 1 1 1 1 G 1 G 0 B 2 1 1 1 1 1 1 1 1 B 1 1 1 1 1 1 1 1 1 B 0 1 1 1 1 1 1 1 1 33 GB = 322 323 2 GGGGGGB ⊕=+= ++= 123 123 1 GGGGGGB 123 123 GGGGGG ++ 321 GGG ⊕⊕= 321 1 GGGB ⊕⊕= ++= 0 123 0 123 0 GGGGGGGGB +++ 0 123 0 123 GGGGGGGG +++ 0 123 0 123 GGGGGGGG 0 123 0 123 GGGGGGGG. 10 00 01 11 10 B 3 B 2 G 3 1 1 1 1 1 1 1 1 B 1 B 0 1 1 1 1 1 1 1 1 G 2 1 1 1 1 1 1 1 1 G 1 1 1 1 1 1 1 1 1 G 0 33 BG = 322 323 2 BBBBBBG ⊕=+= 21 2 121 1 BBBBBBG ⊕=+= 1010100 BBBBBBG ⊕=+= • S¬ ®å logic: B 3 B 2 B 1 B 0 G 3 G 2 G 1 G 0 . ⊕⊕= 321 1 GGGB ⊕⊕= ++= 0 123 0 123 0 GGGGGGGGB +++ 0 123 0 123 GGGGGGGG +++ 0 123 0 123 GGGGGGGG 0 123 0 123 GGGGGGGG ++ 321 00 GGGGB ⊕⊕⊕= • S¬ ®å logic: G 3 G 2 G 1 G 0 B 3 B 2 B 1 B 0