Wednesday, 6 June 2012

DATABASE MANAGEMENT SYSTEMS


CS 2255 DATABASE MANAGEMENT SYSTEMS SYLLABUS  3 0 0 3
(Common to CSE & IT)
1. Introduction 9
Purpose of Database System -– Views of data – Data Models – Database Languages ––
Database System Architecture – Database users and Administrator – Entity–
Relationship model (E-R model ) – E-R Diagrams -- Introduction to relational databases
2. Relational Model 9
The relational Model – The catalog- Types– Keys - Relational Algebra – Domain
Relational Calculus – Tuple Relational Calculus - Fundamental operations – Additional
Operations- SQL fundamentals - Integrity – Triggers - Security – Advanced SQL
features –Embedded SQL– Dynamic SQL- Missing Information– Views – Introduction
to Distributed Databases and Client/Server Databases
3. Database Design 9
Functional Dependencies – Non-loss Decomposition – Functional Dependencies – First,
Second, Third Normal Forms, Dependency Preservation – Boyce/Codd Normal Form-
Multi-valued Dependencies and Fourth Normal Form – Join Dependencies and Fifth
Normal Form
4. Transactions 9
Transaction Concepts - Transaction Recovery – ACID Properties – System Recovery –
Media Recovery – Two Phase Commit - Save Points – SQL Facilities for recovery –
Concurrency – Need for Concurrency – Locking Protocols – Two Phase Locking –
Intent Locking – Deadlock- Serializability – Recovery Isolation Levels – SQL Facilities
for Concurrency.
5. Implementation Techniques 9
Overview of Physical Storage Media – Magnetic Disks – RAID – Tertiary storage – File
Organization – Organization of Records in Files – Indexing and Hashing –Ordered
Indices – B+ tree Index
Files – B tree Index Files – Static Hashing – Dynamic Hashing –
Query Processing Overview – Catalog Information for Cost Estimation – Selection
Operation – Sorting – Join Operation – Database Tuning.
TOTAL = 45(VISIT         http://aimforhigh.blogspot.com)

Text Books:
1. Abraham Silberschatz, Henry F. Korth, S. Sudharshan, “Database System
Concepts”, Fifth Edition, Tata McGraw Hill, 2006 (Unit I and Unit-V ) .
2. C.J.Date, A.Kannan, S.Swamynathan, “An Introduction to Database Systems”,
Eighth Edition, Pearson Education, 2006.( Unit II, III and IV)
References:
1. Ramez Elmasri, Shamkant B. Navathe, “Fundamentals of Database Systems”,
FourthEdition , Pearson / Addision wesley, 2007.
2. Raghu Ramakrishnan, “Database Management Systems”, Third Edition, McGraw
Hill, 2003.
3. S.K.Singh, “Database Systems Concepts, Design and Applications”, First Edition,
Pearson Education, 2006.
17

DBMS QUESTION BANK


UNIT I


PART A - Two Mark Questions


1. What is DBMS and what’s the goal of it?
2. What are the advantages of DBMS?
3. What are the Disadvantages of DBMS?
4. What are the disadvantages of File Systems?
5. Define Entity, Entity Set, and extensions of entity set. Give one example for each.
6. Define and give examples to illustrate the four types of attributes in database.
7. Define relationship and participation.
8. Define mapping cardinality or cardinality ratio.
9. Explain the four types of mapping cardinality with example.
10. Define E-R diagram.
11. Define weak Entity set. Give an example and explain why it is weak entity set.
12. Define discriminator or partial key of a weak entity set. Give example.
13. Explain Referential Integrity.
14. Define Instances and schemas.
15. Define and explain the two types of Data Independence.
16. Define the type types of DML.
17. List out the functions of DBA.
18. What is the need for DBA?
19. Explain DML pre-compiler.
20. Define file manager and buffer manager.
21. Define Data Dictionary.
22. State the various processes of database.
23. What are the characteristics of database?
24. Define-metadata
25. Define data abstraction
26. What is data model?
27. What are the categories of data model?
28. Define entity, attributes and relationships
29. Define database state or snapshot?
30. What are the types of attributes in the ER model?
31. What are composite and simple attributes?
32. What are stored and derived attribute?
33. How are complex attributes represented?
34. Define value sets of attributes.
35. Define degree of relationship type
36. What is a role name?
37. What are the types of relationship constraints?
38. Define participation constraint.
39. What are the types of participation constraints?
40 Define a partial key.
41. Define specialization.
42. Define relational database schema
43. Define relational database state.
44. List any eight applications of DBMS.
45. Give the levels of data abstraction?
46. Define the terms 1) physical schema 2) logical schema.
47. What is conceptual schema?
48. What is storage manager?
49. What are the components of storage manager?
50. What is the purpose of storage manager?
51. List the data structures implemented by the storage manager.
52. What is a data dictionary?
53. What is an entity relationship model?
54. Define the terms
i) Entity set
ii) Relationship set
55. Define single valued and multivalued attributes.
56. Define null values.
57. Define the terms
i) Key attribute
ii) Value set
58. Define weak and strong entity sets?
59. What does the cardinality ratio specify?
60. Define the terms
i) DDL
ii) DML
61. List the disadvantages of relational database system.


