Professional Documents
Culture Documents
DCF SUMMARIZED theory NOTES_suyash yadav
DCF SUMMARIZED theory NOTES_suyash yadav
DCF SUMMARIZED theory NOTES_suyash yadav
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.
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.
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.
Control Unit:
Generates signals on data bus, address bus and control bus within
microprocessor to carry out the instruction, which has been decoded.
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:
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
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.
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.
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.
Advantages of ROM
Disadvantages of ROM
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.
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.
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.
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.
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 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.
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.
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:
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:
(a) Emissive Display: Devices that turn electrical energy into light are
known as emissive displays. Example: LEDs, Plasma panels, thin film
electroluminescent displays etc.
Printers are output devices that allow you to print information on paper.
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.
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.
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:
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.
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
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:
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:
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: