DCF SUMMARIZED theory NOTES_suyash yadav

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

DCF NOTES:

Unit 3:
1. micro processor based systems:
Microcomputers are limited resource microprocessor-based systems found in
various electronic devices, radars, satellites, and flights. Rapid advancements in
the electronic industry have led to cost reduction and increased application of
microprocessors.

Bit: A bit is a single binary digit.

System Bus: The system bus is a group of wires/lines used for communication
between the microprocessor and peripherals.

Memory Word: The number of bits that can be stored in a register or memory
element is called a memory word.

Address Bus: carries unique binary patterns for memory locations or I/O ports,
with eight lines addressing 28 = 256 locations in hexadecimal format.

Data bus: transfers data between memory and processor or I/O devices, with 8-
bit processors having 8-bit data buses and 16-bit processors having 16-bit data
buses.

Control bus: transmits control signals, including those for selecting memory or I/O
devices, directing data transfer, and synchronizing data transfer for slow devices.

2. 8085 MICROPROCESSOR ARCHITECTURE:

The 8085 microprocessor is an 8-bit processor with a 40-pin IC package, a


maximum frequency of 3 MHz, and 64 KB of memory.

Arithmetic and Logic Unit (ALU):


performs numerical and logical operations using data from memory and the
Accumulator. The 8085 has six registers, one accumulator, and one flag register,
as well as two 16-bit registers: stack pointer and program counter. These
registers store 8-bit data and can be combined for 16-bit operations.
The accumulator:
is an 8-bit register in ALU, stores data and performs arithmetic and logical
operations, storing the result of an operation.

Flag register:
The ALU has five flip-flops called Zero (Z), Carry (CY), Sign (S), Parity (P), and
Auxiliary Carry (AC) flags. These flags are used to test data conditions in the
accumulator and other registers. For example, if the result in the accumulator is
larger than 8-bit, the CY flag is set to 1. The AC flag is set to 1 when a carry
result passes to bit D4.

The Program Counter (PC):


is a 16-bit register in a microprocessor that sequences instructions by pointing to
the memory address for the next byte, incrementing it automatically as needed.

The stack pointer:


is a 16-bit register that points to a memory location in R/W memory, starting with
a 16-bit address.

Control Unit:
Generates signals on data bus, address bus and control bus within
microprocessor to carry out the instruction, which has been decoded.

The Data Bus:


is a bidirectional system that transmits binary data between a microprocessor
and external units like memory. It is bidirectional and has a width of 8-bit,
typically identifying D0 - D7. The size of the bus determines the arithmetic
capabilities, as larger numbers require breaking down into smaller chunks, which
can slow microprocessors.

The address bus:


is a one-way communication between microprocessors and memory or other
devices, typically containing 16-bit lines (A0 - A15) with unidirectional higher
order lines and bidirectional lower order lines multiplexed with eight data bits (D0
- D7).
Control buses:
are lines used to coordinate and control microprocessor operations. They carry
unidirectional and bidirectional control signals. The 8085 processor uses ALE
(Application Latch Enable), RD (Read signal), WR (Write signal), IO/M (Output)
to distinguish between memory and I/O operations, and S1 and S0 (Output) to
specify the type of operation being performed.

3. Interfacing 8085 Microprocessor:


The microprocessor uses memory to read instruction codes and data, requiring
signals to read and write to registers, ensuring proper circuit design through
proper interfacing processes.

Memory interfacing:
The microprocessor accesses memory for reading instruction codes and data,
requiring signals to read and write to registers. The interfacing process should
match memory requirements and microprocessor signals, ensuring proper circuit
design.

I/O interfacing:
I/O interfacing involves connecting communication devices like keyboards, mice,
and printers to a microprocessor using latches and buffers.

Diagram:

8085 Interfacing Pins


Following is the list of 8085 pins used for interfacing with other devices −
● A15 - A8 (Higher Address Bus)
● AD7 - AD0(Lower Address/Data Bus)
● ALE
● RD
● WR
● READY
4.Ways of Communication − Microprocessor with the Outside
World?