PART – B (16 MARK QUESTIONS)


1. Explain the architecture of DBMS with a neat block diagram
2. Explain ER model in detail
3. Explain the design issues of ER-model
4. Draw an ER diagram for a banking enterprise
5. Explain: Data models, Schemas, and Instances
6. Write about Entity types, Entity sets, Attributes, and keys.
UNIT II


PART A - Two Mark Questions


1. Write short notes on relational model
2. Define tuple and attribute
3. Define the term relation.
4. Define tuple variable
5. Define the term Domain.
6. What is a candidate key? Illustrate with example.
7. What is a primary key? Illustrate with example.
8. What is a super key? Illustrate with example.
9. Define- relational algebra.
10. What is a SELECT operation?
11. What is a PROJECT operation?
12. Write short notes on tuple relational calculus.
13. Write short notes on domain relational calculus
14. Define query language?
15. Write short notes on Schema diagram.
16. What is foreign key?
17. What are the parts of SQL language?
18. What are the categories of SQL command?
19. What are the three classes of SQL expression?
20. Give the general form of SQL query?
21. What is the use of rename operation?
23. List the string operations supported by SQL?
24. List the set operations of SQL?
25. What is the use of Union and intersection operation?
26. What are aggregate functions? And list the aggregate functions supported by
SQL?
27. What is the use of group by clause?
28. What is the use of sub queries?
29. What is view in SQL? How is it defined?
30. What is the use of with clause in SQL?
31. List the table modification commands in SQL?
32. List the SQL domain Types?
33. What is the use of integrity constraints?
34. Mention the 2 forms of integrity constraints in ER model?
35. What is trigger?
36. What are domain constraints?
37. What are referential integrity constraints?
38. What is assertion? Mention the forms available.
39. Give the syntax of assertion?
40. What is the need for triggers?
41. List the requirements needed to design a trigger.
42. Give the forms of triggers?
43. Name the various privileges in SQL?
44. Mention the various user privileges.
45. Give the limitations of SQL authorization.
46. List out the statements associated with a database transaction?
47. What is transaction?
48. What is a homogeneous distributed database?
49. What is a heterogeneous distributed database?
50. What are the two approaches to store relations in distributed database?
51. What are the two different schemes for fragmenting a relation?
52. What is horizontal fragmentation?
53. What is vertical fragmentation?
54. What are the various forms of data transparency?
55. Give the syntax for creating the table with composite primary key.
56. Write a query to display loan number, branch name where loan amount is between
500 and 1000 using comparison operators.
57. Find the names of all branches with customers who have an account in the bank
and who live in the Harrison city using Equi-join.
58. Find the names of all branches with customers who have an account in the bank
and who live in the Harrison city using Sub-Queries.
59. Select the rows from borrower such that the loan numbers are lesser than any loan
number where the branch name is Downtown.
60. Define self-join and give an example query to illustrate self-join with a sample
table.
61. What is a view and give an example query to create a view from an existing table.
62. Define Degree and Domain of a relation.
63. Define how a relation is defined mathematically.
64. List out the six fundamental operators and 4 additional operators in relational
algebra.
65. Which operators are called as unary operators and explain why they are called so.
66. Which operators are called as binary operators and explain why they are called so.
67. Write a relational algebra expression to find those tuples pertaining to loans of
more than 1200 made by the Perry ridge branch.
68. Explain the use of set difference operator and give an example to illustrate the
same.
69. Explain the two conditions needed for the set difference operation (union
Operation) to be valid.
70. Explain with one example why the additional operators are separated from the
fundamental operators?
71. Explain theta join.
72. Define how an expression can be expressed in tuple relational calculus and list out
the notations used.
73. Write an expression to find the names of all customers who have a loan from the
Perry ridge branch in tuple relational calculus.
74. Write an expression to find all customers who have an account at all branches
located in Brooklyn in tuple relational calculus.
75. Write an expression to find all customers who have an account, a loan or both at
the Perry ridge branch in domain relational calculus.
76. Define and give the general format used for generalized projection. Give one
example expression to illustrate the same.
77. What is the use of outer join and list out the three types of outer join with the
notations used in relational algebra?
78. Write a relational algebraic expression to delete all accounts at branches located
in Brooklyn.
79. Write a relational algebraic expression to insert the information about Smith with
his new account number ‘A-157’ taken at the Perry ridge branch with Rs.1200.
80. Write a relational algebraic expression to insert a gift amount of Rs. 200/- for all
loan customers of the Perry ridge branch.
81. Write a relational algebraic expression to update by adding the balances more
than 10000 with Rs.60/- interest and otherwise Rs. 50/- interest.
82. Define materialized views and explain the use of such views.
83. Define Distributed database systems.
84. What are the advantages of distributed system?
85. What is query processor?
86. Explain Client/Server.
87. What are the rules that have to be followed during fragmentation?
88. What are the failures in distributed DBMS?
89. Define relation schema.
90. Define degree of relation.




