Perform logical shift using arithmetic shift operator in C [duplicate]
问题 This question already has answers here : Implementing Logical Right Shift in C (8 answers) Closed 11 months ago . Right now I am reading the book Computer Systems : Programmer Perspective. One problem in the book says to perform a logical right shift on a signed integer, I can't figure out how to start on this. The following is the actual question from the book: Fill in code for the following C functions. Function srl performs a logical right shift using an arithmetic right shift (given by