Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Nand2Tetris HDL, how do you write an 8-bit to 3-bit priority encoder? So far I have: //Priority Encoder //input is 8-bit long array //output

Using Nand2Tetris HDL, how do you write an 8-bit to 3-bit priority encoder?

So far I have:

//Priority Encoder //input is 8-bit long array //output is 3-bit long array

CHIP PriorityEncoder83 { IN a[8]; OUT out[3], idle;

PARTS: //00000000 Or(a=a[0], b=a[1], out=ab); Or(a=a[2], b=a[3], out=bc); Or(a=a[4], b=a[5], out=cd); Or(a=a[6], b=a[7], out=de); Or(a=ab, b=bc, out=ef); Or(a=ef, b=cd, out=fg); Or(a=fg, b=de, out=notIdle); Not(in=notIdle, out=idle);

//00000001 //00000010 And(a=a[1], b=a[1], out=out[0]); //00000100 And(a=a[2], b=a[2], out=out[1]);

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

a. Does your organization have a compliance and ethics office?

Answered: 1 week ago

Question

How often is the code of conduct reviewed?

Answered: 1 week ago