PART – B (16 MARK QUESTIONS)


1. Explain the various relational algebra operations
2. Explain nested Queries with examples
3. Explain embedded SQL and dynamic SQL in detail
4. Explain the integrity constraints supported by SQL
5. Explain triggers with example.
6. Explain distributed Database in detail
7. Explain in detail the recovery techniques in distributed databases.
8. Write about Structured Query Language (SQL) commands.
9. Explain about the concept of Tuple Relational Calculus
10. Explain about the concept of Domain Relational Calculus.




UNIT III


PART A - Two Mark Questions


1. What is first normal form?
2. Define Boyce codd normal form
3. What is meant by functional dependencies?
4. What are the uses of functional dependencies?
5. Explain trivial dependency?
6. What are axioms?
7. What is meant by computing the closure of a set of functional dependency?
8. What is meant by normalization of data?
9. Define canonical cover?
10. List the properties of canonical cover.
11. What are the desirable properties of decomposition?
12. What is 2NF?
13. Define Functional Dependencies.
14. What are the main characteristics of functional dependencies?
15. Define Closure of Functional Dependency.
16. Define the three Armstrong’s Axioms or rules of inference.
13. Define union, decomposition, and Pseudo-transitivity rules.
14. Define normalization of data and denormalization.
15. Explain shortly the four properties or objectives of normalization.
16. Define Partial Functional Dependency.
17 Define functional dependency.
18. State the inference rules of functional dependency.
19. What is normalization?
20. What is a prime attribute?
21. Define full functional dependency.
22. What is lossy decomposition?
23. What do you mean by lossy-join decomposition?
24. What is lossless-join decomposition?
25. What are the two problematic issues in the design of relational databases?
26. What do you mean by Determinant?
27. What is a trivial functional dependency?
28. Explain the terms reflectivity, augmentation and transitivity?
29. Define the terms self-determination, decomposition, union and composition.
30. What is transitive dependency?
31. Explain how to identify the functional dependencies of a relation using an example.






PART – B (16 MARK QUESTIONS)


1. What is decomposition? Explain with the help of an example.
2. Explain the different normal forms in detail.
3. Explain the process of Functional Dependency.
4. What are the inference rules for functional dependencies?
5. Compare BCNF and 3NF with suitable example.
6. Explain First Normal form and second normal form with suitable example.
7. Explain the 4NF and 5NF with suitable example.
8. Explain the Domain-Key normal form (DKNF) with suitable example.
9. What is Denormalization? Explain with suitable example.




UNIT IV