Microprocessors can communicate with the outside world through two methods:
Serial Communication Interface
Parallel Communication Interface.
Serial communication :
involves sending a single byte of data serially.
Parallel Communication Interface :
sends data bit by bit simultaneously or parallelly to other systems. Both methods allow
for efficient communication between microprocessors and external systems.

UNIT 2

1.Introduction to computer components.

Computer memory is a physical device used to store data, information, or instructions


temporarily or permanently. It consists of storage units called cells, each with a unique
address ranging from 0 to memory size minus one. For example, a 64k word computer
memory has 64 * 1024 = 65536 cells, with addresses ranging from 0 to 65535.

2.what is Primary or Main Memory?

Primary memory, also known as the main memory in a computer system,


communicates directly with the CPU, Auxiliary memory, and cache memory. It stores
programs or data when the processor is active, loading instructions from secondary
memory into main memory. Primary memory is faster to access due to its cache or
register memory and proximity to the CPU. However, it is volatile, costlier, and has
limited capacity compared to secondary memory.

The primary memory is further divided into two parts:


1. RAM (Random Access Memory)
2. ROM (Read Only Memory)

RAM:
RAM is a faster CPU-accessed main memory used to temporarily store data, programs,
or results in a computer device, but is volatile and can be accessed randomly.
ROM:
Read-Only Memory (ROM) is a non-volatile storage medium that permanently stores
information in a chip, preventing modification or loss even when power is off or the
system is shut down.

3. Advantages and disadvantages of RAM:

Advantages of RAM
● It is a faster type of memory in a computer.
● It requires less power to operate.
● Program loads much faster
● More RAM increases the performance of a system and can
multitask.
● Perform read and write operations.
● The processor can read information faster than a hard disc, floppy,
USB, etc.

Disadvantages of RAM
● Less RAM reduces the speed and performance of a computer.
● Due to volatile, it requires electricity to preserve the data.
● It is expensive than ROM
● It is unreliable as compared to ROM
● The Size of RAM is limited.

4.Types of ROM:
There are five types of Read Only Memory (ROM):
MROM (Masked Read Only Memory),
PROM (Programmable Read Only Memory),
EPROM (Erasable and Programmable Read Only Memory),
EEPROM (Electrically Erasable and Programmable Read Only Memory),
Flash ROM.

MROM is the oldest type, pre-configured by the manufacturer,

while PROM is a digital read-only memory that allows users to write information or
programs only once.

EPROM is non-volatile, storing data for 10-20 years without power supply.

EEPROM is electrically erasable and programmable, allowing data to be erased and


reprogrammed up to 10,000 times.
Flash ROM is non-volatile, allowing data transfer between computers and digital
devices.

5. Advantages and disadvantages of ROM.

Advantages of ROM

1. It is a non-volatile memory in which stored information can be lost


even power is turned off.
2. It is static, so it does not require refreshing the content every time.
3. Data can be stored permanently.
4. It is easy to test and store large data as compared to RAM.
5. These cannot be changed accidently
6. It is cheaper than RAM.
7. It is simple and reliable as compared to RAM.
8. It helps to start the computer and loads the OS.

Disadvantages of ROM

1. Store data cannot be updated or modify except to read the existing


data.
2. It is a slower memory than RAM to access the stored data.
3. It takes around 40 minutes to destroy the existing data using the
high charge of ultraviolet light.

6. Secondary memory and its features:

Secondary memory is a permanent storage space for large amounts of data, also
known as external memory, on various storage media like hard drives, USB, CDs, flash
drives, and DVDs. It is cheaper and slower than primary memory and cannot be directly
accessed by the CPU.

Features:
● Its speed is slower than the primary/ main memory.
● Store data cannot be lost due to non-volatile nature.
● It can store large collections of different types, such as audio,
video, pictures, text, software, etc.
● All the stored data in a secondary memory cannot be lost because
it is a permanent storage area; even the power is turned off.
● It has various optical and magnetic memories to store data.

7.Types of secondary memory.

i) hard disk:
A hard disk is a permanent storage device on a computer's motherboard, storing data,
programs, and files securely. It is non-volatile and cannot be lost when power is
switched off, ensuring data protection even when the user is not present.

