Hardware interview practice
Isolate the lowest set bit
Return a mask containing only the least-significant 1 bit of x.
Reviewed example
Work through one case
Input
value = 8'b1011_0000Expected output
8'b0001_0000value & -value isolates bit 4, the least-significant set bit.
What to cover
Requirements
- Return zero when x is zero.
- Use two's-complement arithmetic.
