Module Comb_gates.Signed

Signed vector operations (ie may operate on Bits.t or Signal.t directly).

val (+:) : t -> t -> t

Addition. Arguments are extended appropriately and result is 1 bit wider to avoid truncation.

val (-:) : t -> t -> t

Subtraction. Arguments are extended appropriately and result is 1 bit wider to avoid truncation.

val (*:) : t -> t -> t

Multiplication.

Comparison operations

Arguments need not be the same width.

val (<:) : t -> t -> t
val (>:) : t -> t -> t
val (<=:) : t -> t -> t
val (>=:) : t -> t -> t
val (==:) : t -> t -> t
val (<>:) : t -> t -> t
val resize : t -> int -> t

Resize argument to given width. Appropriate extension is performed.

val truncate : t -> width:int -> (t, t) Hardcaml__.Comb_intf.with_valid2

Reduce the width of t to width bits. The result is valid if the value fits within width bits.