PART A - Two Mark Questions
1. What is transaction?
2. What are the two statements regarding transaction?
3. What are the properties of transaction?
4. What is recovery management component?
5. When is a transaction rolled back?
6. What are the states of transaction?
7. What is a shadow copy scheme?
8. Give the reasons for allowing concurrency?
9. What is average response time?
10. What are the two types of serializability?
11. Define lock?
12. What are the different modes of lock?
13. Define deadlock?
14. Define the phases of two phase locking protocol
15. Define upgrade and downgrade?
16. What are the two methods for dealing deadlock problem?
17. What is a recovery scheme?
18. What are the two types of errors?
19. What are the storage types?
20. Define blocks?
21. What is meant by Physical blocks?
22. What is meant by buffer blocks?
23. What is meant by disk buffer?
24. What is meant by log-based recovery?
25. What are uncommitted modifications?
27. Define shadow paging.
28. Define page.
29. Differentiate strict two phase locking protocol and rigorous two phase locking protocol.
30. How the time stamps are implemented?
31. What are the time stamps associated with each data item?
32. Define transaction-processing systems.
33. Define read only transaction.
34. When does the transaction go into an active state and partially committed state?
35. What is called as committed state?
36. Define ACID property.
37. What is isolation of ACID properties?
38. Define cascading rollback.
39. What is called as a time stamp?
40. What is shared lock and Exclusive lock?
41. When does a deadlock occur?
42. What is meant by transaction rollback?
43. Write the reasons for using concurrent execution.
44. Define recoverable schedule.
45. What are the objectives & phases of concurrency control?
46. What are the types of locking protocols?
47. What are the problems that occur in transaction if they run concurrently?
48. What are the types of failures?
49. What are the transaction operations?
50. When does a transaction reach its commit point?
51. What are the properties of transaction?
52. Define consistent state.
53. When is a schedule said to be serial?
54. When is a schedule serializable?
55. Define precedence graph or serialization graph?
56. What is a lock?
57. What is a binary lock?
58. What are the fields present in a lock?
59. What are the locking operations of a shared/exclusive lock?
60. What are the phases in a locking transaction?
70. What are the values present in a timestamp algorithm?
71. What are the phases in concurrency control protocol?


PART – B (16 MARK QUESTIONS)


1. Explain ACID in detail.
2. Explain serializability
3. Explain lock based protocols
4. Explain two phase locking in detail.
5. Explain log based recovery in detail.
6. Explain: Locking techniques for Concurrency Control
7. Explain the process of concurrency control based on timestamp ordering.


NIT V


PART A - Two Mark Questions


1. What are the main categories of storage hierarchy? Draw the storage device hierarchy according to their speed and their cost.
2. Give the measures of quality of a disk.
3. Compare sequential access devices versus random access devices with an example
4. What are the types of storage devices?
5. What are called jukebox systems?
6. What is called remapping of bad sectors?
7. Define access time.
8. Define seek time.
9. Define average seek time.
10. Define rotational latency time.
11. Define average latency time.
12. What is meant by data-transfer rate?
14. What are a block and a block number?
15. What are called journaling file systems?
16. What is the use of RAID?
17. Explain how reliability can be improved through redundancy?
18. What is called mirroring?
19. What is called mean time to repair?
20. What is called bit-level striping?
21. What is called block-level striping?
22. What are the two main goals of parallelism?
23. What are the factors to be taken into account when choosing a RAID level?
24. What is meant by software and hardware RAID systems?
25. Define hot swapping?
26. Which level of RAID is best? Why?
27. Distinguish between fixed length records and variable length records?


28. Explain the concept of variable length records.
30. What are the two types of blocks in the fixed –length representation? Define
them.
32. What is known as heap file organization?
33. What is known as sequential file organization?
34. What is hashing file organization?
35. What is known as clustering file organization?
36. What is an index?
37. What are the two types of ordered indices?
38. What are the types of indices?
39. What are the techniques to be evaluated for both ordered indexing and
hashing?
40. What is known as a search key?
41. What is a primary index?
42. What are called index-sequential files?
43. What are the two types of indices?
44. What are called multilevel indices?
45. What are called secondary indices?
46. What are the disadvantages of index sequential files?
47. What is a B+-Tree index?
48. What is B-Tree?
49. What is hashing?
50. How do you create index in SQL?
51. Distinguish between static hashing and dynamic hashing?
52. What is a hash index?
53. What can be done to reduce the occurrences of bucket overflows in a hash
file organization?
54. Differentiate open hashing and closed hashing (overflow chaining)
55. What is linear probing?
56. What is called query processing?
57. What are the steps involved in query processing?
58. What is called an evaluation primitive?
59. What is called a query evaluation plan?
60. What is called a query –execution engine?
61. How do you measure the cost of query evaluation?
62. List out the operations involved in query processing
63. What are called as index scans?
64. What is called as external sorting?
65. Explain nested loop join?
66. What is meant by block nested loop join?
67. What is meant by hash join?
68. What is called as recursive partitioning?
69. What is called as an N-way merge?
70. What is known as fudge factor?
71. Define query optimization.
72. Define track.
74. What is the hardware address of a block?
75. Define block transfer time.
76. Define bulk transfer rate
77. What is data striping?
80. What is mirroring or shadowing?
81. What is bit level data striping?
82. What are the two techniques of implementing query optimization?
83. Define external sorting?
84. What are the phases of external sorting?
85. Define degree of merging?




