Hardware interview practice
Reverse a bit vector
Reverse the bit order of a W-bit vector.
Reviewed example
Work through one case
Input
W=8, value = 8'b1101_0010Expected output
8'b0100_1011Output bit i receives input bit 7-i, including the leading and trailing zeros.
What to cover
Requirements
- Support a compile-time width parameter.
- Map input bit W - 1 - i to output bit i.