ii) Compact disk(CD):


A CD is a compact optical disk storage device used to store various data types like
audio, videos, files, and OS. It has a width of 1.2mm and height of 12 cm, using laser
light.

8. Types of CD:
CD-ROM(Compact Disc Read Only Memory)::
is a compact disc read-only memory used for bulk-sized mass media like audio CDs,
software, and computer games, allowing users to read data, text, music, and videos.

CD-R (Compact Disc Recordable):


The type of Compact Disc used
to write once by the user; after that, it cannot be modified or
erased.

CD-RW (Compact Disc Rewritable): It is a rewritable CD disc, often


used to write or delete the stored data.

9.What is Cache memory state its advantages and disadvantages.

Cache memory, a small chip-based computer memory between the CPU and main
memory, is faster, high-performance, and temporary, storing CPU-used data and
instructions. It reduces data access time and is often referred to as CPU memory due to
its proximity.
Advantages of Cache Memory
1. Cache memory is the faster memory as compared to the main
memory.
2. It stores all data and instructions that are repeatedly used by the
CPU for improving the performance of a computer.
3. The access time of data is less than the main memory.

Disadvantage of Cache Memory


1. It is very costly as compared to the Main memory and the
Secondary memory.
2. It has limited storage capacity.

10. What is register memory and virtual memory?

Register memory is a temporary storage area in a computer's CPU, storing data and
instructions. It is the smallest and fastest memory, sized 16, 32, or 64 bits, used for
faster CPU response.

Virtual memory is a computer system management technique that allows operating


systems to transfer data between RAM and hard drive storage, ensuring efficient
system operation by transferring dormant processes to virtual memory.

11. How does virtual memory work?

Virtual memory transfers processes between a computer's RAM and hard disk by
copying unused files to the hard disk. This frees up RAM for current tasks and allows for
future swaps for urgent tasks. It optimizes the use of limited RAM by allowing computers
to move files between systems through paging and segmenting.

12. Input Ouput devices:


An I/O device is a hardware component that processes data by receiving input,
providing it to a computer, and sending it to storage media as a storage output.

INPUT DEVICES:
i) The keyboard:
is a widely used input device for entering data into a computer, typically available in two
sizes (84/101/102), with 104 or 108 keys for Windows and the Internet.
- Types of Keys:
- Numeric Keys: For numbers and moving around.
- Typing Keys: Letters (A-Z) and numbers (0-9).
- Control Keys: Like arrows, Home, End, Ctrl, Alt, etc.

- Special Keys: Enter, Shift, Caps Lock, NumLk, etc.

- Function Keys: F1 to F12 at the top.

ii) MOUSE:

The mouse is a common pointing device used to move a cursor across the screen,
acting as an input device. It allows users to control the cursor's coordinates and
movement, with the left and right buttons enabling selection and menu display.

iii) JOYSTICK:

A joystick is a pointing device used to move the cursor on a computer screen, similar to
a mouse, primarily used in CAD and video game play. It can move in all four directions.

iv) SCANNER:

A scanner is a computer-like device that converts paper-based information to digital


format, allowing for manipulation and modification before printing.

V) BARCODE READER:

A bar code reader is a device that scans bar-coded data, converts it to an alphanumeric
value, and sends it to a computer, commonly used for marking items and numbering
books.

OUTPUT DEVICES:
12. MONITOR:
Monitors, also known as VDUs(Visual Display Units), are the primary output device of a
computer, creating images through the arrangement of pixels, which determines their
sharpness.

Types of monitor:

Two types of monitor screens are


Cathode-Ray Tube (CRT)
Flat-Panel Display Cathode-Ray Tube Monitor.

CRT displays: have smaller pixels and higher resolution.


flat-panel: displays have less volume, weight, and power consumption, used in
calculators, video games, monitors, and laptop computers.

13.Types of flat-panel displays?

There are 2 types of flat-panel displays :

(a) Emissive Display: Devices that turn electrical energy into light are
known as emissive displays. Example: LEDs, Plasma panels, thin film
electroluminescent displays etc.

(b) Non- Emissive Display: Optical effects are used in Non-Emissive