PART – B (16 MARK QUESTIONS)


1. Explain file organization in details.
2. Explain indexing and hashing
3. Explain B+ tree index in detail
4. Explain Query processing in detail.
5. Explain RAID levels in detail
6. Explain about secondary storage devices
7. Write about various operations that can be performed on files.
8. Explain the concept of parallelizing disk access using RAID technology.
9. Explain: Hashing Techniques
10. Explain the different types of single-level ordered indexes
11. Explain the basic algorithms for executing query operations
12. Explain the process of database tuning


Microprocessor


  •  
A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale integration (LSI) or very-large-scale integration (VLSI) technique.
  • The microprocessor is capable of performing various computing functions and making decisions to change the sequence of program execution.
  • In large computers, a CPU performs these computing functions.The Microprocessor resembles a CPU exactly.
  • The microprocessor is in many ways similar to the CPU, but includes all the logic circuitry including the control unit, on one chip.
  • The microprocessor can be divided into three segments for the sake of clarity. – They are: arithmetic/logic unit (ALU), register array, and control unit.
  • A comparison between a microprocessor, and a computer is shown below:


BlockdiagramofComputer_thumb9


OverviewdiagramofMicroprocessor_thum
  • Arithmetic/Logic Unit: This is the area of the microprocessor where various computing functions are performed on data. The ALU unit performs such arithmetic operations as addition and subtraction, and such logic operations as AND, OR, and exclusive OR.
  • Register Array: This area of the microprocessor consists of various registers identified by letters such as B, C, D, E, H, and L. These registers are primarily used to store data temporarily during the execution of a program and are accessible to the user through instructions.
  • Control Unit: The control unit provides the necessary timing and control signals to all the operations in the microcomputer. It controls the flow of data between the microprocessor and memory and peripherals.
  • Memory: Memory stores such binary information as instructions and data, and provides that information to the microprocessor whenever necessary. To execute programs, the microprocessor reads instructions and data from memory and performs the computing operations in its ALU section. Results are either transferred to the output section for display or stored in memory for later use. Read-Only memory (ROM) and Read/Write memory (R/WM), popularly known as Random- Access memory (RAM).
1. The ROM is used to store programs that do not need alterations. The monitor program of a single-board microcomputer is generally stored in the ROM. This program interprets the information entered through a keyboard and provides equivalent binary digits to the microprocessor. Programs stored in the ROM can only be read; they cannot be altered.
2. The Read/Write memory (RIWM) is also known as user memory It is used to store user programs and data. In single-board microcomputers, the monitor program monitors the Hex keys and stores those instructions and data in the R/W memory. The information stored in this memory can be easily read and altered.
  • I/O (Input/Output): It communicates with the outside world. I/O includes two types of devices: input and output; these I/O devices are also known as peripherals.
  • System Bus: The system bus is a communication path between the microprocessor and peripherals: it is nothing but a group of wires to carry bits.

Microprocessor is a multi-use device which finds applications in almost all the fields.Here is some sample applications given in variety of fields.
Electronics:
  • Digital clocks & Watches
  • Mobile phones
  • Measuring Meters
Mechanical:
  • Automobiles
  • Lathes
  • All remote machines
Electrical:
  • Motors
  • Lighting controls
  • Power stations
Medical:
  • Patient monitoring
  • Most of the Medical equipments
  • Data loggers
Computer:
  • All computer accessories
  • Laptops & Modems
  • Scanners & Printers
Domestic:
  • Microwave Ovens
  • Television/CD/DVD players
  • Washing Machines
http://www.8085projects.info/images/Arhitecture-Pic1.png
8085 Bus Structure:

Address Bus:
  • The address bus is a group of 16 lines generally identified as A0 to A15.
  • The address bus is unidirectional: bits flow in one direction-from the MPU to peripheral devices.
  • The MPU uses the address bus to perform the first function: identifying a peripheral or a memory location.
