Binary Addition; Decimal Subtraction - IBM 5410 Maintenance Manual

Processing unit
Hide thumbs Also See for 5410:
Table of Contents

Advertisement

Binary Addition
Since the ALU is designed for binary subtraction, it is
necessary to change the figures to be added in a way that
will produce the correct results when they are subtracted.
This is accomplished by complementing the A register and
subtracting it from the B register.
The A register complement figure is an exact binary com-
plement. That is, a bit is replaced by no-bit and no-bit
is replaced by a bit. In order to get a true complement
figure, it is necessary to force a carry into the low-order
bit of the first character. Figure 2-30 shows the method
used to add the hexadecimal values 8/F 8/3 and 3/F 9/3.
The ALU controls and circuits are the same as binary sub-
tract except for complementing the A register and forcing
a carry into bit 7 in the first cycle (Figure 2-31).
Decimal Subtraction
Since the ALU is a binary subtractor,
it
is capable of
handling the binary representation of decimal numbers.
However, because decimal numbers only use one-half of
each byte, the ALU must be split in half to subtract them.
Thus, a carry from bit 4 to bit 3 is used to set the digit
carry trigger (Figure 2-32).
Borrowed Amount
32
222 22
Minuend (True)
1000 1111
1000 0011
Subtrahend (Complement) 1100
0000
0110 1100
Carry
_1 _ _ _ _ 1_1_1_1_1 __
1
Forced Car
ALU Total
11001111
00010110
8/F 8/3 plus 3/F 9/3
Figure 2-30. Binary Add (Complement and Subtract)
2-28
Arithmetic Carry Out (1st cycle of operation)
B Register
A Register
Binary
·----I(
• - - - - • c o m p .
Binary Complement Circui
A Register
Bit In= No-Bit Out
No-Bit In= Bit Out
Figure 2-31. Binary Addition Data Flow
BR
ist~
BR
ister
Sub
Subtract
Circuits
Bit
7
Carry To 6
t
Bits6
and 5
l
A Register
Bit
4
Arithmetic Carry to Bit
3
Carry
Digit
FF
Figure 2-32. Carry Control-Decimal Subtract
Carry to ALU
Bit
7
for next
digit position

Advertisement

Table of Contents
loading

Table of Contents