CSO Lecture Notes Unit 1-3
CSO Lecture Notes Unit 1-3
Lecture Notes
Subject Teacher
Unit-II Control Unit Organization: Hardwired control unit, Micro and nano programmed control unit,
Control Memory, Address Sequencing, Micro Instruction formats, Micro program sequencer,
Microprogramming, Arithmetic and Logic Unit: Arithmetic Processor, Addition, subtraction,
multiplication and division, Floating point and decimal arithmetic and arithmetic units, design of
arithmetic unit.
Unit-III Input Output Organization: Modes of data transfer – program controlled, interrupt driven and
direct memory access, Interrupt structures, I/O Interface, Asynchronous Data Transfer, I/O processor,
8085 I/O structure, 8085 instruction set and basic programming. Data Transfer – Serial / parallel,
synchronous/asynchronous, simplex,/half duplex and full duplex.
Unit-IV Memory organization: Memory Maps, Memory Hierarchy, Cache Memory - Organization and
mappings. Associative Memory, Virtual Memory, Memory Management Hardware.
Unit-V Multiprocessors: Pipeline and Vector processing, Instruction and arithmetic pipelines, Vector
and array processors, Interconnection structure and inter-processor communication.
References:
2
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Unit-I:
Computer Basics and CPU
1. Computer Types
A computer can be defined as a fast electronic calculating machine that accepts the (data)
digitized input information process it as per the list of internally stored instructions and
produces the resulting information.
List of instructions are called programs & internal storage is called computer memory.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Input device accepts the coded information as source program i.e. high level language.
This is either stored in the memory or immediately used by the processor to
perform the desired operations. The program stored in the memory determines the
processing steps. Basically the computer converts one source program to an object
program. I.e. into machine language
Finally the results are sent to the outside world through output device. All of these
actions are coordinated by the control unit.
I. Primary memory
II. Secondary memory
I. Primary memory: - Is the one exclusively associated with the processor and operates
at the electronics speeds programs must be stored in this memory while they are being
executed. The memory contains a large number of semiconductors storage cells. Each
capable of storing one bit of information. These are processed in a group of fixed site
called word.
To provide easy access to a word in memory, a distinct address is associated with each
word location. Addresses are numbers that identify memory location.
Number of bits in each word is called word length of the computer. Programs must reside
in the memory during execution. Instructions and data can be written into the memory or
read out under the control of processor.
Memory in which any location can be reached in a short and fixed amount of time after
specifying its address is called random-access memory (RAM).
4
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The time required to access one word in called memory access time. Memory which is
only readable by the user and contents of which can‘t be altered is called read only
memory (ROM) it contains operating system.
Caches are the small fast RAM units, which are coupled with the processor and are aften
contained on the same IC chip to achieve high performance. Although primary storage is
essential it tends to be expensive.
II. Secondary memory: - Is used where large amounts of data & programs have to be
stored, particularly information that is accessed infrequently.
Examples: - Magnetic disks & tapes, optical disks (ie CD-ROM‘s), floppies etc.,
The control and the ALU are many times faster than other devices connected to a
computer system. This enables a single processor to control a number of external devices
such as key boards, displays, magnetic and optical disks, sensors and other mechanical
controllers.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
3. The von Neumann Computer Model
Von Neumann computer systems contain three main building blocks:
o the central processing unit (CPU),
o memory,
o Input/output devices (I/O).
These three components are connected together using the system bus.
The most prominent items within the CPU are the registers: they can be
manipulated directly by a computer program.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
4. System Bus
The system bus connects the CPU with the main memory and, in some systems, with the
level 2 (L2) cache. Other buses, such as the IO buses, branch off from the system bus to
provide a communication channel between the CPU and the other peripherals.
The system bus combines the functions of the three main buses, which are as follows:
The control bus carries the control, timing and coordination signals to manage the
various functions across the system.
The address bus is used to specify memory locations for the data being transferred.
The data bus, which is a bidirectional path, carries the actual data between the
processor, the memory and the peripherals.
7
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5. CPU and Memory Registers,
CPU Register:
A processor register (CPU register) is one of a small set of data holding places that are
part of the computer processor.
A register may hold an instruction, a storage address, or any kind of data (such as a bit
sequence or individual characters). Some instructions specify registers as part of the
instruction. For example, an instruction may specify that the contents of two defined
registers be added together and then placed in a specified register. A register must be
large enough to hold an instruction - for example, in a 64-bit computer; a register must be
64 bits in length. In some computer designs, there are smaller registers - for example,
half-registers - for shorter instructions. Depending on the processor design and language
rules, registers may be numbered or have arbitrary names.
Memory Registers:
Register are used to quickly accept, store, and transfer data and instructions that are being
used immediately by the CPU, there are various types of Registers those are used for
various purpose. Among of the some Mostly used Registers named as AC
or Accumulator, Data Register or DR, the AR or Address Register, program
counter (PC), Memory Data Register (MDR) ,Index register, Memory Buffer Register.
These Registers are used for performing the various Operations. While we are working
on the System then these Registers are used by the CPU for Performing the Operations.
When We Gives Some Input to the System then the Input will be Stored into the
Registers and When the System will gives us the Results after Processing then the Result
will also be from the Registers.
So that they are used by the CPU for Processing the Data which is given by the User.
Registers Perform:-
1) Fetch: The Fetch Operation is used for taking the instructions those are given by the
user and the Instructions those are stored into the Main Memory will be fetch by using
Registers.
2) Decode: The Decode Operation is used for interpreting the Instructions means the
Instructions are decoded means the CPU will find out which Operation is to be
performed on the Instructions.
3) Execute: The Execute Operation is performed by the CPU. And Results those are
produced by the CPU are then Stored into the Memory and after that they are displayed
on the user Screen.
8
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Types of Registers are as Followings
Memory Address Register (MAR)
This register holds the memory addresses of data and instructions. This register is used to
access data and instructions from memory during the execution phase of an
instruction. Suppose CPU wants to store some data in the memory or to read the data
from the memory. It places the address of the-required memory location in the MAR.
Program Counter
The program counter (PC), commonly called the instruction pointer (IP) in Intel x86
microprocessors, and sometimes called the instruction address register, or just part of the
instruction sequencer in some computers, is a processor register
It is a 16 bit special function register in the 8085 microprocessor. It keeps track of
the next memory address of the instruction that is to be executed once the execution of
the current instruction is completed. In other words, it holds the address of the memory
location of the next instruction when the current instruction is executed by the
microprocessor.
Accumulator Register
This Register is used for storing the Results those are produced by the System. When the
CPU will generate Some Results after the Processing then all the Results will be Stored
into the AC Register.
Memory Data Register (MDR)
MDR is the register of a computer's control unit that contains the data to be stored in the
computer storage (e.g. RAM), or the data after a fetch from the computer storage. It
acts like a buffer and holds anything that is copied from the memory ready for the
processor to use it. MDR hold the information before it goes to the decoder.
MDR which contains the data to be written into or readout of the addressed location. For
example, to retrieve the contents of cell 123, we would load the value 123 (in binary, of
course) into the MAR and perform a fetch operation. When the operation is done, a copy
of the contents of cell 123 would be in the MDR. To store the value 98 into cell 4, we
load a 4 into the MAR and a 98 into the MDR and perform a store. When the operation is
completed the contents of cell 4 will have been set to 98, by discarding whatever was
there previously.
The MDR is a two-way register. When data is fetched from memory and placed into the
MDR, it is written to in one direction. When there is a write instruction, the data to be
written is placed into the MDR from another CPU register, which then puts the data into
memory.
The Memory Data Register is half of a minimal interface between a micro program and
computer storage, the other half is a memory address register.
9
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Index Register
A hardware element which holds a number that can be added to (or, in some cases,
subtracted from) the address portion of a computer instruction to form an effective
address. Also known as base register. An index register in a computer's CPU is a
processor register used for modifying operand addresses during the run of a program.
Memory Buffer Register
MBR stand for Memory Buffer Register. This register holds the contents of data or
instruction read from, or written in memory. It means that this register is used to store
data/instruction coming from the memory or going to the memory.
Data Register
A register used in microcomputers to temporarily store data being transmitted to or from
a peripheral device.
6. Micro-operations
In computer central processing units, micro-operations (also known as a micro-ops) are
detailed low-level instructions used in some designs to implement complex machine
instructions (sometimes termed macro-instructions in this context).
Registers are denoted by capital letters and are sometimes followed by numerals, e.g.,
– MAR – Memory Address Register (holds addresses for the memory unit)
– PC – Program Counter (holds the next instruction‘s address)
– IR – Instruction Register (holds the instruction being executed)
– R1 – Register 1 (a CPU register)
• We can indicate individual bits by placing them in parentheses, e.g., PC (8-15), R2 (5),
10
etc.
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Register Transfer Language Instructions
11
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
8. Instruction cycle:
An instruction cycle (sometimes called a fetch–decode–execute cycle) is the basic
operational process of a computer. It is the process by which a computer retrieves a
program instruction from its memory, determines what actions the instruction dictates,
and carries out those actions. This cycle is repeated continuously by a computer's central
processing unit (CPU), from boot-up to when the computer is shut down.
In simpler CPUs the instruction cycle is executed sequentially, each instruction being
processed before the next one is started. In most modern CPUs the instruction cycles are
instead executed concurrently, and often in parallel, through an instruction pipeline: the
next instruction starts being processed before the previous instruction has finished, which
is possible because the cycle is broken up into separate steps.
Steps:-
Each computer's CPU can have different cycles based on different instruction sets, but
will be similar to the following cycle:
1. Fetch the instruction: The next instruction is fetched from the memory address
that is currently stored in the program counter (PC), and stored in the instruction
register (IR). At the end of the fetch operation, the PC points to the next
instruction that will be read at the next cycle.
2. Decode the instruction: During this cycle the encoded instruction present in the
IR (instruction register) is interpreted by the decoder.
3. Read the effective address: In case of a memory instruction (direct or indirect)
the execution phase will be in the next clock pulse. If the instruction has
an indirect address, the effective address is read from main memory, and any
required data is fetched from main memory to be processed and then placed into
data registers (Clock Pulse: T3). If the instruction is direct, nothing is done at this
clock pulse. If this is an I/O instruction or a Register instruction, the operation is
performed (executed) at clock Pulse.
4. Execute the instruction: The control unit of the CPU passes the decoded
information as a sequence of control signals to the relevant function units of the
CPU to perform the actions required by the instruction such as reading values
from registers, passing them to the ALU to perform mathematical or logic
functions on them, and writing the result back to a register. If the ALU is
involved, it sends a condition signal back to the CU. The result generated by the
operation is stored in the main memory, or sent to an output device. Based on the
condition of any feedback from the ALU, Program Counter may be updated to a
different address from which the next instruction will be fetched.
12
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The cycle is then repeated.
13
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Memory Read Operation :-
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
15
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
16
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
17
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
10. Instruction Set:-
The instruction set, also called instruction set architecture (ISA), an instruction set is a
group of commands for a CPU in machine language. The term can refer to all possible
instructions for a CPU or a subset of instructions to enhance its performance in certain
situations.
All CPUs have instruction sets that enable commands to the processor directing the CPU
to switch the relevant transistors. Some instructions are simple read, write and move
commands that direct data to different hardware.
18
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
10.1 CISC Architecture
In the early days machines were programmed in assembly language and the memory
access is also slow. To calculate complex arithmetic operations, compilers have to create
long sequence of machine code.
This made the designers to build an architecture , which access memory less frequently
and reduce burden to compiler. Thus this lead to very power full but complex instruction
set.
CISC architectures directly use the memory, instead of a register file. The above figure
shows the architecture of CISC with micro programmed control and cache memory.
This architecture uses cache memory for holding both data and instructions. Thus, they
share the same path for both instructions and data.
CISC has instructions with variable length format. Thus, the number of clock cycles
required to execute the instructions may be varied.
Instructions in CISC are executed by micro program which has sequence of
microinstructions.
commands.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
This architecture makes the efficient use of main memory since the complexity (or
more capability) of instruction allows to use less number of instructions to achieve a
given task.
The compiler need not be very complicated, as the micro program instruction sets
can be written to match the constructs of high level languages.
1. IBM 370/168
2. Intel 80486
3. VAX 11/780
In RISC architecture, the instruction set of processor is simplified to reduce the execution
time. It uses small and highly optimized set of instructions which are generally register to
register operations.
The speed of the execution is increased by using smaller number of instructions .This
uses pipeline technique for execution of any instruction.
The figure shown below is the architecture of RISC processor, which uses separate
instruction and data caches and their access paths also different. There is one instruction
per machine cycle in RISC processor.
20
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The pipelining technique allows the processor to work on different steps of instruction
like fetch, decode and execute instructions at the same time. Below is image showing
execution of instructions in pipelining technique.
Generally, execution of second instruction is started, only after the completion of the first
instruction. But in pipeline technique, each instruction is executed in number of stages
simultaneously.
When the first stage of first instruction is completed, next instruction is enters into the
fist stage. This process continuous until all the instructions are executed.
21
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Advantages of RISC Architecture
The performance of RISC processors is often two to four times than that of CISC
processors because of simplified instruction set.
This architecture uses less chip space due to reduced instruction set. This makes to
place extra functions like floating point arithmetic units or memory management units
on the same chip.
The per-chip cost is reduced by this architecture that uses smaller chips consisting of
more components on a single silicon wafer.
RISC processors can be designed more quickly than CISC processors due to its
simple architecture.
The execution of instructions in RISC processors is high due to the use of many
registers for holding and passing the instructions as compared to CISC processors.
The performance of a RISC processor depends on the code that is being executed. The
processor spends much time waiting for first instruction result before it proceeds with
next subsequent instruction, when a compiler makes a poor job of scheduling
instruction execution.
RISC processors require very fast memory systems to feed various instructions.
Typically, a large memory cache is provided on the chip in most RISC based systems.
22
Page
The RISC Approach: - RISC processors only use simple instructions that can be
executed within one clock cycle. Thus, the ―MULT‖ command described above could be
divided into three separate commands:
1. ―LOAD‖ which moves data from the memory bank to a register
2. ―PROD‖ which finds the product of two operands located within the registers
3. ―STORE‖ which moves data from a register to the memory banks.
In order to perform the exact series of steps described in the CISC
approach, a programmer would need to code four lines of assembly:
LOAD R1, A <<<======this is assembly statement
LOAD R2,B <<<======this is assembly statement
PROD A, B <<<======this is assembly statement
STORE R3, A <<<======this is assembly statement
At first, this may seem like a much less efficient way of completing the
operation. Because there are more lines of code, more RAM is needed to store the
assembly level instructions. The compiler must also perform more work to convert a
high-level language statement into code of this form.
given and how well it runs existing software. Today, both RISC and CISC manufacturers
are doing everything to get an edge on the competition.
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
10.4 Comparison between RISC and CISC:
RISC CISC
Acronym It stands for ‗Reduced Instruction Set It stands for ‗Complex Instruction Set
Computer‘. Computer‘.
Definition The RISC processors have a smaller set The CISC processors have a larger set of
of instructions with few addressing instructions with many addressing nodes.
nodes.
Memory unit It has no memory unit and uses a It has a memory unit to implement complex
separate hardware to implement instructions.
instructions.
Program It has a hard-wired unit of programming. It has a micro-programming unit.
Code expansion Code expansion can be a problem. Code expansion is not a problem.
Disc space The space is saved. The space is wasted.
Applications Used in high end applications such as Used in low end applications such as
video processing, telecommunications security systems, home automations, etc.
and image processing.
Example − LDAX K
LXI Reg. pair, 16- Load the register pair The instruction loads 16-bit data in the register
Page
Example − PUSH K
Page
POP Reg. pair Pop off stack to the The contents of the memory location pointed out
register pair by the stack pointer register are copied to the low-
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
order register (C, E, L, status flags) of the
operand.
The stack pointer is incremented by 1 and the
contents of that memory location are copied to the
high-order register (B, D, H, A) of the operand.
The stack pointer register is again incremented by
1.
Example − POPK
OUT 8-bit port Output the data from the The contents of the accumulator are copied into
address accumulator to a port the I/O port specified by the operand.
with 8bit address Example − OUT K9L
IN 8-bit port Input data to The contents of the input port designated in the
address accumulator from a port operand are read and loaded into the accumulator.
with 8-bit address Example − IN5KL
Computers may have instructions of several different lengths containing varying number
of addresses. The number of address field in the instruction format of a computer
depends on the internal organization of its registers. Most computers fall into one of three
types of CPU organization.
X = (A + B) x (C + D)
26
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
ADD R1, A, B A1 ® M [A] + M [B]
ADD R2, C, D R2 ® M [C] + M [B]
MUL X, R1, R2 M [X] R1 * R2
The advantage of the three address formats is that it results in short program when
evaluating arithmetic expression. The disadvantage is that the binary-coded instructions
require too many bits to specify three addresses.
X = (A + B) x ( C + D)
X = (A +B) x (C + D)
LOAD A AC ® M [A]
ADD B AC ® AC + M [B]
STORE T M [T] ® AC
All operations are done between the AC register and a memory operand. It‘s the address
of a temporary memory location required for storing the intermediate result.
LOAD C AC ® M (C)
ADD D AC ® AC + M (D)
ML T AC ® AC + M (T)
STORE X M [×]® AC
27
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
12.4 Zero – Address Instruction
A stack organized computer does not use an address field for the instruction ADD and
MUL. The PUSH & POP instruction, however, need an address field to specify the
operand that communicates with the stack (TOS ® top of the stack)
X = (A +B) x (C + D)
PUSH A TOS ® A
PUSH B TOS ® B
ADD TOS ® (A + B)
PUSH C TOS ® C
PUSH D TOS ® D
ADD TOS ® (C + D)
MUL TOS ® (C + D) * (A + B)
POP X M [X] TOS
The operation field of an instruction specifies the operation to be performed. This operation will be
executed on some data which is stored in computer registers or the main memory. The way any operand
is selected during the program execution is dependent on the addressing mode of the instruction. The
purpose of using addressing modes is as follows:
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
For Example: ADD R1, 4000 - In this the 4000 is effective address of operand.
NOTE: Effective Address is the location where operand is present.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5. Register Indirect Mode
In this mode, the instruction specifies the register whose contents give us the address of operand which
is in memory. Thus, the register contains the address of operand rather than the operand itself.
======================
30
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
14. 8085 Microprocessor Organization:
8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor
designed by Intel in 1977 using NMOS technology.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Temporary register
It is an 8-bit register, which holds the temporary data of arithmetic and logical
operations.
Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending
upon the result stored in the accumulator.
These are the set of 5 flip-flops −
Sign (S)
Zero (Z)
Auxiliary Carry (AC)
Parity (P)
Carry (C)
Its bit position is shown in the following table −
D7 D6 D5 D4 D3 D2 D1 D0
S Z AC P CY
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
There are 5 interrupt signals in 8085 microprocessor: INTR, RST 7.5, RST 6.5, RST
5.5, TRAP.
Serial Input/output control
It controls the serial data communication by using these two instructions: SID (Serial
input data) and SOD (Serial output data).
Address buffer and address-data buffer
The content stored in the stack pointer and program counter is loaded into the address
buffer and address-data buffer to communicate with the CPU. The memory and I/O
chips are connected to these buses; the CPU can exchange the desired data with the
memory and I/O chips.
Address bus and data bus
Data bus carries the data to be stored. It is bidirectional, whereas address bus carries the
location to where it should be stored and it is unidirectional. It is used to transfer the
data & Address I/O devices.
8085 Architecture
We have tried to depict the architecture of 8085 with this following image −
33
====================
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Unit-II
Control Unit Organization
1. Control Unit:-
The control unit (CU) is a component of a computer's central processing unit (CPU) that
directs the operation of the processor. It tells the computer's memory, arithmetic/logic
unit and input and output devices how to respond to a program's instructions.
It directs the operation of the other units by providing timing and control signals. Most
computer resources are managed by the CU. It directs the flow of data between the CPU
and the other devices. John von Neumann included the control unit as part of the von
Neumann architecture in modern computer designs; the control unit is typically an
internal part of the CPU with its overall role and operation unchanged since its
introduction
The block diagram of the control unit is shows. It consists of two decoders, a sequence
counter, and a number of control logic gates. An instruction read from memory is placed
in the instruction register (IR). The position of this register in the common bus system is
indicated. The instruction register is divided into three parts: the I bit, the operation code,
and bits 0 through 11. The operation code in bits 12 through 14 are decoded with a 3 x 8
decoder. The eight outputs of the decoder are designated by the symbols D 0 through D7.
The subscripted decimal number is equivalent to the binary value of the corresponding
operation code. Bit 15 of the instruction is transferred to a flip-flop designated by the
symbol I. Bits 0 through 11 are applied to the control logic gates. The 4-bit sequence
34
counter can count in binary from 0 through 15. The outputs of the counter are decoded
Page
The control unit is implemented using hardware (for example: NAND gates, flip-flops,
and counters).We need a special digital circuit that uses , as inputs, the bits from the
Opcode field in our instructions, bits from the flag (or status) register, signals from the
bus, and signals from the clock. It should produce, as outputs, the control signals to drive
the various components in the computer.
35
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
1.2. Microprogramming control unit:
Microprogramming is a second alternative for designing control unit of digital computer
(uses software for control). A control unit whose binary control variables are stored in
memory is called a microprogrammed control unit. The control variables at any given
time can be represented by a string of 1's and 0's called a control word (which can be
programmed to perform various operations on the component of the system). Each word
in control memory contains within it a microinstruction. The microinstruction specifies
one or more microoperatiotins for the system. A sequence of microinstructions
constitutes a microprogram. A memory that is part of a control unit is referred to as a
control memory.
The ―starting address generator ― block is responsible for loading the starting address of
the microprogram into the PC every time a new instruction is loaded in the IR.
Each microinstruction basically provides the required control signal at that time step. The
microprogram counter ensures that the control signal will be delivered to the various
parts of the CPU in correct sequence.
36
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
1.3 Difference between Hardwired Control Unit & Microprogrammed Control Unit
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
1. Control Memory,
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
2. Address Sequencing,
Microinstructions are stored in control memory in groups, with each group specifying
routine. Each computer instruction has its own microprogram routine in control memory
to generate the microoperations that execute the instruction. The hardware that controls
the address sequencing of the control memory must be capable of sequencing the
microinstructions within a routine and be able to branch from one routine to another.
Step-1
An initial address is loaded into the control address register when power turned on
in the computer.
This address is usually the address of the first microinstruction that activates the
instruction fetch routine.
Moreover, The fetch routine may sequence by incrementing the control address
register through the rest of its microinstructions.
Also,, At the end of the fetch routine, the instruction is in the instruction register of
the computer.
Step-2
The control memory next must go through the routine that determines the effective
address of the operand.
A machine instruction may have bits that specify various addressing modes, such
as indirect address and index registers.
Moreover, The effective address computation routine in control memory can reach
through a branch microinstruction, which conditioned on the status of the mode
bits of the instruction.
Also, When the effective address computation routine is completed, the address of
the operand is available in the memory address register.
Step-3
The next step is to generate the microoperations that execute the instruction
fetched from memory.
The microoperation steps to generate in processor registers depend on the
operation code part of the instruction.
Also, each instruction has its own microprogram routine stored in a given location
of the control memory.
Moreover, The transformation from the instruction code bits to an address in
control memory where the routine located referred to as a mapping
A mapping procedure is a rule that transforms the instruction code into a control
memory address.
39
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Step-4
Once the required routine reached, the microinstructions that execute the
instruction may sequence by incrementing the control address register.
Micro-programs that employ subroutines will require an external register for
storing the return address.
Return addresses cannot store in ROM because the unit has no writing capability.
Moreover, when the execution of the instruction completed, control must return to
the fetch routine.
This accomplished by executing an unconditional branch microinstruction to the
first address of the fetch routine.
40
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
3. Micro-instruction Format
For the control memory, the microinstruction format is as shown:
4. Micro operations:
For specification of seven different micro operations, the three bits in each field are
encoded.
We cannot specify two or more micro-operations that get conflicted
e.g. 010 001 000
Each micro-operation is defined with a register transfer statement and is assigned a
symbol for use in a symbolic micro program.
41
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The following table shows Symbols and Binary code for Micro-instruction Fields:
42
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5. Micro program sequencer,
Basic components of a microprogrammed control unit are control memory and the
circuits that select the next address. This address selection part is called a microprogram
sequencer. The purpose of microprogram sequencer is to load CAR so that
microinstruction may be read and executed. Commercial sequencers include within the
unit an internal register stack to store addresses during microprogram looping and
subroutine calls.
43
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Fig. microprogram sequencer for control memory
MUX1 selects address from one of four sources of and routes it into CAR.
MUX2 tests the value of selected status bit and result is applied to input logic
circuit.
Output of CAR provides the address for the control memory.
Input logic circuit has 3 inputs I0, I1 and T and 3 outputs S0, S1 and L. Variables
S0 and S1 select one of the source address for CAR. L enables load input of SBR.
e.g: when S1S0=10, MUX input number 2 is selected and establishes a transfer
path from SBR to CAR.
44
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6. Microprogramming,
Microprogramming is a technique to implement the control logic necessary to execute
instructions within a processor. It is based on the general idea of fetching low-level
microinstructions from a control store and deriving the appropriate control signals to be
active for a single clock cycle, as well as microprogram sequencing information, from
each microinstruction. Although hybrid techniques exist, microprogramming is generally
contrasted with hardwired implementation techniques.
Or
Microprogramming is a systematic technique for implementing the control logic of a
hardwired control circuitry. The central processing unit in a computer system is
composed of a data path and a control unit. Computer‘s central processing unit. It is a
form of stored-program logic that substitutes for
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The basic operations are implemented in hardware level. ALU is having collection of two
types of operations:
Arithmetic operations
Logical operations
To identify any one of these four logical operations or four arithmetic operations, two
control lines are needed. Also to identify the any one of these two groups- arithmetic or
logical, another control line is needed. So, with the help of three control lines, any one of
these eight operations can be identified.
Consider an ALU is having four arithmetic operations. Addition, subtraction,
multiplication and division. Also consider that the ALU is having four logical operations:
OR, AND, NOT & EX-OR.
We need three control lines to identify any one of these operations. The input
combination of these control lines are shown below:
Control lines C0 and C1 are used to identify any one of the four operations in a group.
One possible combination is given here.
C1 C0 Arithmetic C2 0 Logical C2 1
0 0 Addition OR
0 1 Subtraction AND
1 0 Multiplication NOT
1 1 Division EX-OR
A 3 8 decode is used is used to decode the instruction. The block diagram of the ALU is
shown in the figure.
The ALU has got two input registers named as A and B and one output storage register,
named as C. If performs the operation as:
C A or B
The input data are stored in A and B, and according to the operation specified in the
control lines, the ALU perform the operation and put the result in register C.
As for example, if the contents of controls lines are, 000, then the operation decoder
46
enables the addition operation and in terms it activates the adder circuit and the addition
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
operation is performed on the data that are available in storage register A and B. After the
completion of the operation, the result is stored in register C.
We should have some hardware implementations for basic operations. These basic
operations can be used to implement some complicated operations which are not feasible
to implement directly in hardware.
These are several logic gates exists in digital logic circuit. These logic gates can be used
to implement the logical operation. Some of the common logic gates are mentioned here.
AND gate: The output is high if both the 0-inputs are high.
OR gate: The output is high if any one of the input is high.
EX-OR gate: The output is high if either of the input is high.
If we want to construct a circuit which will perform the AND operation on two 4-bit
number, the implementation of the 4-bit AND operation is shown in the figure.
8. Design of ALU:
47
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
9. FPU
Stands for "Floating Point Unit." An FPU is a processor or part of a processor that
performs floating point calculations. While early FPUs were standalone processors, most
are now integrated inside a computer's CPU.
Even without an floating point unit, a CPU can handle both integer and floating point
(non-integer) calculations. However, integer operations use significantly different logic
than floating point operations, which makes it inefficient to use the same processor to
handle both types of operations. An FPU provides a faster way to handle calculations
with non-integer numbers.
Any mathematical operation, such as addition, subtraction, multiplication, or division can
be performed by either the integer processing unit or the FPU. When a CPU receives an
instruction, it automatically sends it to the corresponding processor. For example, 12 +
5 would be processed as an integer calculation, while 1.0023 x 5.789 would get sent to
the FPU. While it is possible for a programmer to write an instruction specifically for
either processing unit, it is usually unnecessary.
=======================
48
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Unit-III
Input Output Organization
1. I/O Subsystem:
Data transfer to and from peripherals may be handled in one of three possible modes:
a) Programmed I/O
b) Interrupt-initiated I/O
c) Direct memory access (DMA)
a) Programmed I/O
Programmed I/O (PIO) refers to data transfers initiated by a CPU under driver software
control to access registers or memory on a device.
The CPU issues a command then waits for I/O operations to be complete. As the CPU is
faster than the I/O module, the problem with programmed I/O is that the CPU has to wait
a long time for the I/O module of concern to be ready for either reception or transmission
of data. The CPU, while waiting, must repeatedly check the status of the I/O module, and
this process is known as Polling. As a result, the level of the performance of the entire
system is severely degraded.
Programmed I/O operations are the result of I/O instructions written in the computer
program. Each data item transfer is initiated by an instruction in the program. Usually,
the transfer is to and from a CPU register and peripheral. Other instructions are needed to
transfer the data to and from CPU and memory. Once a data transfer is initiated, the CPU
is required to monitor the interface to see when a transfer can again be made.
If the speed of an I/O device is in the right range, neither too fast for the processor to read
and write the signalling bits nor too slow for the processor to wait for its activity, this
form of signalling may be sufficient.
49
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
An example of data transfer from an I/O device through an interface into the CPU is
shown in Figure bellow.
By program
1. Read the status register.
2. Check the status of the flag bit and branch to step 1 if not set or to step 3 if set.
3. Read the data register.
The flag bit is then cleared to 0 by either the CPU or the interface, depending on how the
interface circuits are designed.
By interface
Once the flag is cleared, the interface disables the data accepted line and the device can
then transfer the Next data byte.
Each byte is read into a CPU register and then transferred to memory with a store
instruction. The programmed I/O method is particularly useful in small low-speed
computers or in systems that are dedicated to monitor a device continuously .The
difference in information transfer rate between the CPU and the I/O device makes this
type of transfer inefficient.
50
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
b) Interrupt-Initiated I/O
An alternative to the CPU constantly monitoring the flag is to let the interface inform the
computer when it is ready to transfer data. This mode of transfer uses the interrupt
facility. While the CPU is running a program it does not check the flag. However, when
the flag is set, the computer is momentarily interrupted from proceeding with the current
program and is informed of the fact that the
flag has been set. The CPU deviates from what it is doing to take care of the input or
output transfer. After the transfer is completed, the computer returns to the previous
program to continue what it was doing before the interrupt.
For each interrupt there is service routine, service routine address must be known by
CPU to branch to it.
The CPU issues commands to the I/O module then proceeds with its normal work until
interrupted by I/O device on completion of its work.
For input, the device interrupts the CPU when new data has arrived and is ready to be
retrieved by the system processor. The actual actions to perform depend on whether the
device uses I/O ports, memory mapping.
For output, the device delivers an interrupt either when it is ready to accept new data or
to acknowledge a successful data transfer. Memory-mapped and DMA-capable devices
usually generate interrupts to tell the system they are done with the buffer.
Although Interrupt relieves the CPU of having to wait for the devices, but it is still
inefficient in data transfer of large amount because the CPU has to transfer the data word
by word between I/O module and memory.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
c) Direct Memory Access (DMA)
The transfer of data between a fast storage device such as magnetic disk and memory is
often limited by the speed of the CPU. Removing the CPU from the path and letting the
peripheral device manage the memory buses directly would improve the speed of
transfer. This transfer technique is called direct memory access (DMA). During DMA
transfer, the CPU is idle and has no control of the memory buses. A DMA controller
takes over the buses to manage the transfer directly between the I/O device and memory.
The CPU may be placed in an idle state in a variety of ways. One common method
extensively used in microprocessors is to disable the buses through special control
signals. Figure (1) shows two control signals in the CPU that facilitate the DMA transfer.
The bus request (BR) input is used by the DMA controller to request the CPU to
relinquish control of the buses. The CPU activates the bus grant (BG) output to inform
the external DMA that the buses are in the high-impedance state. The DMA that
originated the bus request can now take control of the buses to conduct memory transfers
without processor intervention. When the DMA terminates the transfer, it disables the
bus request line. The CPU disables the bus grant, takes control of the buses, and returns
to its normal operation. When the DMA takes control of the bus system, it communicates
directly with the memory. The transfer can be made in several ways.
*In DMA burst transfer, a block sequence consisting of a number of memory words is
transferred in a continuous burst while the DMA controller is master of the memory
buses. This mode of transfer is needed for fast devices such as magnetic disks, where
data transmission cannot be stopped or slowed down until an entire block is transferred.
*An alternative technique called cycle stealing allows the DMA controller to transfer
one data word at a time, after which it must return control of the buses to the CPU. The
CPU merely delays its operation for one memory cycle to allow the direct memory I/O
transfer to "steal" one memory cycle.
52
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The DMA controller needs the usual circuits of an interface to communicate with the
CPU and I/O device. In addition, it needs an address register (contains an address to
specify the desired location in memory, the address register is incremented after each
word that is transferred to memory), a word count register (specifies the number of
words that must be transferred), a set of address lines, and control register. The address
register and address lines are used for direct communication with the memory.
The position of the DMA controller among the other components in a computer system is
illustrated in Figure (1). The CPU communicates with the DMA through the address and
data buses as with any interface unit. The DMA has its own address, which activates the
DS (DMA select) and RS (register select) lines.
When the peripheral device sends a DMA request, the DMA controller activates the BR
line, informing the CPU to relinquish the buses. The CPU responds with its BG line,
informing the DMA that its buses are disabled. The CPU initializes the DMA by sending
the following information through the data bus:
1. The starting address of the memory block where data are available (for read) or where
data are to be stored (for write)
2. The word count, which is the number of words in the memory block
3. Control to specify the mode of transfer such as read or write
4. A control to start the DMA transfer
The DMA then puts the current value of its address register into the address bus, initiates
the RD or WR Signal, and sends a DMA acknowledge to the peripheral device. Note the
RD and WR lines in the DMA Controllers are bidirectional. The direction of transfer
depends on the status of the BG line. When BG = 0, the RD and WR are input lines
allowing the CPU to communicate with the internal DMA registers. When BG = 1, the
RD and WR are output lines from the DMA controller to the random-access memory to
specify the read or write operation for the data.
When the peripheral device receives a DMA acknowledge, it puts a word in the data bus
(for write) or receives a word from the data bus (for read). Thus the DMA controls the
read or write operations and supplies the address for the memory. The peripheral unit can
then communicate with memory through the data bus for direct transfer between the two
units while the CPU is momentarily disabled.
For each word that is transferred, the DMA increments its address registers and
decrements its word count register. If the word count does not reach zero, the DMA
checks the request line coming from the peripheral. For a high-speed device, the line will
be active, as soon as the previous transfer is completed. A second transfer is then
initiated, and the process continues until the entire block is transferred. If the peripheral
speed is slower, the DMA request line may come somewhat later. In this case the DMA
disable the bus request line so that the CPU can continue to execute its program. When
the peripheral requests a transfer, the DMA requests the buses again.
53
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
If the word count register reaches zero, the DMA stops any further transfer and removes
its bus request. It also informs the CPU of the termination by means of an interrupt.
When the CPU responds to the interrupt, it reads the content of the word count register.
The zero value of this register indicates that all the words were transferred successfully.
DMA transfer is very useful in many applications. It is used for fast transfer of
information between magnetic disks and memory.
2. Interrupt structures,
Interrupt is signals send by an external device to the processor, to request the
processor to perform a particular task or work.
Mainly in the microprocessor based system the interrupts are used for data transfer
between the Peripheral and the microprocessor.
If there is any interrupt it accept the interrupt and send the INTA (active low) signal to
the peripheral.
The vectored address of particular interrupt is stored in program counter.
The processor executes an interrupt service routine (ISR) addressed in program
counter.
It returned to main program by RET instruction.
2.1.1 Hardware Interrupts: If the signal for the processor is from external device or
hardware is called hardware interrupts. Example: from keyboard we will press the key to
do some action this pressing of key in keyboard will generate a signal which is given to
the processor to do action, such interrupts are called hardware interrupts. Hardware
interrupts can be classified into two types they are
2. Non Maskable Interrupt: These Interrupt signals will be not ignored and given
attention all the time
2.1.2 Software Interrupts: Software interrupt can also divided in to two types. They are
1. Normal Interrupts: the interrupts which are caused by the software instructions are
called software instructions.
2. Exception: unplanned interrupts while executing a program is called Exception. For
example: while executing a program if we got a value which should be divided by
zero is called an exception.
54
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
3. I/O Interface
The I/O system provides an efficient mode of communication between the central
system and the outside environment.
Programs and data must be entered into computer memory for processing end
results obtained from computations must be displayed for the user. The most
familiar means of entering information into a computer is through a type writer-
like keyboard. On the other hand the central processing unit is an extremely fast
device capable of performing operations at very high speed.
To use a computer efficiently, a large amount of programs and data must be
prepared in advance and transmitted into a storage medium such as magnetic tapes
or disks. The information in the disk is then transferred into a high-speed storage,
such as disks.
Input or output devices attached to the computer are called the peripheral devices.
The most common peripherals are keyboards, display units and printers.
Peripherals that provide auxiliary storage for the system are magnetic disks and
tapes.
The two units such as CPU and I/O interface are designed independently of each other. If
the registers in the interface does not have a common clock (global clock) with the CPU
registers, then the transfer between the two units is said to be asynchronous.
The asynchronous data transfer requires the control signals that are being
transmitted between the communicating units to indicate the time at which data is
being transmitted.
55
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
a) Strobe Control
Strobe is a pulse signal supplied by one unit to another unit to indicate the time at
which data is being transmitted.
b) Handshaking
The disadvantage of the strobe method is that the source unit has no information
whether the destination unit has actually received the data item, if the source unit initiates
the transfer. But if the destination unit initiates the transfer it has no way of knowing
whether the source unit has actually placed the data on the bus. The handshake method
solves this problem.
The basic approach of handshaking is as follows. In handshaking method, there are
two control signals unlike strobe control method. One control signal is in the same
direction as the data flow in the bus from the source to the destination. This signal is used
to inform the destination unit whether there are valid data in the bus. The second control
signal is in the other direction from the destination to the source. It is used to inform the
source whether it can accept data.
56
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
4.1 Synchronous Data Transfer
In synchronous data transfer a global or shared clock is provided to both sender and
receiver. The sender and receiver work simultaneously.
5. I/O processor
The input/output processor or I/O processor is a processor that is separate from the main
processor or CPU designed to handle only input/output processes for a device or the
computer.
57
The concept of I/O processor is an extension of the concept of DMA. The I/O processor
can execute specialised I/O program residing in the memory without intervention of the
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
CPU. Thus, CPU only needs to specify a sequence of I/O activity to I/O processor. The
I/O processor then executes the necessary I/O instructions which are required for the
task; and interrupts the CPU only after the entire sequence of I/O activity as specified by
CPU have been completed. An advanced I/O processor can have its own memory,
enabling a large set of I/O devices to be controlled without much involvement from the
CPU. Thus, an I/O processor has the additional ability to execute I/O instructions which
provide it a complete control on I/O operations. Thus, I/O processors are much more
powerful than DMA which provides only a limited control of I/O device. For example, if
an I/O device is busy then DMA will only interrupt the CPU and will inform the CPU
again when the device is free while I/O device and once it has found to be free go ahead
with I/O and when I/O finishes, communicate it to the CPU. The I/O processor is termed
as channel in IMB machines.
In computer systems which have IOPs the CPU normally do not execute I/O data transfer
instructions. I/O instructions are stored in memory and are executed by IOPs. The IOP
can be provided with the direct access to the memory and can control the system bus. An
IOP can execute a sequence of data transfer instructions involving different memory
regions and different devices without intervention of the CPU.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Instruction: It is a command given to the microprocessor to perform given task on
specified data. Each instruction has two parts viz. task to be performed known as
operation code or opcode and second is the data to be operated upon known as operand.
The Operand can be used in many different ways e.g. 8 bit data or 16 bit data or internal
register or memory location or 8 bit or 16 bit address.
If the data byte is stored in the 32H which need to be moved in the accumulator then the
instruction can be written as follows: MVI A, 32H Hex code is : 3E 32H
59
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
8. Data Transfer
8.1 Serial / parallel
Serial versus Parallel Data Transfer
Information flows through the computer in many ways. The CPU is the central point for
most information. When you start a program, the CPU instructs the storage device to load
the program into RAM. When you create data and print it, the CPU instructs the printer
to output the data.
Because of the different types of devices that send and receive information, two major
types of data transfers take place within a computer: parallel and serial. These terms are
used frequently, but if you're not familiar with the differences between them, check out
Figure: Parallel data transfers move data 8 bits at a time, whereas serial data
transfers move 1 bit at a time.
Parallel transfers use multiple "lanes" for data and programs, and in keeping with the 8
bits = 1 byte nature of computer information, most parallel transfers use multiples of 8.
Parallel transfers take place between the following devices:
cards) are needed, leading to interference concerns and thick, expensive cables.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Excessively long parallel cables or traces can cause data to arrive at different
times. This is referred to as signal skew.
Figure : Parallel cables that are too long can cause signal skew, allowing the parallel signals to become "out
of step" with each other.
A serial transfer uses a single "lane" in the computer for information transfers. This
sounds like a recipe for slowdowns, but it all depends on how fast the speed limit is on
the "data highway."
The following ports and devices in the computer use serial transfers:
Very few connections are needed in the cable and ports (one transmit, one receive,
and a few control and ground wires).
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Cable lengths can be longer with serial devices. For example, an UltraDMA/66
ATA/IDE cable can be only 18 inches long for reliable data transmission, whereas
a Serial ATA cable can be almost twice as long.
Although RS-232 serial ports are slow, newer types of serial devices are as fast or faster
than parallel devices. The extra speed is possible because serial transfers don't have to
worry about interference or other problems caused by running so many data lines
together.
For more information about serial, parallel, USB, and IEEE-1394 ports, see Chapter 8,
"Input/Output Devices and Cables." For more information about RAM, see Chapter 7,
"RAM." For more information about ATA/IDE, Serial ATA, and SCSI,
In Synchronous Transmission, data flows in a full duplex mode in the form of blocks or
frames. Synchronization between the sender and receiver is necessary so that the sender
know where the new byte starts (since there is no gap between the data).
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
It is simple, fast, and economical and does not require a 2-way communication. Letters,
emails, forums, televisions and radios are some of the examples of Asynchronous
Transmission.
2. Synchronous Transmission requires a clock signal between the sender and receiver
so as to inform the receiver about the new byte. Whereas, in Asynchronous
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Transmission sender and receiver does not require a clock signal as the data sent
here has a parity bit attached to it which indicates the start of the new byte.
3. Data transfer rate of Asynchronous Transmission is slower than that of
Synchronous Transmission.
4. Asynchronous Transmission is simple and economic whereas, Synchronous
Transmission is complex and expensive.
5. Synchronous Transmission is efficient and has lower overhead as compared to the
Asynchronous Transmission.
In a simplex transmission mode, the communication between sender and receiver occur
only in one direction. That means only the sender can transmit the data, and receiver can
only receive the data. The receiver cannot reply in reverse to the sender. Simplex is like a
one-way road in which the traffic travels only in one direction, no vehicle from opposite
direction is allowed to enter. The entire channel capacity is only utilized by the sender.
You can better understand the simplex transmission mode with an example of keyboard
and monitor. The Keyboard can only transmit the input to the monitor, and the monitor
can only receive the input and display it on the screen. The monitor cannot transmit any
information back to the keyboard.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Half duplex can be understood with an example of walkie-talkies. As the speaker at both
the end of walkie-talkies can speak but they have to speak one by one. Both cannot speak
simultaneously.
In a full duplex transmission mode, the communication between sender and receiver
can occur simultaneously. Sender and receiver both can transmit and receive
simultaneously at the same time. The full duplex transmission mode is like a two way
road in which traffic can flow in both the direction at the same time. The entire capacity
of the channel is shared by both the transmitted signal traveling in opposite direction.
Sharing of the channel capacity can be achieved in two different ways. First, either you
physically separate the link in two parts one for sending and other for receiving. Second,
or you let the capacity of a channel to be shared by the two signals traveling in opposite
direction.
Full duplex can be understood best, with an example of a telephone. When two people
communicate over a telephone both are free to speak and listen at the same time.
65
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Key Differences Between Simplex, Half Duplex and Full Duplex
1. In a Simplex mode of transmission, the signal can be sent only in one direction;
hence, it is unidirectional. On the other hand, in half duplex, both the sender and
receiver can transmit the signal but, only one at a time, whereas, in full duplex, the
sender and receiver can transmit the signal simultaneously at the same time.
2. In a simplex mode of transmission, only one of the two devices on the link can
transmit the signal, and the other can only receive but cannot send back the signal
in reverse. In a half-duplex mode, both the devices connected on the link can
transmit the signal but only one device can transmit at a time. In a full-duplex
mode, both the device on the link can transmit simultaneously.
3. The performance of full duplex is better than half duplex and simplex because it
better utilizes the bandwidth, as compared to half duplex and simplex.
4. If we take the example of keyboard and monitor, it is observed that keyboard
inputs the command and monitor displays it, monitor never replies back to the
keyboard; hence, it is an example of the simplex transmission mode. In a walkie-
talkie, only one person can communicate at a time so; it represents an example of
half duplex mode of transmission. In a telephone, both the person on the either side
of a telephone can communicate parallelly at the same time; hence, it represents an
example of a full-duplex mode of transmission.
66
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
==========================
67
Page
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore