Appearance
Shift Right
Bitwise right shift on an integer signal: out = in >> shift. Logical mode fills with zeros; arithmetic mode preserves the sign bit (divide-by-2^shift for signed integers).
Category: Digital Logic / Bits
Ports
| Name | Direction | Value type | Notes |
|---|---|---|---|
in | input | int | |
out | output | int |
Parameters
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
shift | Shift | int | 1 | — | Number of bit positions to shift right. |
arithmetic | Mode | enum (logical (zero-fill) / arithmetic (sign-extend)) | 0 | — | 0 = logical right shift (zero-fill from the left). 1 = arithmetic right shift (sign-bit replicated, preserves sign of negative numbers). |
