Question: Shift Operations Write a verilog code Do not rely on built in functions in verilog table [ [ OP# , Control Signals C ,

Shift Operations
Write a verilog code
Do not rely on built in functions in verilog
\table[[OP#,Control Signals C,Operation],[7,1000,Circular right shift of A],[8,1001,Circular left shift of A],[9,1010,Right shift of A with feed in 0],[10,1011,Left shift of A with feed in 0],[11,1100,Right shift of A with MSB replication],[12,1101,Left shift of A with LSB replication]]
Help
Combinational.pdf
f 3
Circular right shift of A. You perform right shift and the bit that comes off the least significant position (LSB) on the right rotates to the most significant position (MSB). Red bit rotated right, blue bits shifted right.
\table[[Before: 11001101,Before:01010100],[After: 11100110,After: 00101010]]
Circular left shift of A. You perform left shift and the bit that comes off the most significant position (MSB) on the left rotates to the least significant position (LSB). Red bit rotated left, blue bits shifted left.
Before: 11001101 Before:01010101
After: 10011011 After: 10101010
Right shift of A with feed in 0. You perform right shift and the LSB bit is dropped. The empty position at the MSB is filled with 0. Red bit is lost, green bit added, blue bits shifted right.
Before: 11001101
Before:01010100
After: 01100110
After: 00101010
Left shift of A with feed in 0. You perform left shift and the MSB bit is dropped. The empty position at the LSB is filled with 0. Red bit is lost, green bit added, blue bits shifted left.
Before: 11001101
Before:01010101
After: 10011010
After: 10101010
Right shift of A with MSB replication. You perform right shift and the LSB bit is dropped. The empty position at the MSB is filled with the same previous MSB bit. Red bit dropped; green bit is a duplication of the blue bit.
Before: 11001101
Before: ,01010100
After: 11100110
After: 00101010
Shift Operations Write a verilog code Do not rely

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!