Unit-1 Co
Unit-1 Co
Units:
1. Basic Structure of Computers
2. Register Transfer Language and Microoperations
3. Control Unit Design, Arithmetic & Logic Operations
4. 8086 Microprocessors architecture
5. ALP using 8086 Microprocessors
6. 8255-PPI
Books:
“Computer System Architecture” by Morris Mano.
“ Computer Organization and Architecture” by
William Stallings.
“Computer Organization” by Carl Hamacher
Basic Structure of Computers
Unit-1
Contents:
1. Computer Types
2. Functional Unit
4. Bus structures
5. Software
6. Performance
8. Data Representation
It also deals with the units of computer that receive information from
external sources and send computed results to external destinations.
1. Computer types
Digital computer :
It is a fast electronic calculating machine that accepts digitized input
information, processes it according to a list of internally stored instructions,
and produces the resulting output information.
(1) Personal computer :
It is the most common form of desktop computers.
Desk top computers have processing and storage units, visual display and
audio output units, and a keyboard that can all be located easily on a home or
office desk. The storage media include hard disks, CD-ROMs and diskettes.
Portable notebook computers are a compact version of the personal computers
with all of these components packaged into single unit the size of a thin
briefcase
Computer types (contd.,)
(2) Workstations:
Servers contain sizable database storage units and are capable of handling
large volumes of requests to access the data.
The Internet and its associated servers have become a dominant world wide
source of all types of information.
5) Super Computers :
Super Computers are used for the large scale numerical calculations
required in applications such as weather forecasting, aircraft design and
simulation.
2. Functional units
A computer consists of five functionally independent main parts:
Input unit
Memory unit
Arithmetic and logic unit (ALU)
Output unit
Control unit
The structure of a digital computer is shown below
ALU
MAIN
I/O MEMORY
EQUIP-
MENT
CONTROL
UNIT
Operation of a computer
All activities inside the machine are directed by the control unit.
Input unit
Computers accept coded information through input units.
Cache memory: The small, fast, RAM units are called caches.
They are tightly coupled with the processor and are often contained on
the same integrated circuit chip to achieve high performance.
Main memory: The largest and slowest unit is referred to as the main
memory.
Memory unit (Contd.,)
Secondary storage:
They are brought into the processor, and the actual addition is carried
out by the ALU.
When operands are brought into the processor, they are stored in high-
speed storage elements called registers.
Output unit
The output unit is the counterpart of input unit.
The control unit is effectively the nerve center that sends control
signals to other units and senses their states.
3. Basic operational concepts
To perform a given task, an appropriate program consisting of a list of
instructions is stored in the memory.
Load LOCA, R1
Add R1, R0
location LOCA into processor register R1, and second instruction adds
the contents of register R1 as well as those of R0 and places the sum
into R0.
Note that this destroys the former contents of R1 as well as R0, where as
MAR MDR
Control
R0
PC
R1
.
IR
.
ALU
Rn-1
n general purpose
registers
Its output is available to the control circuits, which generate the timing
signals that control the various processing elements involved in
executing the instruction
Program Counter (PC)
The program counter is another specialized register.
The MDR contains the data to be written into or read out of the
addressed location.
Operating steps for Program execution
Programs are stored in the memory through the input unit.
Execution of the program starts when the PC is set to point to the first
instruction of the program.
The contents of the PC are transferred to the MAR and a Read control
signal is sent to the memory.
After the time required to access the memory elapses, the addressed
word (in this case, the first instruction of the program) is read out of
the memory and loaded into the MDR.
Operating steps for Program execution (Contd.,)
Next, the contents of the MDR are transferred to the IR .
After one or more operands are fetched in this way, the ALU can
perform the desired operation.
The address of the location where the result is to be stored is sent to the
MAR, and a write cycle is initiated.
Operating steps for Program execution (Contd.,)
At some point during the execution of the current instruction, the
contents of the PC are incremented so that the PC points to the next
instruction to be executed.
Normally, the contents of the PC, the general registers, and some
control information are stored in memory.
In addition to the lines that carry the data, the bus must have lines for
address and control purposes.
Bus control lines are used to arbitrate multiple requests for use of the bus.
The main virtue of the single-bus structure is its low cost and its flexibility
for attaching peripheral devices.
Electro mechanical devices such as key board and printers are relatively
slow.
They prevent a high speed processor from being locked to a slow I/O
device during a sequence of data transfers.
Contd.,
This allows the processor to switch rapidly from one device to another,
interweaving its process activity with data transfers involving several
I/O devices.
These tasks include assigning memory to program and data files, moving
data between memory and disk units, and handling I/O operations.
6. Performance
Various parameters for improving the performance of a computer.
The most important measure of the performance of a computer is how
quickly it can execute a programs.
The speed with which a computer executes programs is affected by the
design of its hardware and its machine language instructions.
Bus
Processor clock
Processor circuits are controlled by a timing signal called a clock .
Which adds the contents of registers R1 and R2, and places the sum
into R3.
The contents of R1 and R2 are first transferred to the inputs of the ALU.
Processor can read the next instruction from the memory while the
addition operation is being performed.
Pipelining (contd.,)
Then, if that instruction also uses the ALU, its operands can be
transferred to the ALU inputs at the same time that the result of Add
instruction is being transferred to R3.
This means that multiple function units are used, creating parallel
paths through which different instructions can be executed in parallel.
Second, reducing the amount of processing done in one basic step also
makes it possible to reduce the clock period , P.
Instruction set : CISC and RISC
The terms CISC and RISC refer to design principles and techniques.
Thus SPEC rating of 50 means that the computer under test is 50 times
faster than the reference computer for this particular benchmark.
Contd.,
The test is repeated for all the programs in the SPEC suite, and the
geometric mean of the results is computed.
All processors usually have access to all of the memory in such systems,
and the term shared-memory multiprocessor systems is often used to
make this clear.
Multiprocessors (contd.,)
The high performance of these systems comes with much increased
complexity and cost.
The computers normally have access only to their own memory units.
When the tasks they are executing need to communicate data, they do
so by exchanging messages over a communication network.
Only the four bit binary numbers from 0000 through 1001 are used
Alphanumeric Representation
» A complete list of ASCII : p. 384, Tab. 11-1, Morris Mano Text Book
1) M + (rn-N)
2) M N : Discard end carry, Result = M-N
3) M N : No end carry, Result = - r’s complement of (N-M)
Decimal Example)
MN 72532(M) - 13250(N) = 59282
72532 MN
13250(M) - 72532(N) = -59282
Discard
+ 86750 (10’s complement of 13250) 13250
End Cary 1 59282 + 27468 (10’s complement of 72532)
No End Carry
Result = 59282 0 40718
Result = -(10’s complement of 40718)
= -(59281+1) = -59282
Binary Example) XY
XY 1010100(X) - 1000011(Y) = 0010001 1000011(X) - 1010100(Y) = -0010001
1000011
1010100 + 0101100 (2’s complement of 1010100)
+ 0111101 (2’s complement of 1000011) 0 1101111
1 0010001 Result = -(2’s complement of 1101111)
= -(0010000+1) = -0010001
Result = 0010001
*Numeric Data
1) Fixed Point
9. Fixed-Point Representation 2) Floating Point
Computers must represent everything with 1’s and 0’s, including the sign of a
number and fixed/floating point number * 32.25
Binary/Decimal Point 1) 0.25, 2) 32.0, 3) 32.25
The position of the binary/decimal point is needed to represent
fractions, integers, or mixed integer-fraction number
Two ways of specifying the position of the binary point in a register
1) Fixed Point : the binary point is always fixed in one position
A binary point in the extreme left of the register(Fraction :
0.xxxxx)
A binary point in the extreme right of the register(Integer :
xxxxx.0)
The binary point is not actually present, but the number stored
in the register is treated as a fraction or as an integer
2) Floating Point : the second register is used to designate the
position of the binary point in the first register.
Integer Representation * MSB for Sign
+14 -14 “0” is plus +
Signed-magnitude representation “1” is minus -
Most Signed-1’s complement representation 0 0001110 1 0001110
Common
Signed-2’s complement representation 0 0001110 1 1110001
0 0001110 1 1110010
Arithmetic Addition (-12) + (-13) = -25
(+12) + (+13) = +25
Addition Rules of Ordinary Arithmetic
The signs are same : sign= common sign, result= add (+25) + (-37)
= 37 - 25 = -12
The signs are different : sign= larger sign, result= larger-smaller
Addition Rules of the signed 2’s complement
Add the two numbers including their sign bits *Addition Example
+ 6 00000110 - 6 11111010
Discard any carry out of the sign bit position + 13 00001101 + 13 00001101
Arithmetic Subtraction + 19 00010011 + 7 00000111
Subtraction is changed to an Addition
+ 6 00000110 - 6 11111010
(± A) - (+ B) = (± A) + (- B) - 13 11110011 - 13 11110011
(± A) - ( - B) = (± A) + (+ B) - 7 11111001 - 19 11101101
* Subtraction Example (- 6) - ( - 13) = +7
11111010 - 11110011 = 11111010 + 2’s comp of 11110011
Discard = 11111010 + 00001101
End Carry = 1 00000111 = +7
Overflow
Two numbers of n digits each are added and the sum occupies n+1 digits
n + 1 bit cannot be accommodated in a register with a standard length of
n bits(many computer detect the occurrence of an overflow, and a
corresponding F/F is set)
Overflow
An overflow may occur if the two numbers added are both positive or both negative
When two unsigned numbers are added
an overflow is detected from the end carry out of the MSB position
Transmitter Receiver
~
~
Parity Bit
An extra bit included with a binary message to make the total
number of 1’s either odd or even.
Even-parity method
The value of the parity bit is chosen so that the total number
of 1s (including the parity bit) is an even number
1 1 0 0 0 0 1 1
Added parity bit
Odd-parity method
Exactly the same way except that the total number of 1s is an
odd number
1 1 0 0 0 0 0 1
Added parity bit
Parity Generator/Checker
At the sending end, the message is applied to a parity
generator
At the receiving end, all the incoming bits are applied to a
parity checker
11000011 11000010
(Even-parity Generator) (Even-parity Checker)
A B C D E O
0 0 0 0 0 1
0 0 0 1 1 0
0 0 1 0 1 0
0 0 1 1 0 1
0 1 0 0 1 0
0 1 0 1 0 1
0 1 1 0 0 1
0 1 1 1 1 0
1 0 0 0 1 0
1 0 0 1 0 1
1 0 1 0 0 1
1 0 1 1 1 0
1 1 0 0 0 1
1 1 0 1 1 0
1 1 1 0 1 0
1 1 1 1 0 1