Hardware interview practice
Choose arithmetic shift behavior
`x` is declared `logic signed [7:0]` and contains `8'hF0`, which represents -16 in two's complement. What eight-bit result does `x >>> 2` produce?
Choose one
Answer choices
- A. 8'hF8, because shifting right by two changes only one sign-extension bit.
- B. 8'h3C, because every right shift fills the two high bits with zeros.
- C. 8'hC0, because the two low bits rotate into the high positions.
- D. 8'hFC, because arithmetic right shift replicates the sign bit and -16 divided by four is -4.
