Computer Archtecture
Computer Archtecture
By: Mjema A. R
Computer
From the Latin – Computare – which means ‘calculate’.
Architecture
The structure and design of a system or product.
Computer Architecture
A conceptual structure and logical organization of a
computer or computer based system.
The Analogue systems utilizes values that can take any form and can
be quantized with decimal numbers
The ENIAC was completed in 1946, too late to be used in the war effort.
Electronic Computers
In 1984, the
electromechanical computer
was born with the
development of MARK I by
Howard Aiken and other was
constructed MARK I at
Harvard University under the
sponsorship of IBM
(International Business
Machine).
However, the good idea is to write only the coefficients and from their position
obtain the necessary powers of 10.
The aj coefficients are one of the ten digits (0,1,2,…, 9), and the subscript j
gives the value and, hence, the power of 10 by which the coefficient must be
multiplied.
105a5 + 104a4 + 103a3 + 102a2 + 101a1 + 100a0 + 10-1a-1 + 10-2a-2 + 10-3a-3.
Other number systems includes the octal, base 8. See the table below
Number Base Conversions
But binary numbers are difficult to work with because they require
three or four times as many digits as their decimal equivalent.
For example,
Arithmetic operations with numbers in base r follow the same rules as for
decimal numbers.
When other than the familiar base 10 is used, one must be careful to use
only the r allowable digits.
Complements
The subtraction operation is not easily performed by a
digital circuit.
Complements
Complements
Examples;
Binary Arithmetic Operations
Complements
2 examples;
Binary Arithmetic Operations
iii) If the result of addition has a carry over then it is dropped and an
1 is added in the last bit.
Evaluate:
Hence
Minued - 110101
010000
Thereforet he required difference is 10000
Binary Arithmetic Operations
Subtraction with Complements
Solution:
1’s complement of 111001 is 000110.
Hence Minued - 101011
110001
0100.101
Binary Arithmetic Operations
Subtraction with Complements
10110.01
00101.01
11011.10
(iii) If the final carry over of the sum is 1, it is dropped and the result
is positive.
(iv) If there is no carry over, the two’s complement of the sum will be
the result and it is negative.
Binary Arithmetic Operations
Subtraction with Complements
Solution:
The numbers of bits in the subtrahend is 5 while that of minuend is 6.
1 10110 Minuend
Minued - 10110
2’s complement of subtrahend - 00110
Result of addition - 11100
As there is no carry over, the result of subtraction is negative and is
obtained by writing the 2’s complement of 11100 i.e.(00011 + 1) or
00100. Hence the difference is – 100.
Binary Arithmetic Operations
Subtraction with Complements
After dropping the carry over we get the result of subtraction as 1.10.
Binary Codes
Electronic digital systems use signals that have two distinct values
and circuit elements that have two stable states.
The codes must be in binary because computers can only hold 1’s
and 0’s.
Binary Codes
The ASCII code is a standard code for alpha-numerals. It uses seven bits
to code 128 characters.
The seven bits of the code are designated by b1 through b7, with b7 being
the most significant bit.
Exercise!
Binary logic deals with variables that take on two discrete values and
with operations that assume logical meaning.
The two values the variables take may be called by different names
(e.g., true and false, yes and no, etc).
There are three basic logical operations: AND, OR and NOT. Other
operations includes Exclusive-OR(X-OR), NAND and NOR.
The logic gates are also called logic circuits because, with proper
input, they establish logical manipulation paths.
Here the lamp L will be lit following operations which involves oeping
or closing switches A and or B. These are taken as inputs and the
bulb as the output.
LOGIC GATES
To reduce design
complexities, the
logic gates uses
designated graphic
symbols.
The OR gate
LOGIC GATES
The NOT or
inverter
gate.
LOGIC GATES
The
Exclusive
OR gate.
LOGIC GATES
The NAND
gate.
LOGIC GATES
Although most examples here have most logic gates with two
inputs, they can be made to have more than that; three or four but
this will not change their truth tables
LOGIC GATES
One that performs the addition of three bits( two significant bits and a
previous carry) is a full adder.
Digital Combinational Circuits
Half Adder
In this case we need two inputs x and y as well as two outputs carry
C and sum S.
The truth table will tell us which gates to use and connect to which
other ones.
Digital Combinational Circuits
Half Adder
Half Adder
Half Adder
So the last circuit can be designed to share the same inputs and
number of gates reduced to the following design;
Digital Combinational Circuits
General conclusions
Introduction
Sequential circuits employ memory elements (binary cells) in addition
to logic gates. Their outputs are a function of the inputs and the state
of the memory elements.
Introduction
Block diagram of a
sequential circuit is
shown here →
This consists of a
combinational circuit to
which memory elements are
connected to form a
feedback path.
Digital Sequential Circuits
Introduction
The binary information stored in the memory at any given time defines
the state of the sequential circuit.
Introduction
There are two main types of sequential circuits. Their classification
depends on the timing of their signals.
In practice, the clock pulses are applied into AND gates together with
the signals that specify the required change in memory elements.
The AND gate outputs can transmit signals only at instants that
coincide with the arrival of clock pulses.
Digital Sequential Circuits
Flip flops
A flip flop circuit has two outputs, one for the normal value and one for
the complement value of the bit stored in it.
A basic flip flop can be constructed from two NAND gates or two NOR
gates.
Flip flops
Flip flops
Flip flops
Flip flops
Flip flops
It has only two inputs: D and CP. The D input goes directly to the S
input and its complement is applied to the R input.
As it has been seen earlier that the state of a flip flop is switched by a
momentarily change in the input signal.
There are many ways of triggering flip flops such as pulse triggering and
edge triggering.
Remember that logic gates have a propagation delay from the input to the
output.
The time interval from the application of the pulse until the output transition
occurs is a critical factor.
One way of achieving this is to depend on the pulse transition rather than
pulse duration.
Input/output
units
Memory/storage
units
CPU (Central
Processing Unit)
Computer Components
Motherboard Structure
Chipset
Northbridge
– Connected to CPU in high
speed
Southbridge
– Connected in low speed
Bus
– Related to “omnibus”
– Communication system
between components
Computer System
Components Connection
Computer Components
Basic CPU
Architecture
CPU Components
Control Unit- CU
When the control signal is ON, the gate performs its function on
the data inputs and produces a data output.
CPU Components
Control Unit- CU
Similarly, the memory cell will store the bit that is on its input lead
when the WRITE control signal is ON and will place the bit that is
in the cell on its output lead when the READ control signal is ON.
Registers
Functions of Registers
Stores values from other locations (registers and memory)
Addition and subtraction
Shift or rotate data
Test contents for conditions such as zero or positive
Since a cell stores one bit of information, it follows that the register
with n cells can store any discrete quantity of information that
contains n bits.
CPU Components
Functions of Registers
The number and arrangements of flip-flops in the memory unit or
registers depend on the word size of the processor and memory.
The state of a register is an n-tuple number of 1’s and 0’s, with each
bit designating the state of one cell in a register.
Now that you know the internal structure of flip-flops, let’s see an
example of a four bit register.
CPU Components
Functions of Registers
The diagram shows a 4-bit register constructed with 4 D-flip-flops.
It has four data inputs, I4, I3,I2, and I1 as well as four data outputs
A4,A3,A2 and A1.
The clock CP is used to trigger the register for data in and out.
CPU Components
Functions of Registers
Let’s see one example of
register data shift or transfer
operation.
Functions of Registers
Each time a key is struck, the
information from the input
register is transferred into the
eight least significant cells of a
processor register.
Functions of Registers
Each 8-bit character
transferred to the processor
register is preceded by a shift
the previous character to the
next eight cells on its left.
Types of Registers
Data registers
Accumulators
CPU Components
Register Memories
When multiple levels are used, they are denoted L1, L2, and so on.
Register Memories
Register Memories
Register Memories
Levels
Levels
In the case of multicore processors, each core may have its own
dedicated L1 and L2 cache, but share a common L3 cache. .
CPU Components
Operation of Memory
CPU determines if it is a
store or retrieval
CPU Components
Operation of Memory
Memory Capacity
Determined by two factors ;
1. Number of bits in the MAR
2K where K = width of the register in bits.
EEPROM
– Electrically Erasable Programmable ROM
– Slower and less flexible than Flash ROM
Flash ROM
– Faster than disks but more expensive
– Uses
BIOS: initial boot instructions and diagnostics
Digital cameras
CPU Components
CMOS Memory
CMOS (Complimentary Metal Oxide Semiconductor) TR (Transistor)
– Low power consumption, cheap TR
BIOS (Basic I/O System) and system settings that users can change
CPU Components
Machine Cycle
Fetch-decode-execute-store
CPU Components
Machine Cycle
Machine Cycle
Machine Cycle
The instruction contains bits that specify the action the processor is
to take.
Machine Cycle
1. Computer Architecture
2. Computer Organization
Computer Organization
Computer Classification
Based on;
• CPU speed
Computer Classification
Based on;
Complexity of the Operating System
• Physical size
• Cost
• Cyber Memory Space
• Secondary memory size
• The multiple-programming degree
Computer System
Von Neumann
Architecture
It also has external
mass storage and
input and output
mechanisms.
Von Neumann
Architecture
The computer has
single storage
system(memory) for
storing data as well as
program to be
executed.
A single set of
address/data buses
between CPU and
memory.
Computer System
Von Neumann
Architecture
Processor needs two
clock cycles to complete
an instruction.
Pipelining the
instructions is not
possible with this as the
first clock cycle the
processor gets the
instruction from memory
and decodes it.
Computer System
Von Neumann
Architecture
Harvard Architecture
The Harvard architecture is a computer architecture with physically
separate storage and signal pathways for instructions and data.
Harvard Architecture
Today, most processors
implement such separate
signal pathways for
performance reasons, but
actually implement
a modified Harvard
architecture, so they can
support tasks like loading a
program from disk
storage as data and then
executing it.
Computer System
Harvard Architecture
The name is originated from
"Harvard Mark I" a relay
based old computer,which
stored instruction on punched
tape(24 bits wide) and data in
electo-mechanical counters.
Harvard Architecture
Two sets of address/data
buses between CPU and
memory.
Processor can complete an
instruction in one cycle if
appropriate pipelining
strategies are implemented.
Harvard Architecture
In the second stage of
pipeline data is taken from
the data memory using the
decoded instruction or
address.
Pipelining
In computing, a pipeline is a set of data processing elements
connected in series, where the output of one element is the input of
the next one.
Pipelining
Each stage completes a part of an instruction in parallel.
The stages are connected one to the next to form a pipe - instructions
enter at one end, progress through the stages, and exit at the other
end.
Pipelining
Because the pipe stages are hooked together, all the stages must be
ready to proceed at the same time.
We call the time required to move an instruction one step further in the
pipeline a machine cycle .
The length of the machine cycle is determined by the time required for
the slowest pipe stage.
Computer System
Pipelining
The pipeline designer's goal is to balance the length of each pipeline
stage .
If the stages are perfectly balanced, then the time per instruction on
the pipelined machine is equal to;
HTTP pipelining, where multiple requests are sent without waiting for
the result of the first request.
Questions….!?