detecting overflow in arithmetic left shifter

Joined
Oct 26, 2006
Messages
2
Reaction score
0
Hi, I'm trying to implement an arithmetic left shifter in vhdl. I used barrel shifter for a 16 bit number (4 levels of 2-1 muxes) and I'm wondering how I can detect overflow in shifting. I know if I shifted out anything that's different from the sign bit I'll have an overflow, but how can I efficiently detect that (using xors?) What would be the least amount of logic to do it?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top