Posts

Showing posts from May, 2026

chained signed arithmetic

Image
Starting from the very early plans in the mid 1830s, Babbage realized that if each individual operation needed to bring operands in from the Store and return the result to the Store, sequential operations on many operands would be very slow. So he allowed any number of additions and subtractions to be chained together in an arbitrary sequence, with intermediate results retained in the Mill and only written back at the end.  The numbers were, of course, signed integers. In all his mature Plans, the Store holds them in sign-magnitude representation: one decimal wheel on top indicates, by being odd or even, whether the number is positive or negative. The rest of the wheels represent the absolute value of the number. This makes the numbers easy for a human to read on the column, and also simplifies multiplication and division.  For addition and subtraction in the Mill, he uses 10's complement representation: a negative d-digit number N is stored as 10 d -N. For example, a four-dig...