http://www.8085projects.info/images/Bus-Structure-Pic2.png
Data Bus:
  • The data bus is a group of eight lines used for data flow.
  • These lines are bi-directional - data flow in both directions between the MPU and memory and peripheral devices.
  • The MPU uses the data bus to perform the second function: transferring binary information.
  • The eight data lines enable the MPU to manipulate 8-bit data ranging from 00 to FF (28 = 256 numbers).
  • The largest number that can appear on the data bus is 11111111.

Control Bus:
  • The control bus carries synchronization signals and providing timing signals.
  • The MPU generates specific control signals for every operation it performs. These signals are used to identify a device type with which the MPU wants to communicate.

Registers of 8085:

  • The 8085 have six general-purpose registers to store 8-bit data during program execution.
  • These registers are identified as B, C, D, E, H, and L.
  • They can be combined as register pairs-BC, DE, and HL-to perform some 16-bit operations.

http://www.8085projects.info/images/Registers-Pic3.png
Accumulator (A):
  • The accumulator is an 8-bit register that is part of the arithmetic/logic unit (ALU).
  • This register is used to store 8-bit data and to perform arithmetic and logical operations.
  • The result of an operation is stored in the accumulator.

Flags:
  • The ALU includes five flip-flops that are set or reset according to the result of an operation.
  • The microprocessor uses the flags for testing the data conditions.
  • They are Zero (Z), Carry (CY), Sign (S), Parity (P), and Auxiliary Carry (AC) flags. The most commonly used flags are Sign, Zero, and Carry.

The bit position for the flags in flag register is,

http://www.8085projects.info/images/Flags-Pic4.PNG
1.Sign Flag (S):
       After execution of any arithmetic and logical operation, if D7 of the result is 1, the sign                 flag is set. Otherwise it is reset.
       D7 is reserved for indicating the sign; the remaining is the magnitude of number.
       If D7 is 1, the number will be viewed as negative number. If D7 is 0, the number will be                viewed as positive number.

2.Zero Flag (z):
       If the result of arithmetic and logical operation is zero, then zero flag is set otherwise it is reset.

3.Auxiliary Carry Flag (AC):
       If D3 generates any carry when doing any   arithmetic and logical operation, this flag is set.
       Otherwise it is reset.

4.Parity Flag (P):
       If the result of arithmetic and logical operation contains even number of 1's then this flag will be        set and if it is odd number of 1's it will be reset.

5.Carry Flag (CY):
       If any arithmetic and logical operation result any carry then carry flag is set otherwise it is                reset.


Arithmetic and Logic Unit (ALU):

  • It is used to perform the arithmetic operations like addition, subtraction, multiplication, division, increment and decrement and logical operations like AND, OR and EX-OR.

  • It receives the data from accumulator and registers.

  • According to the result it set or reset the flags.

Program Counter (PC):

  • This 16-bit register sequencing the execution of instructions.

  • It is a memory pointer. Memory locations have 16-bit addresses, and that is why this is a 16-bit register.

  • The function of the program counter is to point to the memory address of the next instruction to be executed.

  • When an opcode is being fetched, the program counter is incremented by one to point to the next memory location.

Stack Pointer (Sp):

  • The stack pointer is also a 16-bit register used as a memory pointer.

  • It points to a memory location in R/W memory, called the stack.

  • The beginning of the stack is defined by loading a 16-bit address in the stack pointer (register).


Temporary Register: It is used to hold the data during the arithmetic and logical operations.

Instruction Register:  When an instruction is fetched from the memory, it is loaded in the instruction register.

Instruction Decoder: It gets the instruction from the instruction register and decodes the instruction. It identifies the instruction to be performed.

Serial I/O Control:  It has two control signals named SID and SOD for serial data transmission.

Timing and Control unit:

  • It has three control signals ALE, RD (Active low) and WR (Active low) and three status signals IO/M(Active low), S0 and S1.

  • ALE is used for provide control signal to synchronize the components of microprocessor and timing for instruction to perform the operation.

  • RD (Active low) and WR (Active low) are used to indicate whether the operation is reading the data from memory or writing the data into memory respectively.

  • IO/M(Active low) is used to indicate whether the operation is belongs to the memory or peripherals.
  • http://www.8085projects.info/images/Control-Signals-Pic5.PNG

Interrupt Control Unit:

  • It receives hardware interrupt signals and sends an acknowledgement for receiving the interrupt signal.

