A Digital 10-Key Calculator that mirrors real-life



Most microprocessors have a flag register which is affected almost every time the microprocessor executes an instruction.

The flag register is affected by such occurrences as zero result, signed result, carry, and overflow. In order to better emulate the computer, we have included two of these flags: overflow and carry. The overflow flag will be affected by such occurrences as computing a result which does not fit in the specified word size, and the carry flag will be affected by such occurrences as the value which is shifted out of one end of a number.

An "O" in one of the boxes at the upper-left corner of the programming calculator indicates an overflow. This usually means that after a multiplication, division, addition, or subtraction the result is too large to fit within the specified word size; however, the remainder of the result will still be displayed in the entry display.

A "C" in one of the boxes at the upper-left corner of the programming calculator indicates a carry. This usually means you have added two numbers together which are too large to fit within the current word size or you have subtracted a large number from a smaller one. Although the carry flag is set, the remainder of the calculation will still be displayed in the entry display. The carry flag is also set every time you rotate or shift a bit which is set out of the left or right side of a number.  

You may clear or preset either of these flags by simply clicking on them. This will toggle them between on and off. This may occasionally come in handy, such as when you want to do rotating with carry and need to force the carry flag to be set at the start.