Updated: 05/02/2021 by Computer Hope

Decrement may refer to any of the following:

1. A decrement is a programming operator that decreases a numerical value of its operand by 1. In Perl, a variable can be decremented by one by adding a -- at the end of the variable. In the example below, the value variable is set as five and then decremented in value by one with the $value--; line. The last line prints the new value of the variable, which is four.

my $value = 5;
print "$value\n";

2. With the processor ALU (arithmetic logic unit) arithmetic unit, decrement is the operation of subtracting a 1 to a bit.

ALU, Increment, Operator, Programming terms