I won't give you a complete answer as this is apparently homework, but I'll give you some hints to help you work it out for yourself:
for a logical right shift of N bits you need to clear the top N bits of the result after arithmetic shifting
you can clear bits in a value by applying an appropriate mask, typically using a bitwise AND or XOR
to clear the top N bits of a value you need a mask with N 0s and remaining bits 1
you can generate a suitable mask using left shift by
W - N
bits, where W is the number of bits in a word (which you can calculate asW = sizeof(int) * CHAR_BIT;
)
E.g. for a logical right shift by 2
value = 10001010
value >>= 2 = 11100010 // arithmetic right shift
mask = 00111111 // mask has top 2 bits set to 0
value & mask = 00100010 // apply mask to get logical right shift
The trickiest part is generating the mask, but if you think about left shifts applied so a suitable value, perhaps followed by one further bitwise operation, you should soon see a fairly simple solution.