Fundamentals of Computer Architecture and Design Ahmet Bindal 2024 scribd download
Fundamentals of Computer Architecture and Design Ahmet Bindal 2024 scribd download
com
https://textbookfull.com/product/fundamentals-of-computer-
architecture-and-design-ahmet-bindal/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/computer-architecture-fundamentals-
and-principles-of-computer-design-2nd-edition-joseph-d-dumas-ii/
textboxfull.com
https://textbookfull.com/product/digital-design-and-computer-
architecture-arm-edition-david-harris/
textboxfull.com
https://textbookfull.com/product/logic-computer-design-
fundamentals-5th-edition-mano/
textboxfull.com
https://textbookfull.com/product/solar-hybrid-systems-design-and-
application-1st-edition-aktas-ahmet/
textboxfull.com
Essentials of computer architecture Second Edition Comer
https://textbookfull.com/product/essentials-of-computer-architecture-
second-edition-comer/
textboxfull.com
https://textbookfull.com/product/fundamentals-of-computer-graphics-
steve-marschner/
textboxfull.com
https://textbookfull.com/product/computer-architecture-john-l-
hennessy/
textboxfull.com
https://textbookfull.com/product/computer-organization-and-
architecture-9th-edition-william-stallings/
textboxfull.com
https://textbookfull.com/product/computer-system-architecture-m-
morris-mano/
textboxfull.com
Ahmet Bindal
Fundamentals
of Computer
Architecture
and Design
Ahmet Bindal
Fundamentals
of Computer
Architecture and Design
123
Dr. Ahmet Bindal
Computer Engineering Department
San Jose State University
San Jose, CA, USA
vii
viii Preface
ix
x Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
About the Author
xiii
xiv About the Author
Logic gates are the essential elements in digital design, and ultimately constitute the building
blocks for digital systems. A good understanding in designing complex logic blocks from
primitive logic gates, and mastering the design tools and techniques that need to be incor-
porated in the design process is a requirement for the reader before moving to the details of
computer architecture and design.
This chapter starts with defining the logic gates and the concept of truth table which then
leads to the implementation of basic logic circuits. Later in the chapter, the concept of
Karnaugh maps is introduced in order to minimize gate count, thereby completing the basic
requirements of combinational logic design. Following the minimization techniques, various
fundamental logic blocks such as multiplexers, encoders, decoders and one-bit adders are
introduced so that they can be used to construct larger scale combinational logic circuits. The
last section of this chapter is dedicated to the design of mega cells. These include different
types of adders such as ripple-carry adder, carry-look-ahead adder, carry-select adder, and
the combination of all three types depending on the goals of the design: gate count, circuit
speed and power consumption. Subtractors, linear and barrel shifters, array and Booth
multipliers constitute the remaining sections of this chapter.
It is vital for the reader to also invest time to learn a hardware design language such as
Verilog while studying this chapter and the rest of the chapters in this book. A simulation
platform incorporating Verilog and a set of tools that work with Verilog such as design
synthesis, static timing analysis, and verification is an effective way to check if the intended
design is correct or not. There is nothing more valuable than trying various design ideas on a
professional design environment, and understanding what works and what does not while
learning from your mistakes. An appendix introducing the basic principles of Verilog is
included at the end of this book for reference.
AND gate
To understand how AND gate functions, assume that the output, OUT, in Fig. 1.1 is at logic
0 when both switches, A and B, are open. Unless both A and B close, the output stays at
logic 0.
OUT
A two-input AND gate functions similarly to the circuit in Fig. 1.1. If any of the two
inputs, A or B, is at logic 0 in the AND gate in Fig. 1.2, the gate produces a logic 0 output at
OUT. Both inputs of the gate must be equal to logic 1 in order to produce an output at logic 1.
This behavior is tabulated in Table 1.1, which is called a “truth table”.
A
OUT
B
0 0 0
0 1 0
1 0 0
1 1 1
1.1 Logic Gates 3
OUT ¼ A : B
Here, the symbol “.” between inputs A and B represents the AND-function.
OR gate
Now, assume a parallel connectivity between switches A and B as shown in Fig. 1.3. OUT
becomes logic 1 if one of these switches closes; otherwise the output will stay at logic 0.
A B
OUT
A two-input OR gate shown in Fig. 1.4 functions similarly to the circuit in Fig. 1.3. If any
of the two inputs is at logic 1, the gate produces an output, OUT, at logic 1. Both inputs must
be equal to logic 0 in order to produce a logic 0 output. This behavior is tabulated in the truth
table, Table 1.2.
A
OUT
B
0 0 0
0 1 1
1 0 1
1 1 1
4 1 Review of Combinational Circuits
OUT ¼ A þ B
Here, the symbol “+” between inputs A and B signifies the OR-function.
Exclusive OR gate
A two-input Exclusive OR gate, XOR gate, is shown in Fig. 1.5. The XOR gate produces a
logic 0 output if both inputs are equal. Therefore, in many logic applications this gate is used
to compare the input logic levels to see if they are equal. The functional behavior of the gate
is tabulated in Table 1.3.
A
OUT
B
0 0 0
0 1 1
1 0 1
1 1 0
OUT = A B
Here, the “⊕” symbol between inputs A and B signifies the XOR-function.
Buffer
A buffer is a single input device whose output is logically equal to its input. The only use of
this gate is to be able to supply enough current to the capacitive load created by a multitude of
logic gates connected to its output. The logical representation of this gate is shown in Fig. 1.6.
IN OUT
All basic logic gates need to have complemented forms in logic design. If a single input
needs to be complemented, an inverter shown in Fig. 1.7 is used. The inverter truth table is
shown in Table 1.4.
IN OUT
0 1
1 0
OUT ¼ IN
Here, the “-” symbol on top of the input, IN, represents the complement-function.
The complemented form of two-input AND gate is called two-input NAND gate, where “N”
signifies negation. The logic representation is shown in Fig. 1.8, where a circle at the output of
the gate means complemented output. The truth table of this gate is shown in Table 1.5. Note
that all output values in this table are exact opposites of the values given in Table 1.1.
A
OUT
B
0 0 1
0 1 1
1 0 1
1 1 0
6 1 Review of Combinational Circuits
OUT ¼ A : B
Similar to the NAND gate, the two-input OR and the two-input XOR gates have com-
plemented configurations, called the two-input NOR and the two-input XNOR gates,
respectively.
The symbolic representation and truth table of a two-input NOR gate is shown in Fig. 1.9
and Table 1.6, respectively. Again, all the outputs in Table 1.6 are the exact complements of
the outputs in Table 1.2.
A
OUT
B
0 0 1
0 1 0
1 0 0
1 1 0
OUT ¼ A þ B
The symbolic representation and truth table of a two-input XNOR gate is shown in
Fig. 1.10 and Table 1.7, respectively. This gate, like its counterpart the two-input XOR gate,
is often used to detect if input logic levels are equal.
A
OUT
B
0 0 1
0 1 0
1 0 0
1 1 1
1.1 Logic Gates 7
OUT ¼ A B
It is often necessary to create an open circuit between the input and the output of a logic gate
if the gate is not enabled. This need creates two more basic logic gates, the tri-state buffer
and tri-state inverter.
The tri-state buffer is shown in Fig. 1.11. Its truth table in Table 1.8 indicates continuity
between the input and the output terminals if the control input, EN, is at logic 1. When EN is
lowered to logic 0, an open circuit exists between the IN and the OUT terminals, which is
defined as high impedance state (HiZ).
IN OUT
EN
0 0 HiZ
0 1 HiZ
1 0 0
1 1 1
The tri-state inverter is shown in Fig. 1.12 along with its truth table in Table 1.9. This
gate behaves like an inverter when EN input is at logic 1. However, when EN is lowered to
logic 0, its output disconnects from its input.
IN OUT
EN
0 0 HiZ
0 1 HiZ
1 0 1
1 1 0
The control input, EN, to tri-state buffer and inverter can also be complemented in order to
produce an active-low enabling scheme.
The tri-state buffer with the active-low enable input in Fig. 1.13 creates continuity when
EN = 0.
IN OUT
EN
The tri-state inverter with the active-low input in Fig. 1.14 also functions like an inverter
when EN is at logic 0, but its output becomes HiZ when EN is changed to logic 1.
IN OUT
EN
It is essential to be able to reconfigure logic functions to suit our design goals. Logical
reconfigurations may be as simple as regrouping the inputs to a single gate or comple-
menting the inputs of several gates to reach a design objective.
The identity, commutative, associative, distributive laws and the DeMorgan’s negation
rules are used to perform logical manipulations. Table 1.10 tabulates these laws.
1.2 Boolean Algebra 9
A.1=A
A.0=0
A.A=A
A.A=0
Identity
A+1=1
A+0=A
A+A=A
A+A=1
A=A
A.B=B.A
Commutative
A+B=B+A
A . (B . C) = (A . B) . C
Associative
A + (B + C) = (A + B) + C
A . (B + C) = A . B + A . C
Distributive
A + B . C = (A + B) . (A + C)
A.B=A+B
DeMorgan’s
A+B=A.B
OUT ¼ A : B : C þ A : B : C þ A : B
¼ A : C : ðB þ BÞ þ A : B
¼ A : (C þ BÞ
OUT ¼ A þ A : B
¼ ðA þ AÞ : ðA þ BÞ
¼ A þ B
10 1 Review of Combinational Circuits
OUT ¼ A : B þ A : C þ B : C
¼ A : B þ A : C þ B : C : ðA þ AÞ
¼ A : B þ A: C þ A: B : C þ A: B : C
¼ A : B : ð1 þ CÞ þ A : C : ð1 þ B)
¼A:BþA:C
OUT ¼ ðA þ BÞ : ðA þ C)
¼A : A þ A : C þ A : B þ B : C
¼A : C þ A : B þ B : C
¼ A : C þ A : B þ B : C : ðA þ AÞ
¼A : C þ A : B þ A : B : C þ A : B : C
¼ A : C : ð1 þ BÞ þ A : B : ð1 þ CÞ
¼A : C þ A : B
OUT ¼ ðA þ BÞ : C : D
¼ ðA þ BÞ : ðC þ DÞ
¼A:CþA:DþB:CþB:D
OUT ¼ A : B þ C : D
¼A:BþC:D
¼ ðA þ BÞ : ðC þ DÞ
1.3 Designing Combinational Logic Circuits Using Truth Tables 11
A combinational logic circuit is a cascaded form of basic logic gates without any feedback
from the output to any of its inputs. The logic function is obtained from a truth table that
specifies the complete functionality of the digital circuit.
Example 1.7: Using the truth table given in Table 1.11 determine the output function of the
digital circuit.
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 0
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
The output function can be expressed either as the OR combination of AND gates or the
AND combination of OR gates.
If the output is expressed in terms of AND gates, all output entries that are equal to one in
the truth table must be grouped together as a single OR gate.
12 1 Review of Combinational Circuits
OUT ¼ A : B : C : D þ A : B : C : D þ A : B : C : D þ A : B : C : D
þA:B:C:DþA:B:C:DþA:B:C:D
This expression is called the Sum Of Products (SOP), and it contains seven terms each
of which is called a “minterm”. In the first minterm, each A, B, C and D input is com-
plemented to produce OUT = 1 for the A = B = C = D = 0 entry of the truth table. Each of
the remaining six minterms also complies with producing OUT = 1 for their respective input
entries.
The resulting combinational circuit is is shown Fig 1.15.
A
B
C
D
A
B
C
D
A
B
C
D
A
B
OUT
C
D
A
B
C
D
A
B
C
D
A
B
C
D
Fig. 1.15 AND-OR logic representation of the truth table in Table 1.11
If the output function needs to be expressed in terms of OR gates, all the output entries
that are equal to zero in the truth table must be grouped as a single AND gate.
1.3 Designing Combinational Logic Circuits Using Truth Tables 13
OUT ¼ ðA þ B þ C þ DÞ : (A þ B þ C þ DÞ : ðA þ B þ C þ D)
: ðA þ B þ C þ DÞ : ðA þ B þ C þ DÞ : ðA þ B þ C þ DÞ
: ðA þ B þ C þ DÞ : ðA þ B þ C þ D) : ðA þ B þ C þ DÞ
This expression is called the Product Of Sums (POS), and it contains nine terms each of
which is called a “maxterm”. The first maxterm produces OUT = 0 for the ABCD = 0011
entry of the truth table. Since the output is formed with a nine-input AND gate, the values of
the other maxterms do not matter to produce OUT = 0. Each of the remaining eight max-
terms generates OUT = 0 for their corresponding truth table input entries.
The resulting combinational circuit is shown in Fig. 1.16.
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
A
B
OUT
C
D
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
Fig. 1.16 OR-AND logic representation of the truth table in Table 1.11
14 1 Review of Combinational Circuits
One of the most useful tools in logic design is the use of Karnaugh maps (K-map) to
minimize combinational logic functions.
Minimization can be performed in two ways. To obtain the SOP form of a minimized
logic function, logic 1 entries of the truth table must be grouped together in the K-map. To
obtain the POS form of a minimized logic function, logic 0 entries of the truth table must be
grouped together in the K-map.
Example 1.8: Using the truth table in Table 1.12, determine the minimized SOP and POS
output functions. Prove them to be identical.
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
The SOP function is formed by grouping logic 1s in Fig. 1.17 to obtain the minimized
output function, OUT.
OUT
AB
C 00 01 11 10
0 1 1 0 1
1 1 0 0 1
Fig. 1.17 K-map of the truth table in Table 1.12 to determine SOP
Grouping 1s takes place among neighboring boxes in the K-map where only one variable
is allowed to change at a time. For instance, the first grouping of 1s combines the ABC = 000
and ABC = 010 entries as they are in the neighboring boxes. Only B changes from logic 0 to
logic 1 while A and C stay constant at logic 0. To obtain OUT = 1, both A and C need to be
complemented; this produces the first term, A : C, for the output function. Similarly, the
second grouping of 1s combines the neighboring boxes, ABC = 000, 001, 100 and 101,
where both A and C change while B stays constant at logic 0. To obtain OUT = 1, B needs to
be complemented; this generates the second term, B, for the output function.
1.4 Combinational Logic Minimization—Karnaugh Maps 15
This means that either the term A : C or B makes OUT equal to logic 1. Therefore, the
minimized output function, OUT, in the SOP form is:
OUT ¼ B þ A : C
Grouping 0s produces the minimized POS output function as shown in Fig. 1.18.
OUT
AB
C 00 01 11 10
0 1 1 0 1
1 1 0 0 1
Fig. 1.18 K-map of the truth table in Table 1.12 to determine POS
This time, the first grouping of 0s combines the boxes, ABC = 011 and 111, where A
changes from logic 0 to logic 1 while B and C stay constant at logic 1. This grouping targets
OUT = 0, which requires both B and C to be complemented. As a result, the first term of the
output function, B þ C, is generated. The second grouping combines ABC = 110 and 111
where C changes from logic 0 to logic 1 while A and B stay at logic 1. To obtain OUT = 0,
both A and B need to be complemented. Consequently, the second term, A þ B, forms.
Therefore, either B þ C or A þ B should produce OUT = 0, resulting the following POS
function.
OUT ¼ ðB þ CÞ : ðA þ BÞ
To find out if the SOP and POS forms are identical to each other, we can manipulate the
POS expression above using the algebraic rules given earlier.
OUT ¼ ðB þ CÞ : ðA þ BÞ
¼ A:B þ B:B þ A:C þ B:C
¼A:BþBþA:CþB:C
¼ B : ðA þ 1 þ CÞ þ A : C
¼ B þ A :C
OUT
AB
CD 00 01 11 10
00 1 0 0 1
01 1 1 0 1
11 0 0 0 0
10 1 0 0 1
Fig. 1.19 K-map of the truth table in Table 1.11 to determine SOP
The minimized output function contains only three minterms compared to seven minterms
in Example 1.7. Also, the minterms are reduced to groups of two or three inputs instead of four.
OUT ¼ B : C þ A : C : D þ B : D
B
C
A
C OUT
D
B
D
Fig. 1.20 Minimized logic circuit in SOP form from the K-map in Fig. 1.19
Further minimization can be achieved algebraically, which then reduces the number of
terms from three to two.
OUT ¼ B : ðC þ DÞ þ A : C : D
B
C
D
OUT
A
C
D
Fig. 1.21 Logic circuit in Fig. 1.20 after algebraic minimizations are applied
To obtain the POS output function, logic 0s are grouped together as shown in Fig. 1.22.
OUT
AB
CD 00 01 11 10
00 1 0 0 1
01 1 1 0 1
11 0 0 0 0
10 1 0 0 1
Fig. 1.22 K-map of the truth table in Table 1.11 to determine POS
The minimized output function contains only three maxterms compared to nine in
Example 1.7. Also, the maxterms are reduced to groups of two inputs instead of four.
OUT ¼ ðC þ DÞ : ðA þ BÞ : ðB þ D)
C
D
A
B OUT
B
D
Fig. 1.23 Minimized logic circuit in POS form from the K-map in Fig. 1.22
Exploring the Variety of Random
Documents with Different Content
Kun tämä harkitsematon ja äkkipäinen menettely tov. Tarjuksen
taholta ei ollut herättämättä kiusallista huomiota koko
iltamayleisössä, jonka joukossa oli porvareitakin, kiiruhti muutamia
luotettavia kommunisteja paikalle, tarkoituksella hillitä tov. Tarjusta,
joka nyt oli alkanut potkia aitan ovea hajalle.
Tämä tieto, joka mursi tov. Mikko Tarjuksen sydämen, niin että hän
yritti potkaista Hilta Kukkasjärveä, täytti Pöllölän kommuunin
internaalien ja johtohenkilöiden mielet ylpeydensekaisella ilolla, mikä
puhkesi lämpimiksi onnentoivotuksiksi, ja sanoma kihlauksesta levisi
kulovalkean kaltaisella nopeudella kommunistisuusta toiseen.
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com