displays to turn sunshine or light from another source into graphical
patterns. LCDs are a good example (Liquid Crystal Device).

14. Printers and its types?

Printers are output devices that allow you to print information on paper.

There are two types of printers:


(a) Impact Printer:
There are two types of printers:
Impact Printers, which print on a ribbon crushed against paper, and
The following are the characteristics of non impact printers

● Exceptionally low consumable cost.


● Quite noisy
● Because of its low cost, it is ideal for large-scale printing.
● To create an image, there is physical contact with the paper.
(b) Non-Impact Printers:
Non-Impact Printers, which print on a full page at a time without a ribbon, also known as
Page Printers, the following are the characteristics of Non- impact printers.
● Faster
● They don’t make a lot of noise.
● Excellent quality

14. What is a plotter?

A plotter is a device that prints graphics in various color formats with high-quality
images, similar to a printer. It allows for creating pictures, 3D postcards, advertising
signs, charts, and designs of building machines' internal structures, as well as large
maps and architectural drawings.

15. What are the various functions of CPU?

Fetching information:
The CPU retrieves instructions from the computer's memory in a specific order,
collecting them one at a time and preparing them for processing.

Decoding information:
The CPU control unit decodes instructions after fetching them, analyzing them to
determine the operation type and data involved.

Executing instructions:
The CPU executes instructions by performing calculations, data manipulations, and
control flow activities, including addition, subtraction, comparisons, and Boolean
operations, after decoding.

Controlling the program FLOW:


The CPU's control portion manages program flow, regulating operations, and allowing
the CPU to select from various execution paths and make decisions.
I/O Operations:
The CPU manages I/O operations by coordinating data transfers between input and
output devices like keyboards, mice, displays, and storage devices.

Overall, the CPU performs a wide range of functions to ensure the smooth
execution of instructions, manipulation of data, and coordination of various
components in a computer system.
UNIT 1:

1.What is a computer and its basic operations ?


A computer is an electronic device that processes data, solves problems, and
manipulates it through mathematical and logical operations, resulting in the desired
output.
BASIC COMPUTER OPERATIONS
A computer basically performs five major operations or functions such as :
● Accepts data or instructions by way of input.
● Stores data,
● Processes data as required by the user,
● Gives results in the form of output, and
● Controls all operations inside a computer.

2. Explain basic computer diagram:

Input:
This is the process of entering data and programs in the computer system. Therefore,
the input unit takes data from us to the computer in an organised manner for
processing.
Storage:
A storage unit permanently stores data and instructions, performing major functions
such as storing data and instructions before and after processing, and intermediate
results of processing.

Processing:
The task of performing operations like arithmetic and logical operations is
called processing.

CPU(Central Processing Unit):


The CPU processes data and instructions from the storage unit, performs calculations
based on the instructions and data type, and then sends the data back to the storage
unit.

OUTPUT:
Output is the process of producing useful information from data, stored in the
computer for further processing before being provided in human readable form.

CONTROL UNIT:
The control unit manages all computer operations, including input, processing, and
output, ensuring step-by-step processing of all computer operations.

ALU UNIT:
It performs arithmetic and logical operations.

3.Characteristics of a computer?

Computers are highly efficient and accurate, working quickly and efficiently. They are
designed to be free from fatigue and can work for hours without errors. They are
versatile, capable of handling various tasks such as inventory management, electrical
bill preparation, and pay cheques. They can also be used in libraries for housekeeping
operations and students for searching books. Computers have the power to remember
large amounts of information, allowing them to be recalled for years. However, they
cannot make decisions independently like humans. They have an in-built memory for
large amounts of data, and can also store data in secondary devices like CDs, DVDs,
and pen drives.
4.addressing modes in instruction set

1.Direct Addressing Mode Instruction set of 8085


● In this instruction set, the direct address contains the address of operand
within the instruction itself.
○ LDA 2600 H
○ IN 05
○ OUT 07
○ STA 2700 H

2.Register Addressing Mode Instruction set of 8085


● In this type of instruction set, operands will be present in the micro-process
registers.
○ MOV A, B
○ ADD B
○ SUB C

