0% found this document useful (0 votes)
3 views12 pages

Coa Assignment

The document explains different types of ROMs, including Masked ROM, Programmable ROM, EPROM, EEPROM, and Flash ROM, highlighting their unique features and applications. It also discusses the advantages of semiconductor devices for data storage, such as non-volatility, high-speed operation, and low energy consumption. Additionally, it covers Interrupt Service Routines (ISRs), their characteristics, and the roles of linkers and loaders in program execution, along with a comparison of Ripple Carry Adders and Carry Lookahead Adders.

Uploaded by

shourishpaul417
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views12 pages

Coa Assignment

The document explains different types of ROMs, including Masked ROM, Programmable ROM, EPROM, EEPROM, and Flash ROM, highlighting their unique features and applications. It also discusses the advantages of semiconductor devices for data storage, such as non-volatility, high-speed operation, and low energy consumption. Additionally, it covers Interrupt Service Routines (ISRs), their characteristics, and the roles of linkers and loaders in program execution, along with a comparison of Ripple Carry Adders and Carry Lookahead Adders.

Uploaded by

shourishpaul417
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Q1.

Explain different types of ROMs


ROM is one of those types of non-volatile memory used in computers and other electronic
devices. It comes in the form of memory that does not lose data even if the power is turned
off. ROMs are usually used to store firmware, which is actually the absolutely necessary
software operating hardware parts. Here are some types of ROMs, each is made differently
and serves for different purposes. The main types include:

1. Masked ROM (MROM)


- Description: It is the original form of ROM, where data is permanently written during
manufacturing. It is "masked" since data is written into the chip via a specific mask during
chip creation.
- Features
- The data cannot be reprogrammed or rewritten after manufacturing
- Low cost in mass production.
- Used in applications where the data is not allowed to be altered, such as game cartridges
and embedded systems.

2. Programmable ROM (PROM)


- Description: PROM is a ROM, which can be programmed by the user after manufacture, but
only once. In a PROM chip is an array of fuses, which are selectively burnt to store the data.
- Features
- Programmable but not erasable.
- It acts as a normal ROM after programming.
- The situation where customisation is required once.

3. Erasable Programmable ROM (EPROM)

- Definition: EPROM has the ability to be erased by the application of high-intensity


ultraviolet (UV) light. Subsequently, it can be reprogrammed. The key advantage of this ROM
is greater than PROM as it has the capability of several programming cycles.
- Characteristics:

Data can be erased and reprogrammed multiple times.


- Requires to have a specific UV light for contents to be deleted.
-To be used in systems where firmware updates will be required often.

