Another way to consider arithmetic right shift is that it assumes that the number moved is signed and retains the sign, so arithmetic right shift can divide a signed number by a power of 2. The arithmetic right shift shifts the sign bit of the number in the shift register (q in this example), rather than the zero made by the logical right shift. The shifter can shift left and right, and select 1-bit or 8-bit shifts according to the number. ena: 2'b01 turn right 1 bit 2 'b10 turn left 1bit No change in other casesĮstablish a 64 bit arithmetic shift register and load synchronously.When on, the rotator rotates the bits without modifying or discarding them. Unlike the shifter, it discards the shifted bits and shifts with zero bits. The rotator inputs the shifted bits from the other end. The left-right rotation needs to be enabled. Left / right rotatorīuild a 100 bit left-right rotator to synchronize the load. The number of bits moved is determined by the right operand, and then 0 is used to fill the moved space. The operation process is to move the left (right) operand to the left (right). Input areset, // async active-high reset to zero Load: load 4bit data into the shift register without shifting. Build a 4-bit shift register (shift right), including asynchronous reset, synchronous load and enable
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |