HOME CONVERSIONS REPRESENTATIONS OPERATIONS
SYSTEM V2.8_MOBILE
ARITH_UNIT
>
>
OUTPUT_LOG
RESULT_VALUE (click to copy):

Awaiting operands...

SYSTEM_MANUAL

The Arithmetic Logic Unit (ALU) is the heart of every processor. Unlike human calculation, binary arithmetic is constrained by register size: every operation occurs within a limited bit space. Noverflow simulates hardware behavior, allowing you to perform calculations and understand how digital circuits handle carry bits and the limits of numerical representation.

Register Arithmetic

Every calculation is processed bit-by-bit. The system analyzes Carry propagation and ensures the result's consistency relative to the input operands.

Subtraction via Addition

In real-world architectures, subtraction (SUB) is performed by adding the Two's Complement of the subtrahend to the minuend, thus optimizing the number of required logic gates.

Operational Logic and Critical Issues

Rules of Binary Addition

Addition is based on four fundamental rules:
0+0=0 | 0+1=1 | 1+0=1 | 1+1=0 with a Carry of 1.
If a carry is received from the previous position during a two-bit addition, the result will be 1 with a carry of 1 (in the case of 1+1+c1). Noverflow automatically handles carry propagation throughout the entire bitstring.

Bit Count and Precision

In computing, the number of bits defines the "range" of representable values. If an operation requires 8 bits, the maximum representable unsigned value is 255.
Using an insufficient number of bits leads to the loss of critical information. Noverflow allows you to experiment with operands of different lengths to observe how precision influences the final result.

Understanding Overflow (V)

Overflow occurs when an operation's result exceeds the register's capacity or produces a sign error.
In signed arithmetic (2's Complement): overflow occurs if adding two numbers with the same sign (both positive or both negative) yields a result of the opposite sign. For example, if adding two positive numbers produces a sign bit of "1", the system has suffered an overflow, making the result logically incorrect.