0% found this document useful (0 votes)
32 views18 pages

Ch3 - 2arithmetic Part - 2

Uploaded by

alromaysaamo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views18 pages

Ch3 - 2arithmetic Part - 2

Uploaded by

alromaysaamo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

1 Binary Incrementer

 The increment microoperation adds one to a


number in a register.
 If a 4-bit register has a binary value 0110, it will
go to 0111 after it is incremented. This
microoperation is easily implemented with a
binary counter.
 There may be occasions when the increment
microoperation must be done with a
combinational circuit independent of a particular
2 Binary Incrementer

 This can be accomplished by means of half-adders


connected as shown below.
3 Binary Incrementer

 The circuit receives the 4 bits from A0 through A3,


adds 1 to it, and generates the incremented
output in S0 through S3.
 The output carry C4 will be 1 only after
incrementing binary 1111. This also causes
outputs S0 through S3 to go to 0.
 Also, the binary incrementer can be accomplished
by means of full-adders connected in cascade.
4 Binary Decrementer

 The decrement microoperation subs 1 from a


number in a register.
 If a 4-bit register has a binary value 0111, it will go
to 0110 after it is decremented.
 This microoperation is done by adding the 4-bits to
the 2’s complement of 1 which is (1111).
 The decrement microoperation can be accomplished
by means of full-adders connected in cascade.
5 Binary Decrementer

 In this case, one of the inputs of each full adder is


to 1 and the other input is connected to the input bit
of the number to be decremented.
 The carry input of the least significant full-adder
(FA) is connected to logic-0.
 The output carry from one full-adder is connected
to the carry input of the next-higher-order full-adder.
6 Arithmetic Circuit

 The arithmetic microoperations listed in the table


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
the figure shown below.
7 Arithmetic Circuit

 The arithmetic microoperations listed in the


table can be implemented in one composite
arithmetic circuit.
8
9 Arithmetic Circuit

 The output of the binary adder is calculated from the


following arithmetic sum: D = A + Y + Cin
 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. Cin is the input carry, which can be equal to 0 or 1.
 By controlling the value of Y with the two selection
inputs S1 and S0 and making Cin equal to 0 or 1, it is
possible to generate the eight arithmetic
microoperations that listed in the table shown below.
10 Arithmetic Circuit
11 Arithmetic Circuit

 When S1S0 = 00, the value of

B is applied to the Y inputs of


the adder.
 If Cin = 0, the output D = A + B.
 If Cin = 1, output D = A + B + 1.
 Both cases perform the add
microoperation with or
without adding the input carry.
12 Arithmetic Circuit

 When S1S0 = 01, the complement of B is applied to


the Y inputs of the adder.
 If Cin = 1, then . This produces A
plus the 2's complement of B, which is equivalent
to a subtraction of A - B.
 When Cin = 0, then . This is equivalent
to subtract with borrow, that is, A - B - 1.
13 Arithmetic Circuit

 When S1S0 = 10, the inputs from B are neglected,


and instead, all 0's are inserted into the Y inputs.
 The output becomes D = A + 0 + Cin. This gives D
= A when Cin = 0 and D = A + 1 when Cin = 1.
 In the first case we have a direct transfer from
input A to output D.
 In the second case, the value of A is incremented
by 1.
14 Arithmetic Circuit

 When 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 binary 0001 is 1111).
Adding a number A to the 2's complement of 1 produces F = A +
2's complement of 1 = A -1.
 When Cin= 1, then D = A - 1 + 1= A, which causes a direct
transfer from input A to output D.
15 Logic Circuit

 The figure below shows one stage of a circuit that


generates the four basic logic microoperations.
 It consists of four gates and a multiplexer. Each
of the four logic operations is generated through
a gate that performs the required logic.
 The outputs of the gates are applied to the data
inputs of the multiplexer.
16 Logic Circuit
17 Logic Circuit

 The two selection inputs S1 and S0 choose one of the


data inputs of the multiplexer and direct its value to
the output.
 The diagram shows one stage with subscript i. For a
logic circuit with n bits, the diagram must be repeated
n times for i = 0, 1,..., n-1.
 The selection variables are applied to all stages. The
function table lists the logic microoperations obtained
for each combination of the selection variables.
18 References

[1] William Stallings (2016), Computer Organization

and Architecture- designing for performance,

10th edition, Pearson Education, Inc.,.

[2] M. Morris Mano (2006), Computer System

Architecture, 3rd edition, Pearson/PHI, India.

You might also like