Professional Documents
Culture Documents
sor and
Microproces
Q1. What is microprocessor? What are the fundamental blocks of the
sor
microprocessor?
Developmen
Ans.
Microprocessor is a program controlled semiconductor device (IC) which
fetches,
decode and execute instructions. In the world of personal computers the terms
t System
microprocessors and CPUs are used interchangeably.
Along with CPU a microprocessor chip contains certain set of registers (called the
memory unit) along with the bus interfaces.
The basic units or blocks of a microprocessor are ALU, CU, Registers, Bus Interface
and Interfacing ports.
Arithmetic and Logic Unit (ALU): ALU performs all arithmetic and logic operations
on data. These operations may include addition, subtraction, increment, decrement
etc. and logical operations like and, or, xor etc.
Control Unit (CU): Thing CU basically performs two tasks(i) Instruction Interpretation: It reads instruction from memory using PC, recognizes
instruction types, get necessary operands and routes them to appropriate functional
units. Then necessary signals are issued to perform desired operations.
Array of registers: There are several general purpose registers to store data or address
for processing. Some special purpose registers are also present to facilitate processing
of specific addresses and data.
Bus Interface: Buses are used to carry address, data and control signals to and from
the microprocessor. Buses are high speed communication channels.
I/O Interfaces: The microprocessor needs to take input from the outside world through
input devices and display the processed result to the users through output devices.
Year
1971
1976
1982
1985
1989
1993
1997
2000
2001
Speed of Operation
750 KHz
3.07 MHz
5-10 MHz
6-12 MHz, 20-33 MHz
25-100 MHz
60-200 MHz
230-400 MHz
1.3GHz, 1.5GHz
2-3 GHz
Bits
4 bit
8 bit
16 bit
16 bit
32 bit
32 bit
32 bit
32 bit
32bit/64bit
Memory
1 Kb
64 Kb
1 Mb
16 Mb
4 Gb
4-6 Gb
4-6 Gb
4-6 Gb
4-12 Gb
Main memory: The main memory is also called the semiconductor memory. They are
classified as:
(i) ROM (Read Only Memory) - We cannot write data in this memory. It is nonvolatile memory i.e. it can hold data even if power is turned off. Generally ROM is
used to store the information that doesn't change. There are 4 types of ROMs:
a> Masked ROM - A diode ROM consists of only diodes and a decoder. Nowadays
ROMs use MOS technology instead of diode. Here, diodes and pull up resistors are
replaced by MOS transistors. In IC a thin metallized layer connects the gates of some
transistors to row select lines depending on data to be stored in ROM. Once the
pattern or mask is decided it is possible to make thousands of such ROMs. Such
ROMs are called Mask-Programmed ROMs. Masked ROMs are used in
microprocessor based toys, TV games, home computers etc.
b> PROM (Programmable Read Only Memory) - It has diode in every bit position
therefore the output is initially all 0s. Each diode however has a fusible link in series
in series with it. By addressing bit and applying proper current pulse at the
corresponding o/p, we can blow out the fuse, storing logic 1 at that bit position. For
blowing the fuse it is necessary to pass around 20 to 50 mA of current for period 5 to
c> EPROM (Erasable Programmable ROM) - EPROM uses MOS circuitry. They
stores 1s and 0s as a packet of charge in a buried layer of the IC chip. We can erase
the stored data in the EPROMs by exposing the chip to ultraviolet light through its
quartz window for 15 to 20 minutes. It is not possible to erase selective information,
when erased the entire information is lost. The chip can be reprogrammed. It is ideally
suitable for product development, experimental projects and college labs. When
erased each cell in the EPROM contains 1. Data is introduced by selectively
programming 0s into the desired bit locations.
d> EEPROM (Electrically EPROM) - EEPROM also uses MOS circuitry very similar
to that of EPROM. Data is stored as charge or no charge on an insulated layer or an
insulated floating gate in the device. The insulating layer is made very thin. Therefore,
a voltage as low as 20 to 25 V can be used to move charges across the thin barrier in
either direction for programming or erasing. It allows selective erasing at the register
level rather than erasing all the information since the information can be changed by
using electrical signals. It also has a special chip erase mode by which entire chip can
be erased in 10 milliseconds. However, EEPROMs are most expensive and the least
dense ROMs.
(ii)RAM (Random Access Memory) - Unlike ROM, we can read from or write into
the RAM, so it is often called read/write memory. The data that are to be processed by
the computer change frequently. These data must be stored in type of memory from
which they can be read by the microprocessor, modified through processing and
written back for storage. For this reason they are stored in RAM instead of ROM. But
it is a volatile memory, i.e. it cannot hold data when power is turned off.
There are two types of RAMs-
a> Static RAM - Memories that consists of circuits capable of retaining their state as
long as power is applied are known as static memories. These are Random Access
Memories and hence combinly called Static RAM memories. Memory cells are
organized in the form of an array, in which each cell is capable of storing one bit of
information.
b> Dynamic RAM - Dynamic RAM stores the data as a charge on the capacitor. A
DRAM contains thousands of such memory cells. Since only a single MOSFET and
capacitor are needed, the dynamic RAM contains more memory cells as compared to
static RAM per unit area. The disadvantage of dynamic RAM is that it needs
refreshing of on the capacitor after every few milliseconds.
5. Cost is more.
Dynamic Ram
1. DRAM contains more memory cells as
compared to SRAM per unit area.
2. Its access time is greater than static
RAM.
3. DRAM stores the data as a charge on
the capacitor. It consists of MOSFET and
the capacitor for each cell.
4. Refreshing circuitry is required to
maintain the charge on the capacitors
after every few milliseconds.
5. Cost is less.
Q7. Explain register. What are shift registers and their types?
Ans. Register- A group of flip-flops can be used to store a word, which is called
register. A flip-flop can store 1-bit information. So an n-bit register has a group of n
flip-flops and is capable of storing any binary information/number containing n-bits.
Shift Register- The binary information in a register can be moved from stage to stage
within the register or into or out of the register upon application of clock pulses. This
type of movement or shifting is essential for certain arithmetic and logic operations
used in microprocessors. This gives rise to a group of registers called 'shift registers'.
The basic types of shift registers in terms of data movement are as follows:
1. Serial Input Serial Output
Data can be loaded into register by shift right serial operation in 4 clock cycles. It is
then made available simultaneously at the output.
3. Parallel Input Serial Output
All inputs can be loaded simultaneously. However, output is available on serial output
bit by bit.
4. Parallel Input Parallel Output
All input can be loaded simultaneously and register data is also available at the output
simultaneously.
Hard Disk Memory: It is a magnetic memory and most common secondary storage
device. Nowadays we are having removable hard disks. It consists of stack of
magnetic disks. A magnetic disk is a thin, circular metal plate. It is coated with a thin
magnetic film, usually on both sides. Digital information is stored on the magnetic
disk by magnetizing the magnetic surface in a particular direction. The disks are
mounted on a rotary drive so that the magnetized surface moves in close proximity to
magnetizing coil or head.
Floppy Disk Memory: Floppy disks are smaller, simpler and cheaper disk units that
consist of flexible, removable, plastic diskettes coated with magnetic material. The
diskette is enclosed in a plastic jacket, which has an opening where the head makes
contact with the diskette.
Nowadays floppy disks are not in use because of arrival of flash drives that are much
faster and have greater capacity than the floppy disks.
Magnetic Tapes: It is one of the most popular storage medium for large data that are
sequentially accessed and processed. The tape is formed by depositing magnetic film
on a very thin plastic tape. Like audio tape, computer tape can be erased and reused
indefinitely. Old data on a tape are automatically erased as new data are recorded in
the same area.
Q10. Explain the concept of virtual memory.
Ans. In most modern computers, the physical main memory is not as large as the
address space spanned by an address issued by the processor. Here, the virtual
memory technique is used to extend the apparent size of the physical memory. It uses
secondary storage such as disks, to extend the apparent size of the physical memory.
When a program does not completely fit into the main memory, it is divided into
segments. The segments which are currently being executed are kept in the main
memory and remaining segments are stored in the secondary storage devices, such as
a magnetic disk. If an executing program needs a segment which is not currently in
the main memory, the required segment is copied from the secondary storage device.
When a new segment of a program is to be copied into a main memory, it must
replace another segment already in the memory. The addresses that processor issues to
access either instruction or data are called virtual addresses. These addresses are
translated into physical addresses by a combination of hardware and software
components.
The memory management unit controls the virtual memory system. It translates
virtual addresses into physical addresses. A simple method for translating virtual
addresses into physical addresses is to assume that all programs and data are
composed of fixed length unit called pages.
Address Translation: In virtual memory, the address is broken into a virtual page no.
and a page offset. The physical page no. constitutes the upper portion of the physical
address, while the page offset, which is not changed, constitutes the lower portion.
The page table is used to keep the information about the main memory location of
each page. To obtain the address of the corresponding entry in the page table the
virtual page number is added with the contents of page table base register, in which
the starting address of the page table is stored. The entry in the page table gives the
physical page no., in which offset is added to get the physical address of the main
memory.
If the page required by the processor is not in the main memory, the page fault
occours and the required page is loaded into the main memory from the secondary
storage memory by special routine called page fault routine. This technique of getting
the desired page in the main memory is called demand paging.
To avoid access time a small portion of the page table is accommodated in the
memory management unit. This portion is called Translation Lookaside Buffer (TLB).
Q11. What is bus? What are its types?
Ans. A microprocessor communicates with memory and I/O devices with a common
communication path called bus. A bus is basically a collection of wires which transmit
binary nos., 1 bit per wire. There are three types of busses:
1. Address Bus: The address bus consists of 16, 20, 24, or 32 parallel signal lines. On
these lines the CPU sends out the address of the memory location that is to be written
to or read from. The number of memory locations that the CPU can address is
determined by the number of address lines. If the CPU has N address lines, then it can
directly address 2^N memory locations.
2. Data Bus: The data bus consists of 8, 16, or 32 parallel signal lines. The
microprocessor has to fetch (read) the data from memory or input device for
processing and after processing, it has to store (write) the data to memory or output
device. Hence data bus is bidirectional.
3. Control Bus: The control bus consists of 4 to 10 parallel signal lines. The CPU
sends out signals on the control bus to enable the outputs of addressed memory
devices or port devices. Typical control bus signals are Memory Read, Memory Write,
I/O Read, and l/O Write.
Q12. What are I/O ports? What are programmable and non-programmable
ports?
Ans. An input device is connected to the microprocessor through an input port. An
input device unloads data into the port. An input port is a place for unloading data.
The microprocessor reads from the input port. Thus data are transferred from the input
device to the accumulator via input port. Similarly an output device is connected to
the microprocessor through an output port. The microprocessor unloads data into an
output port. As the output port is connected to the output device, data are transferred
to the output device.
2. Memory mapped I/O: In this scheme the devices are viewed as memory locations
and are addressed likewise. All the available address lines are used for address
decoding.
Q14. What are various schemes of data transfer from CPU/memory to I/O
devices and vice versa?
Ans. In I/O data transfer, the system requires the transfer of data between I/O devices
and microprocessor using I/O interface. It uses various techniques to perform I/O
operations.
These are:
1. Program Controlled I/O or Programmed I/O or Polled I/O
The I/O operation will cause a data transfer between an I/O device and memory or
between an I/O device and the processor. If in any computer system I/O operations are
completely controlled by the processor then that system is said to be using
Programmed I/O. It is the responsibility of the processor to periodically check the
status of the I/O system until it finds that the operation is complete.
The processor has to check each I/O device in sequence an in effect ask each one if it
needs communication with the processor, this is called polling. The polling decreases
the system throughput.
2. Interrupt Driven I/O
In this scheme external asynchronous input is used to tell the processor that I/O device
needs its service and hence processor does not have to check whether I/O device
needs its service or not. The processor is allowed to execute its instructions in
sequence and only stop to service I/O device when it is told to do so by the device
itself. This increases system throughput. When the I/O device becomes ready to
transfer data, it sends a signal to microprocessor through interrupt line. On receiving
an interrupt the microprocessor completes the current instruction at hand and then
attends the I/O device. It saves the contents of the program counter on the stack first
and then takes up the subroutine. After completing the data transfer the
microprocessor returns back to the main program it was executing before the interrupt
occoured.
Q15. What is tri- state logic? Why tri state logic is needed in microprocessor
system?
Ans. In tri-state logic, three logic levels are used and they are High, Low, and High
impedance state. The High and Low are normal logic levels and high impedance state
is electrical open circuit condition.
In microprocessor system all devices are connected to a common (System) bus. But
communication takes place between the master (microprocessor) and one slave
(peripheral) at any time instant. During this time instant, all other devices should be
isolated from the bus. Therefore, normally all the slaves (peripherals) will remain in
high impedance state (in electrical isolation) the master will select a slave by sending
address and chip select signal. When the slave is selected, it comes to normal logic
and it communicates with master.