Computer Organization & Architecture
Computer Organization & Architecture
&
Architecture
1.1 Introduction
Computer Organization :
is concerned with the way the hardware computer operate and the way they are
connected together to form the computer system.
The various components are assumed to be in place and the task is to investigate the
organizational structure to verify that the computer parts operate as intended.
CONT’D…
Computer Design:
Once the computer specification is formulated, it is the task of the designer to develop
hardware for the system.
It is concerned with the determination of what hardware should be used and how the parts
should be connected.
It is the aspect of computer hardware and sometimes referred to as computer
implementation.
CONT’D…
Computer Architecture:
is concerned with the structure and behavior of the computer as seen by the user.
It includes the information formats, the instruction set and techniques for addressing
memory.
1.2 Digital Logic Circuits
This chapter introduces the fundamental knowledge needed for the design of digital systems
constructed with the individual gates and flip – flops.
This provides the necessary background for understanding the digital circuits to be presented.
1.3 Digital Computers
Digital computers use the binary number system, which has two digits, 0 and 1
Bits are grouped together as bytes and words to form some type of representation within
the computer.
Fig 1.1
CONT’D…
The hardware of the computer is usually divided into three major parts.
The Central processing Unit (CPU): contains an arithmetic and logic unit for
manipulating data, a number of registers for storing data, and control circuits for fetching
and executing instructions.
The memory of a computer; contains storage for instructions and data, it is called a
Random Access Memory (RAM) ,the CPU can access any location in memory at random
and retrieve the binary information within a fixed interval of time.
CONT’D…
The input and output processor: contains electronic circuit for communication and
controlling the transfer of information between the computer and the outside world.
The input and output device: connected to the computer include keyboards, printers,
terminals, magnetic disk drives and other communication devices.
1.4 Logic Gates
Gates are the fundamental building block of all digital logic circuits.
These signals can be represented by voltage to specify one of two possible states.
For example, if a wire contains a signal of 3 volts, it is considered to contain the digital value 1.
CONT’D…
Likewise, if the wire contains 1.5 volts, then it represents the digital value 0.
The manipulation of binary information in a computer is done using logic circuits called
gates.
Each gate is defined in three ways: graphic symbol, algebraic notation/function, and truth
table
Fig 1.2
A. AND Gate
B. OR Gate
A
X=A+B
B
X = A’
D. Buffer
X=A
E. NAND
F. NOR
A
G. Exclusive-OR (XOR)
A x = A⊕ B
or
B x=A’B+AB’
H. Exclusive-NOR
X = (A⊕ B)’
1.5 Boolean Algebra
Boolean algebra is an algebra that deals with binary variables and logic operations.
A Boolean function can be expressed algebraically with binary variables, the logic
operation symbols, parentheses and equal sign, and it can represent by: truth table,
logic diagram & algebraic expression.
CONT’D…
This theorem is very important in dealing with NOR and NAND gates.
It states that a NOR gate that performs the (x+y)’ function is equivalent to the function
x’y’.
For this reason the NOR and NAND gates have two distinct graphic symbols.
OR invert invert AND
The invert AND symbol for the NOR gate follows from the De-Morgan’s thermo and from the convention that
small circles denote complementation.
Similarly the NAND gates have two distinct symbols as shown below.
AND-invert
x
y
z
Invert OR
x
Y
z
1.8 Complement of a function
The complement of a function F when expressed in a truth table is obtained by interchanging 1’s
When the function is expressed in algebraic form the complement of the function can be derived
(x1+x2+x3+….Xn) = x1’x2’x3’…xn’
(x1x2x3…xn)’ =x1’+x2’+x3’+…+xn’
CONT’D…
By changing all OR operation to AND operation and all OR operations and then complementing
each individual letter variable we can derive a simple procedure for obtaining the complement of
an algebraic expression.
NB: The complement expression is obtained by interchanging AND and OR operations and
simplification techniques/methods.
The Boolean algebra can be simplified using the following two methods:
fig 1.3
CONT’D…
The variable names are listed across both the sides of the diagonal line into the corner of the map.
The 0’s and the 1’s marked along each row and each column designate the value of the variables.
Each variable under the brackets contain half of the squares in the map where that variable
appears unprimed.
CONT’D…
The min-term represented by a square is determined from the binary assignment of the
Here the min-term 5 in the three variable maps are 101 of the second column.
This min-term represents a value for the binary variables A, B and C with A and C being
A Boolean function represented by a truth table is plotted into the map by inserting 1's into those
squares where the function is 1.
Boolean functions can then be simplified by identifying adjacent squares in the Karnaugh map that
contain a 1.
A square is considered adjacent to another square if it is next to, above, or below it.
In addition, squares at the extreme ends of the same horizontal row are also considered adjacent.
Groups of combined adjacent squares may share one or more squares with one or more groups.
Each group of squares represents an algebraic term, and the OR of those terms gives the
simplified algebraic expression for the function.
To find the most simplified algebraic expression, the goal of map simplification is to identify the least
number of groups with the largest number of members.
CONT’D…
There are four squares marked with 1’s, one for each min-term that produces 1 for the function.
These squares belong to min-term 3,4,6,7 and are recognized from the figure b.
The remaining two squares with 1’s in the two corner of the second row are adjacent and belong to row
F = BC + AC’
F(A,B,C) = Σ(0,2,4,5,6)
The five min-terms are marked with 1’s in the corresponding squares of the three variable maps.
The four squares in the first and the fourth columns are adjacent and represent the term C’.
The remaining square marked with a 1 belongs to min-term 5 and can be combined with the
Fig 1.4
CONT’D…
The area in the map covered by this four variable consists of the squares marked with 1’s in fig 1.4.
The function contains 1’s in the four corners that when taken as groups give the term B’D’.
This is possible because these four squares are adjacent when the map is considered with the top
The two 1’s on the bottom row are combined with the two 1’s on the left of the bottom row
The remaining 1 in the square of min-term 6 is combined with the min-term 2 to give the
term A’CD’.
This approach is similar to the Sum-of-Products simplification, but identifying adjacent squares
Then, instead of representing the function as a sum of products, the function is represented as a
product of sums.
The 1’s marked in the map of fig 1.5 represents the min-terms that produces a 1 for the function,
CONT’D…
The squares marked with 0’s represent the min-term not included in F and therefore denote the complement
of F.
Combining the squares with 1’s gives the simplified function in sum-of-products form:
F = B’D’ +B’C’+A’C’D
If the squares marked with 0’s are combined as shown in the diagram, we obtain the simplified complement
function:
F’=(A’+B’)(C’+D’)(B’+D)
Fig 1.5
Fig 1.6
Fig 1.7
1.11 Don't Care Conditions
When this condition occurs, an X is used in the map to represent the don't care condition.
Then, when performing map simplification, a square containing an X can be used in both the
When choosing adjacent squares for the function in the map, the x’s may be assumed to be
In addition an x need not to be used at all if it does not contribute to the simplification of
the function.
In each case the choice depends only on the simplification that can be achieved.
As example consider the following Boolean function together with the don’t care min-terms:
F(A,B,C) = Σ0,2,6)
d(A,B,C) = Σ(1,3,5)
CONT’D…
The don’t care min-terms listed with d may produce either a 0 or 1 for the function.
The 1’s and x’s are combined in any convenient manner so as to enclose the maximum
It is not necessary to include the don’t care min-terms 1 and 3 with the 1’s in the first row
we obtain the term, BC’.
F = A’ + BC’
But if we don’t use the X’s the simplified expression would be:
A combinational circuit is a connected arrangement of logic gates with a set of inputs and outputs.
At any given time, the binary values of the outputs are a function of the binary values of the inputs.
The design of a combinational circuit starts from a verbal outline of the problem and ends in a logic
circuit diagram.
CONT’D…
The truth table that defines the relationship between inputs and outputs is derived.
A binary code of n bits is capable of representing up to 2 n distinct elements of the coded information
A decoder is a combinational circuit that converts binary information from the n coded inputs to a
A decoder has n inputs and m outputs, where m ≤ 2n, and are called n-to-m-line decoders
Some decoders use NAND gates rather than AND gates causing the outputs to be in their
complemented form
The circuit would then be enabled when E = 0
Fig 1.21 2-to-4 line decoder with NAND gates
NB:
It is possible to combine two or more decoders with enable inputs to form a larger decoder
The enable inputs are a convenient feature for decoder expansion
Fig 1.22 A 3X8 Decoder constructed with 2 X 4 Decoders
A1 = D 2 + D 3 + D 6 + D 7
A2 = D 4 + D 5 + D 6 + D 7
Multiplexers
A multiplexer (MUX) is a combinational circuit with 2n input data lines, n input select lines,
and one output line
The input selection lines determine which input data line is selected for the output
Fig 1.23 4-to-1 line Multiplexers
Rather than using a truth table to describe the circuit, we use function table with 2n rows is used ,
example for the 4-to-1 line multiplexer above we needs 64 rows, if we use truth table , then instead we
use function tables.
One row for each combination of the selection inputs
The MUX is also called a data selector
Function table for 4-to- 1 line Multiplexers
The current output of a sequential circuit depends on the current input and the current
state of that circuit.
Flip-flops
Is the simplest form of sequential circuit.
There are a variety of flip flops, all of which share two properties:
2. The flip-flop has two outputs, which are always the complements of each other.
These are generally labeled Q and Q’ (Q complement).
CONT’D…
It has two outputs, one for the normal value and one for the complement value of the bit
stored in it.
Synchronous sequential circuits employ signals that effect storage elements only at discrete
instances of time.
A timing device called a clock pulse generator that produces a periodic train of clock pulses
achieves synchronization.
Values maintained in the storage elements can only change when the clock pulses.
Hence, a flip-flop maintains a binary state until directed by a clock pulse to switch states.
CONT’D…
The difference in the types of flip flops is in the number of inputs and the manner in which
Flip-flops can be described by a characteristic table which permutated all possible inputs
The characteristic table of a flip-flop describes all possible outputs (called the next state)
at time Q(t+1) over all possible inputs and the present state at time Q(t).
The most common types of flip flops are:
SR Flip-Flop
D Flip-Flop
JK Flip-Flop
T Flip-Flop
If there is no signal at the clock input C, the output of the circuit cannot change irrespective of the
Only when the clock signals changes from 0 to 1 can the output be affected according to the values
in inputs S and R
If both S and R are 0 during the clock transition, output does not change.
When both S and R are equal to 1, the output is unpredictable and may go to either 0 or
Inputs:
T (for toggle)
C (for clock)
Outputs:
Q &Q‘
The T flip flops can be expressed by this equation: Q(t+1)=Q(t) XOR T
Most flip-flops are edge-triggered flip-flops (i.e. the transition occurs at a specific level of
The 1st is the Master, w/h responds to the positive level of the clock and
The 2nd is the Slave, w/h responds to the negative level of the clock.
Flip-flops can also include special input terminals for setting or clearing the flip-flop asynchronously.
These inputs are usually called preset and clear and are useful for initialing the flip-flops before clocked
Registers
A register is a group of flip-flops with each flip-flop capable of storing one bit of information.
A register may also have combinational gates that perform certain data-processing tasks.
The flip-flops hold the data and the gates control when and how new data is transferred
into the register.
The transfer of new data into a register is called loading the register
If all bits are loaded simultaneously with a common clock pulse transition, then the
The load input determines the action to be taken with each clock pulse
If the load input is 1, then the data in the four inputs are transferred at the next positive
clock transition.
CONT’D…
If the load input is 0, the data inputs are inhibited and the output is fed back to simulate a
no change condition
2. shift registers.
CONT’D…
NB: Figure 1.25 illustrates the operation of a parallel register using D flip-flops.
A shift register is capable of shifting its binary information in one or both directions
The logical configuration is a chain of flip-flops, with the output of one connected to the input of the next
The serial input determines what goes into the leftmost position during the shift
The serial output is taken from the output of the rightmost flip-flop
The most general shift register has all the following capabilities:
A shift-right operation and a serial input line associated with the shift-right
A shift-left operation and a serial input line associated with the shift-left
A parallel load operation and n input lines associated with the parallel transfer
A register that goes through a predetermined sequence of states upon the application of input pulses is
called a counter
Used to count the number of occurrences of an event and for generating timing signals to control the
sequence of operations
An n-bit binary counter is a register of n flip-flops and gates that follow a sequence of states
Every other bit is complemented iff all its lower-order bits are equal to 1.
Natural to use either T or JK flip-flops since they both have a complement state
The chain of AND gates generate the logic for the flip-flop inputs.
CONT’D…
A memory unit is a collection of storage cells together with associated circuits to transfer
information in and out of storage
Each word in memory is assigned an address from 0 to 2 k –1, where k is the number of
address lines.
CONT’D…
A decoder inside the memory accepts an address opens the paths needed to select the bits of the
specified word
The memory capacity is stated as the total number of bytes that can be stored
In random-access memory (RAM) the memory cells can be accessed for information from
The process of locating a word in memory is the same and requires an equal amount of
Communication between memory and its environment is achieved via data input and
The n data output lines supply the information coming out of memory
The k address lines provide a binary number of k bits that specify a specific word or location
The two control lines specify the direction of transfer – either read or write.
CONT’D…
Apply the binary address of the desired word into the address lines
A read-only memory (ROM) is a memory unit that performs the read operation only; there is
no write capability
The binary information stored in a ROM is permanent during the hardware production.
CONT’D…
ROMs come with special internal electronic fuses that can be programmed for a specific
configuration
The outputs are a function of only the present input (the address), so it is a combinational circuit
constructed of decoders and OR gates.
CONT’D…
When used as a memory unit, it stores fixed programs that are not to be altered and for tables
When used in the design of control units for digital computers, it stores coded information
that represents the sequence of internal control variables to enable the various operations
A control unit that utilizes a ROM is called a micro programmed control unit.
Mask programming is done by the semiconductor company based upon a truth table
PROM units contain all fuses intact and are blown by users.