3.Register Indirect Addressing Mode Instruction set of 8085


● In this type of instruction, the operands will present in memory (M) and the
address of memory is present register pair.
● It is also called “indirect addressing mode type instruction set”.
○ MOV A, M
○ ADD M
○ LDAX B

4.Immediate Addressing Mode Instruction set of 8085


● In this type, the operand and data are specified within the instruction itself.
● In other words, we can say, this type of instruction has an operand field rather
than an address field.
○ MVI A, 25
○ ADI 36

5.Implicit Addressing Mode Instruction set of 8085


● If operations of the microprocessor are performed by accumulator alone or
machine control instructions, then it contains an implied addressing type.
○ e.g. CMA, RAL, DAA
1.Looping in 8085

Looping is a programming technique that instructs the Microprocessor to repeat


tasks. It is accomplished by changing the sequence of execution using jump
instructions.
Loops can be classified into two groups:
1. Continous Loops.
2. Conditional Loops.

Continous Loops
A continuous loops repeats a task continuously. It is setup by using unconditional
jump instruction. A program with a continuous loop will keep repeating tasks until
the system is reset as shown in the flowchart.

Conditional Loops
A conditional loop repeat a task if some conditions are satisfied. They are setup
by conditional jump instructions. These instructions check flags(Z, CY, P, S) and

repeat the tasks based on the flag values. These loops include counting and
indexing.
Conditional Loop and Counter
A counter is a typical application of the conditional loop. To achieve the looping
task, the microprocessor requires a counter and a flag. A counter is set up by
loading a suitable count into a register. Counting is accomplished by either
incrementing or decrementing the counter. A conditional jump instruction creates
the loop and the end of counting is indicated by a flag.
The following flowchart illustrates the approach needed for the microprocessor to
repeat a task five times.
2. Subroutines:

In 8085 Microprocessors, a subroutine is a function that reduces program size by


storing only one copy of the code in memory. It can exist anywhere in the code and be
called when needed, reducing the number of repeated code executions.

The 8085 Microprocessor has two instructions for handling subroutines:


the CALL instruction, which redirects program execution to the subroutine, and
the RET instruction, which returns execution to the calling routine.

Call instructions:
The microprocessor reads a subroutine address from memory locations W and Z,
stores the higher and lower order bits, and loads the program counter with the 16-bit
address from WZ registers.

RET instructions:

1. It retrieves the return address from the top of the stack.


2. Loads the program counter with the return address.
Intel 8085 Instructions
1. Data Transfer Group
1. MOV r1, r2 (Move Data; Move the content of the one register to another).
[r1] <-- [r2]
2. MOV r, m (Move the content of memory register). r <-- [M]
3. MOV M, r. (Move the content of register to memory). M <-- [r]
4. MVI r, data. (Move immediate data to register). [r] <-- data.
5. MVI M, data. (Move immediate data to memory). M <-- data.
6. LXI rp, data 16. (Load register pair immediate). [rp] <-- data 16 bits, [rh] <--
8 LSBs of data.
7. LDA addr. (Load Accumulator direct). [A] <-- [addr].
8. STA addr. (Store accumulator direct). [addr] <-- [A].
9. LHLD addr. (Load H-L pair direct). [L] <-- [addr], [H] <-- [addr+1].
10. SHLD addr. (Store H-L pair direct) [addr] <-- [L], [addr+1] <-- [H].
11. LDAX rp. (LOAD accumulator indirect) [A] <-- [[rp]]
12. STAX rp. (Store accumulator indirect) [[rp]] <-- [A].
13. XCHG. (Exchange the contents of H-L with D-E pair) [H-L] <--> [D-E].