PIN DIAGRAM AND PIN DESCRIPTION OF 8085
. Power supply and Clock frequency signals:

  • Vcc        + 5 volt power supply
  • Vss        Ground
  • X1, X2 :    Crystal or R/C network or LC network connections to set the frequency of internal clock generator.
  • The frequency is internally divided by two. Since the basic operating timing frequency is 3 MHz, a 6 MHz crystal is connected externally.
  • CLK (output)-Clock Output is used as the system clock for peripheral and devices interfaced with the microprocessor.

  • 8085 is a 40 pin IC, DIP package. The signals from the pins can be grouped as follows

  1. Power supply and clock signals
  1. Address bus
  1. Data bus
  1. Control and status signals
  1. Interrupts and externally initiated signals
  1. Serial I/O ports

http://www.8085projects.info/images/Pin-Diagram-Pic6.png
Fig (a) - Pin Diagram of 8085 & Fig(b) - logical schematic of Pin diagram.
2. Address Bus:

  • A8 - A15   (output; 3-state)
  • It carries the most significant 8 bits of the memory address or the 8 bits of the I/O address;

3. Multiplexed Address / Data Bus:

  • AD0 - AD7 (input/output; 3-state)
  • These multiplexed set of lines used to carry the lower order 8 bit address as well as data bus.
  • During the opcode fetch operation, in the first clock cycle, the lines deliver the lower order address A0 - A7.
  • In the subsequent IO / memory, read / write clock cycle the lines are used as data bus.
  • The CPU may read or write out data through these lines.

4. Control and Status signals:

  • ALE  (output) - Address Latch Enable.
  • This signal helps to capture the lower order address presented on the multiplexed address / data bus.
  • RD (output 3-state, active low) - Read memory or IO device.
  • This indicates that the selected memory location or I/O device is to be read and that the data bus is ready for accepting data from the memory or I/O device.
  • WR (output 3-state, active low) - Write memory or IO device.
  • This indicates that the data on the data bus is to be written into the selected memory location or I/O device.
  • IO/M (output) - Select memory or an IO device.
  • This status signal indicates that the read / write operation relates to whether the memory or I/O device.
  • It goes high to indicate an I/O operation.
  • It goes low for memory operations.

5. Status Signals:

  • It is used to know the type of current operation of the microprocessor.

http://www.8085projects.info/images/Status-Signals-Pic7.PNG
  • The microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale integration (LSI) or very-large-scale integration (VLSI) technique.

  • The microprocessor is capable of performing various computing functions and making decisions to change the sequence of program execution.

  • In large computers, a CPU implemented on one or more circuit boards performs these computing functions.

  • The microprocessor is in many ways similar to the CPU, but includes the logic circuitry, including the control unit, on one chip.

  • The microprocessor can be divided into three segments for the sake clarity, arithmetic/logic unit (ALU), register array, and control unit.

  • On receipt of an interrupt, the microprocessor acknowledges the interrupt by the active low INTA (Interrupt Acknowledge) signal.

Reset In (input, active low)
  • This signal is used to reset the microprocessor.
  • The program counter inside the microprocessor is set to zero.
  • The buses are tri-stated.

Reset Out (Output)
  • It indicates CPU is being reset.
  • Used to reset all the connected devices when the microprocessor is reset.

6. Interrupts and Externally initiated operations:

  • They are the signals initiated by an external device to request the microprocessor to do a particular task or work.
  • There are five hardware interrupts called,

Fig (a) - Pin Diagram of 8085 & Fig(b) - logical schematic of Pin diagram.
  • For both high and low states, the output Q draws a current from the input of the OR gate.
  • When E is low, Q enters a high impedance state; high impedance means it is electrically isolated from the OR gate's input, though it is physically connected. Therefore, it does not draw any current from the OR gate's input.
  • When 2 or more devices are connected to a common bus, to prevent the devices from interfering with each other, the tristate gates are used to disconnect all devices except the one that is communicating at a given instant.
  • The CPU controls the data transfer operation between memory and I/O device. Direct Memory Access operation is used for large volume data transfer between memory and an I/O device directly.
  • The CPU is disabled by tri-stating its buses and the transfer is effected directly by external control circuits.
  • HOLD signal is generated by the DMA controller circuit. On receipt of this signal, the microprocessor acknowledges the request by sending out HLDA signal and leaves out the control of the buses. After the HLDA signal the DMA controller starts the direct transfer of data.

READY (input)
  • Memory and I/O devices will have slower response compared to microprocessors.
  • Before completing the present job such a slow peripheral may not be able to handle further data or control signal from CPU.
  • The processor sets the READY signal after completing the present job to access the data.
  • The microprocessor enters into WAIT state while the READY pin is disabled.

