Carry bit
The carry bit ( Engl. Carry bit ) is a term used in computer science . It denotes a bit that contains the carryover of an addition or subtraction of bits to the next most significant bit .
The values provided for an elementary calculation in a processor mostly have a fixed memory size, for example n bits with the digits a 0 to a n-1 . These values are usually processed bit by bit (using 1-bit ALUs ). If a result with two digits arises when processing a digit a i , the higher digit of the result in the place value system is passed on as a carry bit to the next (also the higher digit) digit a i + 1 of the values to be calculated so that this digit is calculated correctly can.
The last carry bit of the calculation at the most significant place a n-1 is often stored by processors in a status register as a carry flag, for example in order to process numbers that are larger than the bit width of the ALU . Using the same recursive principle as one calculates n-bit wide numbers from 1-bit additions, one can also calculate m-bit (m = k * n) wide numbers.
The carry flag basically represents the carry over of the position a n-1 , while the overflow bit depends on the interpretation of the numbers and signals that the valid range of numbers has been exceeded.