hex.sign_extendΒΆ

sign-extends hex[:signed_n] into hex[:full_n]

SignatureΒΆ

def sign_extend full_n, signed_n, hex @ negative, positive { ... }

Defined in hex/math_basic.fj β€” lines 212–218 (view on GitHub).

ComplexityΒΆ

  • Time: (full_n - signed_n)(@+4)

  • Space: (full_n - signed_n)(@+16)

See the complexity glossary for what @, w, dw, dbit, n mean.

SourceΒΆ

Depends onΒΆ


← Previous: hex.abs