Using any instantiation of the below comparator and adder-subtractor modules and any number of logic gates, make a circu

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Using any instantiation of the below comparator and adder-subtractor modules and any number of logic gates, make a circu

Post by answerhappygod »

Using Any Instantiation Of The Below Comparator And Adder Subtractor Modules And Any Number Of Logic Gates Make A Circu 1
Using Any Instantiation Of The Below Comparator And Adder Subtractor Modules And Any Number Of Logic Gates Make A Circu 1 (44.14 KiB) Viewed 36 times
Using any instantiation of the below comparator and adder-subtractor modules and any number of logic gates, make a circuit with four-bit A and B inputs. If ASB is, output y is equal to A + B, and otherwise output y be equal to A - B. Describe the gates with logical operators and assign statements. 2.5 module addsub input [3:0] A, input (3:0) B input cin, input m, output reg (3:0) s, output reg cout ); module comp (A, B, GTI, EQ, LT); always @ (A,B,cin,m) parameter tplh=3, tphl=5, m=3; begin input [m-1:0] A, B; output GTh, EQ, LT: (cout, 3)=A-B-cin; if (m) (cout, 3)=A+B+cin; end assign # (tplh, tphl) GTh=AB, EQ=A===B, LT=A<B; endmodule endmodule
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply