Decimal arithmetic operations in Computer Architecture?

Computer ArchitectureComputer ScienceNetwork

Decimal arithmetic operations refer to a digital function that does decimal micro-operations. This function adds or subtracts decimal numbers by forming 9’s or 10’s complement of the subtrahend. This decimal arithmetic unit first accepts coded decimal numbers and then generates output in the binary form.

Algorithms that are used for arithmetic operations with decimal data and binary data are alike. If the micro-operations symbol is interpreted correctly the same flowchart can be used for both multiplication and division.

The decimal numbers in BCD are stored in groups of four bits in the computer registers. When performing decimal micro-operations, every 4-bit group represents a decimal digit and has to be taken as a group

The table shows symbols for decimal arithmetic micro-operations.

Symbols for Decimal Arithmetic Micro-Operations

Symbolic Representation
Meaning
X ← X + Y
It can add decimal numbers and transfers the output to X.
Y′
9’s complement of Y.
X ← X + Y′ + 1
It can add the content of X and 10's complement of Y and transfers the output to X.
dshr X
It can shifts the decimal number one digit towards the right in register X.
dshl X
It can shifts the decimal number one digit towards left in register X

In this table, we can see a bar over the symbol for the register letter. This refers to the 9’s complement of decimal number that is stored in the register. When 1 is added to the 9’s complement the 10’s complement is produced.

Therefore, the symbol X ← X+ Y + 1 for decimal digits denotes, transfer of decimal sum that was formed by adding the original content X to the 10’s complement of Y.

It may be confusing to use similar symbols for 9’s complement and 1’s complement in case both types of data are used in the same system.

Therefore, it would be better to implement a different symbol for the 9’s complement. In case only one type of data is taken into consideration, the symbol would apply to the type of data used.

raja
Published on 30-Jul-2021 13:21:58
Advertisements