LogisimRevisited

Components / Arithmetic

Negator Component in Logisim

Computes the N-bit two's complement arithmetic negation (-A = ~A + 1) of its input bus.

NEGA-A
Default settings, facing east. Pins are the dots.
LibraryArithmetic
Type nameNegator
Pins and defaultsin0 A (-40, 0), out0 -A (0, 0), width 4 (1..32)

Try it in the app

How the Negator Works in Logisim

The Negator computes the two's complement additive inverse (-A) of an N-bit input (default width = 4 bits) by inverting every bit and adding 1 (-A = ~A + 1 mod 2^N).

For example, on a 4-bit bus, an input of 0001 (+1) produces 1111 (-1, or 0xF), and 0011 (+3) produces 1101 (-3, or 0xD). Zero (0000) maps to 0000, while the most negative two's complement number (1000 = -8 in 4 bits) wraps back to 1000.

Tip: Use a Negator instead of a NOT Gate when you need true arithmetic negation (-A = ~A + 1) rather than bitwise ones' complement (~A).

Negator Pins & Pinout

PinDirectionWidthLocation & Role
in0 (A)Input (Left edge)1–32 bits (default 4)Offset (-40, 0). N-bit two's complement value to negate.
out0 (-A)Output (Right edge)1–32 bits (default 4)Offset (0, 0). Outputs (-A) mod 2^N = (~A + 1).

Negator Truth Table & Behavior

4-Bit Negator examples (two's complement)
Input A (Binary / Hex)Signed ValueOutput -A (Binary / Hex)Signed Output
0000 (0x0)00000 (0x0)0
0001 (0x1)+11111 (0xF)-1
0011 (0x3)+31101 (0xD)-3
1110 (0xE)-20010 (0x2)+2

Related Circuits & Components