8. Single Bit Serial I/O ports:
  • SID (input)            -  Serial input data line
  • SOD (output)        -  Serial output data line
  • These signals are used for serial communication.

http://www.8085projects.info/images/Interrupts-Pic8.png
7. Direct Memory Access (DMA):

Tri state devices:

http://www.8085projects.info/images/DMA-Pic9.png
  • 3 output states are high & low states and additionally a high impedance state.
  • When enable E is high the gate is enabled and the output Q can be 1 or 0 (if A is 0, Q is 1, otherwise Q is 0). However, when E is low the gate is disabled and the output Q enters into a high impedance state.
http://www.8085projects.info/images/DMA-Pic9A.png
http://www.8085projects.info/images/DMA-Pic9B.png


What is OPCODE? OPCODE is the machine language. ie, while we talk or write, we do it in english; because we understand english. But a machine cannot understand direct english. So, we translate english into its level to make a machine to understand. For example, there is a translator inside all computers which translate our english into Binary language for a computer to understand and perform the required operations. Similarly, a machine language which a Microprocessor can understand is the HEXA language. These hex codes are called OPCODES which makes a microprocessor to work. As there is no translator inside a Microprocessor, we directly fnd the OPCODES for each and every instruction and we feed it alone inside a trainer kit. Those opcodes with its description are given below. The OPCODE sheet without description is also given in the main page.
http://www.8085projects.info/image.axd?picture=2010%2f7%2fOpcode+sheet+of+8085+Microprocessor+with+description.JPG
http://www.8085projects.info/image.axd?picture=2010%2f7%2fOpcode+sheet+of+8085+Microprocessor(2).JPG
ADDRESSING MODES OF 8085







  • Every instruction of a program has to operate on a data.
  • The method of specifying the data to be operated by the instruction is called Addressing.
  • The 8085 has the following 5 different types of addressing.

               1. Immediate Addressing
               2. Direct Addressing
               3. Register Addressing
               4. Register Indirect Addressing
               5. Implied Addressing

1. Immediate Addressing:

  • In immediate addressing mode, the data is specified in the instruction itself. The data will be a part of the program instruction.
  • EX. MVI B, 3EH - Move the data 3EH given in the instruction to B register; LXI SP, 2700H.

2. Direct Addressing:

  • In direct addressing mode, the address of the data is specified in the instruction. The data will be in memory. In this addressing mode, the program instructions and data can be stored in different memory.
  • EX. LDA 1050H - Load the data available in memory location 1050H in to accumulator; SHLD 3000H



3. Register Addressing:

  • In register addressing mode, the instruction specifies the name of the register in which the data is available.
  • EX. MOV A, B - Move the content of B register to A register; SPHL; ADD C.

4. Register Indirect Addressing:

  • In register indirect addressing mode, the instruction specifies the name of the register in which the address of the data is available. Here the data will be in memory and the address will be in the register pair.
  • EX. MOV A, M - The memory data addressed by H L pair is moved to A register. LDAX B.

5. Implied Addressing:

  • In implied addressing mode, the instruction itself specifies the data to be operated.
  • EX. CMA - Complement the content of accumulator; RAL

8085 INSTRUCTION SET CLASSIFICATION
The 8085 instruction set can be classified into the following five functional headings.


1. DATA TRANSFER INSTRUCTIONS:

       It includes the instructions that move (copies) data between registers or between memory locations and registers. In all data transfer operations the content of source register is not altered. Hence the data transfer is copying operation.

Ex: (1) Mov A,B (2) MVI C,45H


2. ARITHMETIC INSTRUCTIONS:

       Includes the instructions, which performs the addition, subtraction, increment or decrement operations. The flag conditions are altered after execution of an instruction in this group.

Ex: (1) ADD A,B (2) SUI B,05H


3. LOGICAL INSTRUCTIONS:

       The instructions which performs the logical operations like AND, OR, EXCLUSIVE- OR, complement, compare and rotate instructions are grouped under this heading. The flag conditions are altered after execution of an instruction in this group.

Ex: (1) ORA A (2) ANI B, 01H


4. BRANCHING INSTRUCTIONS:

       The instructions that are used to transfer the program control from one memory location to another memory location are grouped under this heading.

Ex: (1) CALL (2) JMP 4100


5. MACHINE CONTROL INSTRUCTIONS:

       It includes the instructions related to interrupts and the instruction used to stop the program execution.

Ex: (1) NOP (2) END