Professional Documents
Culture Documents
ARITHMETIC MICROOPERATION
BINARY INCREMENTER
BINARY DECREMENTER
ARITHMETIC CIRCUIT
The arithmetic microoperations listed in Table 4-3 can be implemented in one composite
arithmetic circuit. The basic component of an arithmetic circuit is the parallel adder.
By controlling the data inputs to the adder, it is possible to obtain different types of arithmetic
operations. The diagram of a 4-bit arithmetic circuit is shown in Fig. The output of the binary
adder is calculated from the following arithmetic sum:
D = A + Y + C in
Where A is the 4-bit binary number at the X inputs and Y is the 4-bit binary number at the Y
inputs of the binary adder. C in is the input carry, which can be equal to 0 or 1. Note that the
symbol + in the equation above denotes an arithmetic plus. By controlling the value of Y with
the two selection inputs S1and S0 and making Cin equal to 0 or 1, it is possible to generate the
eight arithmetic microoperations listed in Table.
Operation S1 S0 Cin Y D=A+Y+Cin Microoperation
Addition 0 0 0 B D= A+B With S1S0=00, input B is applied as input
of FA, With Cin=0, D=A+B+0, i.e add
without carry
0 0 1 B D= A+B+1 With S1S0=00, input B is applied as input
of FA, With Cin=1, D=A+B+1, i.e add
with carry
Subtraction 0 1 0 𝐵 D= A+𝐵 With S1S0=01, input 𝐵 is applied as input
of FA, With Cin=0, D=A+𝐵, i.e subtract
with borrow.
0 1 1 𝐵 D= A+𝐵+1 With S1S0=01, input 𝐵 is applied as input
of FA, With Cin=1, D=A+𝐵+1, i.e 2’s
complement subtraction.
Transfer 1 0 0 0 D= A+0+0 With S1S0=10, input 0 is applied as input
D= A of FA, With Cin=0, D=A, i.e Transferring
the data of A to D
Increment 1 0 1 0 D= A+0+1 With S1S0=10, input 0 is applied as input
D= A+1 of FA, With Cin=1, D=A+1, i.e Increment
the value of A by 1
Decrement 1 1 0 1 D= A-1 With S1S0=11, All 1’s are inserted into the
Y inputs of the adder to produce the
decrement operation D=A-1 , when Cin=0,
this is because a number with all 1’s is
equal to the 2’s complement of 1 (The 2’s
complement of 0001 is 1111). Adding a
number A to the 2’s complement of 1
produces
F= A+ 2’s complement of 0001
= A+ 1111
= A-1; Decrement the value of A by 1
Transfer 1 1 1 1 D= A-1+1 When Cin=1, D=A; Transferring the data
D= A of A to D