Miscellaneous Circuit elements - muneeb-mbytes/computerArchitectureCourse GitHub Wiki
Sign extend
consider a number is 16 bit and need to load it for register which is of 32 bits , at this point of time the msb bit of 16th bit of number is connected with remaining 16 msb bits of register, this is because to retain the polarity.
example:
consider a simple example case where input is 4 bit(4 bit number) and output is 8 bit(8 bit register) thus sign extend is used,
in the above figure it is clearly shown how the msb bit of inputs are tied to remamings msb bits of output, thus for sign extend no active elements are required
bits shifting
bit shifting also don't require any active elements. consider making a left shift by 2, then 2 bits neeed to be shifted. this element can be easily understood using the simple 8 bit circuit element diagram.
here input is shifted by 2 bits and the LSB bits are tied to zero. thus simple shifting is acheived without using any active elements.