2. Arithmetic Group
1. ADD r. (Add register to accumulator) [A] <-- [A] + [r].
2. ADD M. (Add memory to accumulator) [A] <-- [A] + [[H-L]].
3. ADC r. (Add register with carry to accumulator). [A] <-- [A] + [r] + [CS].
4. ADC M. (Add memory with carry to accumulator) [A] <-- [A] + [[H-L]] [CS].
5. ADI data (Add immediate data to accumulator) [A] <-- [A] + data.
6. ACI data (Add with carry immediate data to accumulator). [A] <-- [A] +
data + [CS].
7. DAD rp. (Add register paid to H-L pair). [H-L] <-- [H-L] + [rp].
8. SUB r. (Subtract register from accumulator). [A] <-- [A] – [r].
9. SUB M. (Subtract memory from accumulator). [A] <-- [A] – [[H-L]].
10. SBB r. (Subtract register from accumulator with borrow). [A] <-- [A] – [r] –
[CS].
11. SBB M. (Subtract memory from accumulator with borrow). [A] <-- [A] – [[H-
L]] – [CS].
12. SUI data. (Subtract immediate data from accumulator) [A] <-- [A] – data.
13. SBI data. (Subtract immediate data from accumulator with borrow). [A] <--
[A] – data – [CS].
14. INR r (Increment register content) [r] <-- [r] +1.
15. INR M. (Increment memory content) [[H-L]] <-- [[H-L]] + 1.
16. DCR r. (Decrement register content). [r] <-- [r] – 1.
17. DCR M. (Decrement memory content) [[H-L]] <-- [[H-L]] – 1.
18. INX rp. (Increment register pair) [rp] <-- [rp] – 1.
19. DCX rp (Decrement register pair) [rp] <-- [rp] -1.

3.Logical Group
1. ANA r. (AND register with accumulator) [A] <-- [A] ^ [r].
2. ANA M. (AND memory with accumulator). [A] <-- [A] ^ [[H-L]].
3. ANI data. (AND immediate data with accumulator) [A] <-- [A] ^ data.
4. ORA r. (OR register with accumulator) [A] <-- [A] v [r].
5. ORA M. (OR memory with accumulator) [A] <-- [A] v [[H-L]]
6. ORI data. (OR immediate data with accumulator) [A] <-- [A] v data.
7. XRA r. (EXCLUSIVE – OR register with accumulator) [A] <-- [A] v [r]
8. XRA M. (EXCLUSIVE-OR memory with accumulator) [A] <-- [A] v [[H-L]]
9. XRI data. (EXCLUSIVE-OR immediate data with accumulator) [A] <-- [A]
10. CMA. (Complement the accumulator) [A] <-- [A]
11. CMC. (Complement the carry status) [CS] <-- [CS]
12. STC. (Set carry status) [CS] <-- 1.
13. CMP r. (Compare register with accumulator) [A] – [r]
14. CMP M. (Compare memory with accumulator) [A] – [[H-L]]
15. CPI data. (Compare immediate data with accumulator) [A] – data.
The 2nd byte of the instruction is data, and it is subtracted from the content of the
accumulator. The status flags are set according to the result of subtraction. But
the result is discarded. The content of the accumulator remains unchanged.
16. RLC (Rotate accumulator left) [An+1] <-- [An], [A0] <-- [A7],[CS] <-- [A7].

The content of the accumulator is rotated left by one bit. The seventh bit of the
accumulator is moved to carry bit as well as to the zero bit of the accumulator.
Only CS flag is affected.
17. RRC. (Rotate accumulator right) [A7] <-- [A0], [CS] <-- [A0], [An] <-- [An+1].

The content of the accumulator is rotated right by one bit. The zero bit of the
accumulator is moved to the seventh bit as well as to carry bit. Only CS flag is
affected.
18. RAL. (Rotate accumulator left through carry) [An+1] <-- [An], [CS] <-- [A7], [A0]
<-- [CS].
19. RAR. (Rotate accumulator right through carry) [An] <-- [An+1], [CS] <-- [A0], [A7]
<-- [CS]
4.BRANCH GROUP:

20. JZ addr (label). (Jump if the result is zero)


21. JNZ addr (label) (Jump if the result is not zero)
22. JC addr (label). (Jump if there is a carry)
23. JNC addr (label). (Jump if there is no carry)
24. JP addr (label). (Jump if the result is plus)
25. JM addr (label). (Jump if the result is minus)
26. JPE addr (label) (Jump if even parity)
27. JPO addr (label) (Jump if odd parity)

You might also like