2x4 and 3x8 decoder using matlab
DESCRIPTION
Binary to Decimal DecoderTRANSCRIPT
%% 2x4 Decoder using Logic Gates%-----------------------------------------------%%Following MatLab script implements %JIIT %%a 2x4 decoder with help of basic Logic Gates %%-----------------------------------------------%clcclose allclear alla!"inp#t$%inp#t M&' inp#t of 2x4 decoder a!"%(a)"inp#t$%inp#t L&' inp#t of 2x4 decoder a)"%(d)"$*a)(+$*a!(d!"$a)(+$*a!(d2"$*a)(+$a!(d,"$a)(+$a!(res#lt"-d, d2 d! d).sprintf$%decoder o#tp#t is /n%d /n%d /n%d /n%d%0res#lt(%-----------------1nd of &cript------------------%3x8 Decoder%% ,x2 3ecoder #sing Logic Gates%-----------------------------------------------%%Following MatLab script implements%JIIT%%a ,x2 decoder with help of basic Logic Gates %%-----------------------------------------------%clcclose allclear alla2"inp#t$%1nter M&' of 2x4 decoder a2"%(a!"inp#t$%1nter 2nd bit of 2x4 decoder a!"%(a)"inp#t$%1nter L&' of 2x4 decoder a)"%(d)"$*a)(+$*a!(+$*a2(d!"$a)(+$*a!(+$*a2(d2"$*a)(+$a!(+$*a2(d,"$a)(+$a!(+$*a2(d4"$*a)(+$*a!(+$a2(d4"$a)(+$*a!(+$a2(d5"$*a)(+$a!(+$a2(d6"$a)(+$a!(+$a2(clcdispla7$%decoder inp#t is%(-a2 a! a).%displa7$%decoder o#tp#t is%(-d6 d5 d4 d4 d, d2 d! d).%%-----------------1nd of &cript------------------%