4. Electrically Erasable Programmable ROM (EEPROM

- Definition: EEPROM refers to a type of memory that is erased and reprogrammed through
an electric charge. On this account, EEPROM is said to be more friendly than the EPROM that
employs the use of UV light to delete its contents. Data are re-written thousands of times in
EEPROM.
- Characteristics:

- They can be erased and reprogrammed in-place, without removing the chip.
- They permit byte-level erasing, so they are more flexible.
- It is mainly used in today's computers and devices, enabling bios settings to be written into
the memory.

5. Flash ROM
- Description: Flash ROM is an EEPROM that erases and reprograms at the block level rather
than the byte level. It's faster and more efficient in rewriting large data blocks than
traditional EEPROMs. It's one of the most common components of portable mass storage
devices, for example, USB drives, SD cards, and SSDs.
- Features:
- High-speed read and write capabilities

- Applications are found in modern storage devices.


- Non-volatile; the data stays valid even if the power supply is cut off.

The type of ROM differs according to whether it's changeable and updatable, or not, and the
rate at which that could be required to be the case:.

Q2. Explain the advantages of semiconductor devices for storing data


Because of the many advantages it offers in comparison to other conventional methods of
storing, semiconductor devices have become very widely used in contemporary computing
systems for data storage. Here are some of the key advantages of semiconductor-based data
storage:

1. Non-Volatility (in some types)


Definition: Many semiconductor memory devices, like EEPROM and Flash memory, maintain
their data even when the power supply is switched off.
Benefit: This non-volatility is important when certain applications are concerned with
persistent data storage, independent of constantly available power, such as in BIOS chips,
USB drives or SSDs.
2. High-Speed Operation
Definition: Semiconductor memories particularly RAM (Random Access Memory) provide
extremely rapid read and write times compared to mechanical storage devices (like hard disk
drives).
Advantage: The rapid access to information allows the computers and other electronic
devices to execute operations accurately, complete operations quickly and deliver
performance such as information processing, gaming, or multi-tasking,
3. Portability and Density
This refers to the fact that the semiconductor memory devices can store a large amount of
data in a very small form factor due to advance in miniaturization and integrated circuit
technologies.
Advantage: This allows modern devices to be thin, lightweight, and portable but yet packed
with plentiful storage like in smartphones, laptops, and even tablets.
4. Low Energy Consumption
Definition: Semiconductor memory devices have a significantly lower energy consumption
than their counterparts in mechanical storage technologies, including static RAM (SRAM)
and Flash memory.
Advantage: These can have a lower power consumption in the use in battery-powered as
well as mobile devices, which further supports the battery's life.
5. Robustness and Reliability

Definition: Because semiconductor memory does not contain moving parts, unlike hard
drives (HDDs), it is extremely more resistant to physical shock, drop, or vibration.
Advantage: This stretches the lifespan of products, such as SSDs and USB drives, and they
are therefore more reliable in rugged environments.
6. Scalability and Flexibility
Definition: Semiconductor devices have been scaled up on capacity from gigabytes all the
way to terabytes using the advancement of fabrication technologies.
Advantage: This flexibility makes them very useful for virtually any application, from the
smallest embedded system to the busiest of servers.
7. Low Latency
Definition: Of course, semiconductor devices, specifically memory, have extremely low
latency, or it takes very little time between the point where data is requested and when it is
provided.
Advantage: This would be highly important in real-time computing applications that require
almost immediate access to data, such as graphics rendering or database management.
8. Easy Integration with Modern Technologies
Definition: Semiconductor memories are integrated much easier in modern computing
systems because they interface quite well with digital circuitry and with interfaces such as
PCIe, NVMe, and SATA.
Benefit: This allows communications between the memory and the CPU or other processing
units to take place smoothly, making the whole system perform better .
9. Programmability
Definition: Some semiconductor devices like PROM, EPROM, and EEPROM can be
programmed, erased, and rewritten by the user.
Benefit: This flexibility in reprogramming is useful for firmware updates, embedded systems,
and system debugging.

10. Cost-Effectiveness
Definition: With the continuous advancement in semiconductor manufacturing processes
like CMOS (Complementary Metal-Oxide-Semiconductor), the cost per bit of memory has
decreased significantly over time.

Benefit: This reduction in cost allows high-capacity storage devices to become more
affordable for consumers and businesses alike.

Q3. Explain Interrupt Service Routines


ISR, or Interrupt Handler, is a special function inside computer systems that is designed to be
automatically called in response to an interrupt signal. An interrupt refers to an event
temporarily stopping the normal flow of a program so that the CPU can shift focus on higher
priority tasks; for example, hardware events.

Important Terms of Interrupt Service Routines (ISRs):

1. Interrupts and Their Types

Interrupt: It is a hardware or software -generated signal, which tells the CPU to attend to
something right away. Thus, it stops whatever the CPU was doing and executes the ISR.
Types of Interrupts
Hardware Interrupt: It is issued by an external device, which comprise keyboard, mouse,
timer, and I/O devices to let the CPU know that service is required.
Software Interrupt: These are issued by the software programs to request some services
provided by the operating system. System calls fall in this category.
Exceptions: Traps generated inside the CPU itself (for instance, due to zero, invalid memory
access).
2. Use of ISR's
ISR will handle the interrupt by executing suitable code and then returns control to the
interrupted program. For example, when you press a key on your keyboard, then a hardware
interrupt gets raised; ISR takes care of that key press.
Example: In a printer, an ISR might consider an interrupt when the printer buffer is empty
and waits for the CPU to provide it with the required data.
3. Execution Flow of an ISR

Interrupt Occurrence: At the time of occurrence of an interrupt, the CPU suspends the
currently running program temporarily and preserves its context-the instruction at which it
was currently operating plus the register contents-in order to resume from that point later
on.
ISR Execution: The correct ISR is chosen by the CPU based on the interrupt type to be
executed. The ISR deals with the specific requirement generated by the interrupt.
Restore and Resume: Once the interrupt has been satisfied, the ISR completes its action,
restores the saved state of the CPU and returns control back to the interrupted program,
taking off from where it left.
4. ISR Characteristics
Fast Execution: ISRs must execute as fast as possible since they interrupt other processes.
Long time execution of ISR can degrade the performance of the system.

Non-Returnable: ISRs do not return any value as against normal functions. Instead, after the
interrupt has been processed they just resume the interrupted process.
Atomicity: ISRs should not use any function or code which may interrupt the ISR also. So, it
often uses atomic operations so that interrupts do not arise again.
Non-blocking: ISRs should not perform expensive operations like memory allocation or I/O
operations. Instead, they pass on the longer operations to the main program or another
separate thread.
5. Interrupt Vector Table (IVT)
The Interrupt Vector Table is an address table which holds the ISR addresses. Every type of
interrupt has a unique vector, or place, in this table. Each vector holds the address of
memory containing the corresponding ISR. Whensoever an interrupt occurs, it refers to this
table to identify and locate the correct ISR.
6. Nested Interrupts
Some systems support nested interrupts in which a high-priority interrupt may preempt an
ISR that is already in service. The CPU will finish the higher-priority ISR before continuing
with the lower-priority one. Nested interrupts require careful saving and restoration of
multiple states
ISR Example Scenario:
Suppose you are typing on a keyboard. You tap on keys on the keyboard. Each key bash
generates a hardware interrupt. What is processed is shown below:

The keyboard sends a signal to the CPU that will indicate a key has been pressed.
The CPU stops whatever it is doing, saves its state, and then checks the Interrupt Vector
Table for the address of the ISR associated with the keyboard interrupt.
The ISR that corresponds to this keyboard interrupt performs its task. It processes the key
press; it stores keystroke information in memory or an input buffer.
When the ISR finishes executing, the CPU restores its previous state and continues executing
normally.
7. Common applications of ISRs
Management of equipment peripherals: The primary application of ISRs is in controlling
equipment peripherals like keyboard, mouse, printers, and storage devices. For example,
whenever the mouse is used, an interrupt is sent to the CPU to update the cursor's position
on the screen.
Real-time Systems: In devices such as embedded appliances, the functions which are time-
critical in nature are handled by ISRs such as data from sensors reading or control of motors.
Communication Protocols: ISRs help in controlling device-to-device communications for
instance, packet-based network data is received and transmitted in routers
Advantages of Interrupt Service Routines:
Event Management: ISRs let top-level functions like hardware events to be executed without
interference due to what the CPU may be doing at present.
Resource Utilization: Interrupts and ISRs prevent the CPU from becoming a polling device,
which keeps it out of idle time, thus using resources properly.
Modularity: ISRs can be designed for various types of interrupts, which will ensure the
modularity of code design.
Q4. What is the difference between linker and loader?

The linker and loader are some of the most important components used in converting the
source code into an executable program. Although both seem to be part of the same
building flow for a program, each component performs a different function.

1. Linker
A linker is a utility that links together multiple object files, resulting from the compilation
process, to create an executable or a library file. It solves all references between different
object files and thus links each external symbol, including function calls and global variables.

Important Functions of the Linker


Linking Object Files: The linker links several object files, which another program compiles
into one executable file.
Symbol Resolution: It resolves symbolic references like calls to functions, or references to
variables in one object file with respect to another. For instance, if one object file made use
of a reference to a function defined in another object file, the linker resolves this to yield an
appropriate address.
Library Linking: It links any required external libraries that have been specified to be linked
into the program. These could be standard libraries provided by the vendor or user defined,
for example, libc.
Relocation: The linker determines the ultimate memory addresses to which the code and the
data have to be relocated. It changes the addresses of function call and data references in
the program accordingly.
Static Linking: In static linking, the library code is incorporated directly by the linker into the
executable file. This means that the whole program, along with all its dependencies, is
within one executable.
Advantage: No need for external libraries at runtime.
Disadvantage: Executable size is larger.
Dynamic Linking: In dynamic linking the external libraries are not included into the
executable file itself, but they are at runtime.
Advantages : Smaller executable size and libraries can be shared between applications
Disadvantages : Requires external libraries to be present at the time of execution .
Linker Example Usage:
In case you write a program that uses functions from multiple source files, for example,
main.c, utilities.c, and math.c, the compiler produces object files: main.o, utilities.o, and
math.o, which are then combined by the linker into an executable of one file, resolving any
cross-references of the objects.
2. Loader
The loader is a part of the operating system, and its main function to load the executable file
into a memory area for execution. After the program loading is done, it shifts the control to
the program, and there executions of that particular program would start.

Key duties of loader


Loading the program: This loader provides space for the code and data of the program in
system's random access memory. The loader then places the program under the memory.
Relocation: The loader does dynamic relocation in case it is necessary; that is, it modifies the
program's addresses so they map into the memory addresses issued by the operating system
correctly.
Dynamic Linking (if required): The loader finds out which libraries are needed during the
program execution and links them to the program. For instance, shared libraries are loaded
into memory, and real references from the program are linked to the proper addresses in the
loaded library.
Program Execution Once the program is loaded and all linking is done, the loader transfers
control to the entry point of the program (usually the main() function).
Example of Loader Use:
Each time you run a program, the loader loads its executable from the disk into memory,
links any required shared libraries (if the program is dynamically linked), and then starts the
execution of the program.

Q5. Explain ripple carry adder and CLA(carry lookahead) adder (With
diagram)
1. Ripple Carry Adder (RCA)

A Ripple Carry Adder (RCA) is a type of digital adder used to perform the addition of two
binary numbers. It is constructed using a series of full adders connected in a cascade. The
carry output from each full adder is connected to the carry input of the next full adder in the
sequence, allowing carries to "ripple" through the chain.
Structure of Ripple Carry Adder:

• Each full adder takes in three inputs:


o Two bits (from the two numbers being added) and a carry from the previous
stage.
o The output consists of a sum bit and a carry-out bit.
• The carry-out from one adder is passed as a carry-in to the next adder, leading to the
name "ripple carry."

• FA stands for Full Adder.


• For an n-bit ripple carry adder, there are n full adders.
Operation:
• The bits of the two binary numbers are added starting from the least significant bit
(LSB).

• The carry output from each full adder is "rippled" or propagated to the next full
adder in sequence.

• The final result (sum) is obtained once the process is complete.


Advantage:
• Simple Design: RCAs are easy to implement using basic full adders.
Disadvantages:
• Slow Carry Propagation: Since the carry must propagate through each full adder, the
more bits there are, the slower the overall operation becomes.
• Worst-Case Delay: The delay is proportional to the number of bits (O(n)), making it
inefficient for large bit-width additions.

2. Carry Lookahead Adder (CLA)


A Carry Lookahead Adder (CLA) is designed to overcome the propagation delay issue of the
Ripple Carry Adder by using more complex logic to "look ahead" and predict the carry for
each bit position, rather than waiting for the carry to ripple through each full adder.

Structure of Carry Lookahead Adder:


• The CLA improves speed by calculating whether a particular bit position will generate
a carry or propagate a carry from a previous bit position.
• The two key concepts in CLA are:
o Generate (G): A bit position generates a carry if both input bits are 1.
Gi=Ai⋅BiG_i = A_i \cdot B_iGi=Ai⋅Bi
o Propagate (P): A bit position propagates a carry if one of the input bits is 1.
Pi=Ai⊕BiP_i = A_i \oplus B_iPi=Ai⊕Bi
Carry Lookahead Logic:

The carry for each stage is calculated based on the generate and propagate signals:
• Ci+1=Gi+(Pi⋅Ci)C_{i+1} = G_i + (P_i \cdot C_i)Ci+1=Gi+(Pi⋅Ci)
The sum can be calculated as:
• Si=Pi⊕CiS_i = P_i \oplus C_iSi=Pi⊕Ci
Steps Involved:

1. Generate and Propagate Signals:


o Compute Gi and Pi for each bit position.
2. Carry Lookahead Calculation:
o Compute the carry for each bit using the carry lookahead equation.
3. Sum Calculation:

o Calculate the sum for each bit using the propagate signals and the
corresponding carry.

Advantage:
• Faster Addition: The CLA can compute the carry for all bits in parallel, drastically
reducing the propagation delay (O(log n) time complexity).
Disadvantage:
• Complex Design: The CLA has more complex circuitry compared to the ripple carry
adder, especially for large numbers of bits.
Q6. Comparison between 8085 and 8086 microprocessor
Here’s a comparison between the 8085 and 8086 microprocessors in key points:

Architecture
• Data Bus Width:
o 8085: 8-bit
o 8086: 16-bit
• Address Bus Width:

o 8085: 16-bit (64 KB memory addressing)


o 8086: 20-bit (1 MB memory addressing)
• Registers:
o 8085: 8-bit general-purpose registers (B, C, D, E, H, L)
o 8086: 16-bit general-purpose registers (AX, BX, CX, DX, SI, DI, BP, SP)

Performance
• Clock Speed:
o 8085: Typically 3 MHz
o 8086: Typically 5 to 10 MHz
• Instruction Set:

o 8085: Simpler with 74 instructions


o 8086: More complex with 133 instructions
Memory Addressing
• Addressing Modes:
o 8085: 5 modes (Direct, Immediate, Indirect, Register, Implicit)

o 8086: 7 modes (Immediate, Direct, Indirect, Register, Based, Indexed,


Relative)

• Segmentation:
o 8085: No segmentation
o 8086: Supports memory segmentation (CS, DS, SS, ES)
Interrupts
• Number of Interrupts:
o 8085: 5 hardware interrupts
o 8086: 256 vectored interrupts

Execution Units
• Bus Width:
o 8085: 8-bit data bus
o 8086: 16-bit data bus and 20-bit address bus
• Execution Unit:

o 8085: Single execution unit


o 8086: Separate Execution Unit (EU) and Bus Interface Unit (BIU)
Pipelining
• Pipelining:
o 8085: No pipelining

o 8086: Yes, allows instruction prefetching for faster execution


Power Consumption
• Power Consumption:
o 8085: Lower power consumption
o 8086: Higher power consumption

Applications
• Usage:
o 8085: Suitable for simpler applications and embedded systems
o 8086: Used in more complex computing systems, including personal
computers
This comparison highlights the key differences in functionality, architecture, and application
between the two microprocessors.

You might also like