SlideShare une entreprise Scribd logo
1  sur  2
Please help me with these 2 questions..
1) Do this code without using if-eles statments!!!
2)
Create a Verilog module named if 2 to 4 that represents a 2-to-4 binary decoder using an if-else
statement. Create a second module named h3to8 that represents the 3-to-8 binary decoder in
Figure 4.15 using two instances of the if 2 to 4 module. 28 Write Verilog code that represents the
circuit in Figure 4.17. Use the dec2to4 module in Figure 4.31 as a sub circuit in your code.
Solution
// Verilog Code for 2 to 4 decoder without using if-else statements
module if2to4 (in, en, y);
input [1:0] a;
input en;
output [3:0] y;
reg [3:0] y;
always @ (in, en)
case({en, in})
3
Please help me with these 2 questions-- 1) Do this code without using.docx

Contenu connexe

Plus de ceveline2

Please explain how HDFS provides redundancy for stored dataSolutionHDF.docx
Please explain how HDFS provides redundancy for stored dataSolutionHDF.docxPlease explain how HDFS provides redundancy for stored dataSolutionHDF.docx
Please explain how HDFS provides redundancy for stored dataSolutionHDF.docxceveline2
 
Please describe cash flows from investing activities- and provide thre.docx
Please describe cash flows from investing activities- and provide thre.docxPlease describe cash flows from investing activities- and provide thre.docx
Please describe cash flows from investing activities- and provide thre.docxceveline2
 
Please clear hand written for the answersSolution15- (c) An increase i.docx
Please clear hand written for the answersSolution15- (c) An increase i.docxPlease clear hand written for the answersSolution15- (c) An increase i.docx
Please clear hand written for the answersSolution15- (c) An increase i.docxceveline2
 
please answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docx
please answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docxplease answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docx
please answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docxceveline2
 
Please answer questions 1-4- thank you!Solution1- Acids are the conpou.docx
Please answer questions 1-4- thank you!Solution1- Acids are the conpou.docxPlease answer questions 1-4- thank you!Solution1- Acids are the conpou.docx
Please answer questions 1-4- thank you!Solution1- Acids are the conpou.docxceveline2
 
Please answer in a clear manner to get the points- Thanks for the help.docx
Please answer in a clear manner to get the points- Thanks for the help.docxPlease answer in a clear manner to get the points- Thanks for the help.docx
Please answer in a clear manner to get the points- Thanks for the help.docxceveline2
 
Please answer bothSolution18- Nature chose polyamides to form proteins.docx
Please answer bothSolution18- Nature chose polyamides to form proteins.docxPlease answer bothSolution18- Nature chose polyamides to form proteins.docx
Please answer bothSolution18- Nature chose polyamides to form proteins.docxceveline2
 
Phe following GC data was obtained on a Polar column- The 10 possible.docx
Phe following GC data was obtained on a Polar column- The 10 possible.docxPhe following GC data was obtained on a Polar column- The 10 possible.docx
Phe following GC data was obtained on a Polar column- The 10 possible.docxceveline2
 
Patients in shock experience decreased delivery of O2 to tissues- decr.docx
Patients in shock experience decreased delivery of O2 to tissues- decr.docxPatients in shock experience decreased delivery of O2 to tissues- decr.docx
Patients in shock experience decreased delivery of O2 to tissues- decr.docxceveline2
 
Perform an analysis of the social - demographic- technological- econom.docx
Perform an analysis of the social - demographic- technological- econom.docxPerform an analysis of the social - demographic- technological- econom.docx
Perform an analysis of the social - demographic- technological- econom.docxceveline2
 

Plus de ceveline2 (10)

Please explain how HDFS provides redundancy for stored dataSolutionHDF.docx
Please explain how HDFS provides redundancy for stored dataSolutionHDF.docxPlease explain how HDFS provides redundancy for stored dataSolutionHDF.docx
Please explain how HDFS provides redundancy for stored dataSolutionHDF.docx
 
Please describe cash flows from investing activities- and provide thre.docx
Please describe cash flows from investing activities- and provide thre.docxPlease describe cash flows from investing activities- and provide thre.docx
Please describe cash flows from investing activities- and provide thre.docx
 
Please clear hand written for the answersSolution15- (c) An increase i.docx
Please clear hand written for the answersSolution15- (c) An increase i.docxPlease clear hand written for the answersSolution15- (c) An increase i.docx
Please clear hand written for the answersSolution15- (c) An increase i.docx
 
please answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docx
please answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docxplease answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docx
please answer the following- thanks!!! Question 3 (1 point) 6 Rutherfo.docx
 
Please answer questions 1-4- thank you!Solution1- Acids are the conpou.docx
Please answer questions 1-4- thank you!Solution1- Acids are the conpou.docxPlease answer questions 1-4- thank you!Solution1- Acids are the conpou.docx
Please answer questions 1-4- thank you!Solution1- Acids are the conpou.docx
 
Please answer in a clear manner to get the points- Thanks for the help.docx
Please answer in a clear manner to get the points- Thanks for the help.docxPlease answer in a clear manner to get the points- Thanks for the help.docx
Please answer in a clear manner to get the points- Thanks for the help.docx
 
Please answer bothSolution18- Nature chose polyamides to form proteins.docx
Please answer bothSolution18- Nature chose polyamides to form proteins.docxPlease answer bothSolution18- Nature chose polyamides to form proteins.docx
Please answer bothSolution18- Nature chose polyamides to form proteins.docx
 
Phe following GC data was obtained on a Polar column- The 10 possible.docx
Phe following GC data was obtained on a Polar column- The 10 possible.docxPhe following GC data was obtained on a Polar column- The 10 possible.docx
Phe following GC data was obtained on a Polar column- The 10 possible.docx
 
Patients in shock experience decreased delivery of O2 to tissues- decr.docx
Patients in shock experience decreased delivery of O2 to tissues- decr.docxPatients in shock experience decreased delivery of O2 to tissues- decr.docx
Patients in shock experience decreased delivery of O2 to tissues- decr.docx
 
Perform an analysis of the social - demographic- technological- econom.docx
Perform an analysis of the social - demographic- technological- econom.docxPerform an analysis of the social - demographic- technological- econom.docx
Perform an analysis of the social - demographic- technological- econom.docx
 

Dernier

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 

Dernier (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 

Please help me with these 2 questions-- 1) Do this code without using.docx

  • 1. Please help me with these 2 questions.. 1) Do this code without using if-eles statments!!! 2) Create a Verilog module named if 2 to 4 that represents a 2-to-4 binary decoder using an if-else statement. Create a second module named h3to8 that represents the 3-to-8 binary decoder in Figure 4.15 using two instances of the if 2 to 4 module. 28 Write Verilog code that represents the circuit in Figure 4.17. Use the dec2to4 module in Figure 4.31 as a sub circuit in your code. Solution // Verilog Code for 2 to 4 decoder without using if-else statements module if2to4 (in, en, y); input [1:0] a; input en; output [3:0] y; reg [3:0] y; always @ (in, en) case({en, in}) 3