KEMBAR78
DM Qa | PDF | Logic Gate | Feedback
0% found this document useful (0 votes)
5 views22 pages

DM Qa

The document provides detailed information about the 8085 microprocessor, including its 16-bit registers, interrupt priorities, and various operations such as binary and Gray code conversions. It also covers applications of flip-flops, types of shift registers, and the architecture of the 8085 microprocessor, including the function of the flag register and addressing modes. Additionally, it discusses the differences between combinational and sequential circuits, the problems associated with JK flip-flops, and the design of counters.

Uploaded by

palsubhrajit44
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)
5 views22 pages

DM Qa

The document provides detailed information about the 8085 microprocessor, including its 16-bit registers, interrupt priorities, and various operations such as binary and Gray code conversions. It also covers applications of flip-flops, types of shift registers, and the architecture of the 8085 microprocessor, including the function of the flag register and addressing modes. Additionally, it discusses the differences between combinational and sequential circuits, the problems associated with JK flip-flops, and the design of counters.

Uploaded by

palsubhrajit44
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
You are on page 1/ 22

List the 16 – bit registers of 8085 microprocessor.

Mention the purpose of SID and SOD lines


SID and SOD and these signals are used for serial communication.. SOD (Serial output data
line) − The output SOD is set/reset as specified by the SIM ins
instruction.
truction. SID (Serial input data
line) − The data on this line is loaded into accumulator whenever a RIM instruction is executed.

List priority of interrupts in 8085?


Priority of Interrupts –
When microprocessor receives multiple interrupt requests simul
simultaneously,
taneously, it will
execute the interrupt service request (ISR) according to the priority of the
interrupts.

Express the decimal 19 in Gray code


(19)10=(10011)2
Gray code =11101

Add the number +38 and -22


22 using 2’s complement method
+38=32+4+2
So binary of 38=100110
22=0+16 +0+4+2+0=(010110)2
-22= (101010)2
Now 38-22
100110
101010
010000
10000=16
So result=16
List some application of flip-flop

Applications of Flip-Flops
In this article, we have summed up the different types of flip-flops that we use in digital electronic
circuits. You can find the various applications of the flip-flops below:

 Frequency dividers
 Counters
 Storage registers
 Shift registers
 Data storage
 Bounce elimination switch
 Latch
 Data transfer
 Memory
 Registers

a) Convert (454.625)10 to binary octal & hexadecimal

b) State and prove DeMorgan’s theorem


c) Simplify the expression 𝐴𝐵 + 𝐴𝐵𝐶 + 𝐴(𝐵 + 𝐴𝐵 )

[4+ 2+ 4= 10]
Express the function Y=A+𝐵 𝐶 in Canonical SOP and POS form
Given:
Y = A + B̅C
The function is plotted on K map below,

Y = ∑m(1, 4, 5, 6, 7)=A’B’C+AB’C’+AB’C+ABC+ABC’
=A’B’C+AB’C’+AB’C+ABC+ABC’
Converting the function from SOP to POS form
Y = ΠM(0, 2, 3)
= M0 M2 M3=(A’+B’+C’)(A’+B+C)(A’+B+C’)

Using K-mapmap simplify the expression ∑ (0,2,3,6,7) + ∑ (8,10,11,15) and implement the
circuit using NOR gatre

The K-map
map for the given SOP representation is drawn as:

Taking the
e don't care that helps in the minimization, we get the simplified expression as:

F(A, B, C, D) = A̅ C + B̅ D̅

Implement 8:1 MUX using two 4:1 MUX


S2 S1 S0 Y
0 0 0 I0
0 0 1 I1
0 1 0 I2
0 1 1 I3
1 0 0 I4
1 0 1 I5
1 1 0 I6
1 1 1 I7

Truth Table

When S2 = 0 then the first MUX gets enabled with the help of NOT gate the first
MUX will get 1 signal at Enable(E) and MUX 1 will be enabled and S2 is applied
directly to the second MUX so the second mux received 0 at Enabled(E) so second
MUX gets disabled.

When S2 = 1, the first MUX is disabled because the first MUX receives a 0 signal
at Enable(E) due to the NOT gate. As a result, MUX 1 is disabled, and S2 is
applied directly to the second MUX, so Second MUX gets enabled.

This concludes that only 1 MUX is used at a time. Also, We conclude that at a time
only one output is produced.

Module-2
Answer any one question

Discuss the difference between combinational circuit and sequential circuit. Give
some example of each.
Difference Between Combinational and Sequential Circuit

Parameters Combinational Circuit Sequential Circuit

Meaning and It is a type of circuit that generates It is a type of circuit in which the output does not
Definition an output by relying on the input it only rely on the current input. It also relies on the
receives at that instant, and it stays previous ones.
independent of time.

Feedback A Combinational Circuit requires no The output of a Sequential Circuit, on the other
feedback for generating the next hand, relies on both- the previous feedback and
output. It is because its output has the current input. So, the output generated from
no dependency on the time the previous inputs gets transferred in the form of
instance. feedback. The circuit uses it (along with inputs) for
generating the next output.

Performance We require the input of only the In the case of a Sequential Circuit, the
current state for a Combinational performance is very slow and also comparatively
Circuit. Thus, it performs much lower. Its dependency on the previous inputs
faster and better in comparison makes the process much more complex.
with the Sequential Circuit.

Complexity It is very less complex in This type of circuit is always more complex in its
comparison. It is because it nature and functionality. It is because it
basically lacks implementation of implements the feedback, depends on previous
feedback. inputs and also on clocks.

Elementary Logic gates form the building/ Flip-flops form the building/ elementary blocks of a
Blocks elementary blocks of a Sequential Circuit.
Combinational Circuit.

Operation One can use these types of circuits You can mainly make use of these types of circuits
for both- Boolean as well as for storing data.
Arithmetic operations.

What is the problem associated with level triggered JK flip-flop? How master slave
jk flipflop solve the problem explain with proper diagram
The problem associated with level triggered JK flip-flop is Race Around
Condition In JK Flip-flop – For J-K flip-flop, if J=K=1, and if clk=1 for a long
period of time, then Q output will toggle as long as CLK is high, which makes
the output of the flip-flop
flop unstable or uncertain. This problem is called race
around condition in J-K flip--flop.
This problem (Race around Condition) can be avoided by:
 Master Slave JK flip flop.
 Edge trigger JK flip flop

Master Slave JK flip flop

The Master-Slave Flip-Flop Flop is basically a combination of two JK flip-flops


flip
connected together in a series configuration. Out of these, one acts as
the “master” and the other as a “slave”.. The output from the master flip flop is
connected to the two o inputs of the slave flip flop.
In addition to these two flip
flip-flops, the circuit also includes an inverter.
inverter The
inverter is connected
ed to clock pulse in such a way that the inverted clock pulse
is given to the slave flip-flop.
flop. In other words if CP=0 for a master flip-flop,
flip then
CP=1 for a slave flip-flop
flop and if CP=1 for master flip flop then it becomes 0 for
slave flip flop.
Edge trigger JK flip flop
In edge trigger jk flip flop input clock time is very less so jk flip flop toggle only
once

a) Draw the logic diagram of mod 24 ripple counters


24=16+8(11000)B

What is the primary disadvantage of an asynchronous counter?


The
he main disadvantages with asynchronous counters is that there is a small delay
between the arrival of the clock pulse at its input and it being present at its output
due to the internal circuitry of the gate. In asynchronous circuits this delay is called
the Propagation Delay.
In some high frequency cases this delay can produce false output counts. In large
bit ripple counter circuits, if the delay of the separate stages is all added together to
give a summed delay at the end of the counter chain the difference in time between
the input signal and the counted output signal can be very large. This is why the
Asynchronous Counters generally not used in high frequency counting circuits
were large numbers of bits are involved. Also, the outputs from the counter do not
have a fixed time relationship with each other and do not occur at the same instant
in time due to their clocking sequence.

Design a synchronous counter with following sequence


000000100100:011010001010110011100000 ………
What are different types of shift register? Draw logic diagram of 5 bit serial in
serial out shift register
Types of Shift Registers

Shift registers are classified into four types and working of shift registers are
discussed below.
 Serial in Serial out (SISO) Shift Register
 Serial in parallel out (SIPO) Shift Register
 Parallel in Serial out (PISO) Shift Register
 Parallel in Parallel out (PIPO) Shift Register

Logic diagram of 5 bit serial in serial out shift register

Draw and explain architecture of 8085 microprocessor


The figure below represents the architectural representation of 8085 microprocessor:
1. Arithmetic and Logic Unit (ALU) :
It is used to perform mathematical operations like: addition, multiplication, subtraction,
division, decrement, increment, etc.

2. Flag Register :
It is an 8-bit register that contains five flip-flops to serve as a status flags. The flip-flops
are reset or set according to the conditions which arise during an arithmetic or logical
operation.
o Carry Flag (CS)
o Parity Flag (P)
o Auxiliary Carry Flag (AC)
o Zero Flag(Z)
o Sign Flag(S)

3. Accumulator :
The accumulator is an 8-bit register associated with the ALU. It is used to hold one of the
operands of an arithmetic and logical operation. The final result of an arithmetic or
logical operation is also placed in the accumulator.

4. General Purpose Registers :


The 8085 microprocessor contains six 8-bit general purpose registers. They are: B, C, D,
E, H ,L,W,Z register.
To hold data of 16-bit a combination of two 8-bit registers can be employed.
The combination of two 8-bit registers is called register pair. The valid register pairs in
the 8085 are: D-E, B-C and H-L.

5. Program Counter :
Program Counter holds the address value of the memory to the next instruction that is to
be executed. It is a 16-bit register.

6. Stack Pointer :
It is a 16-bit special function register. It is used as a memory pointer (16-bit address) for
denoting the stack position in memory. The Stack pointer is decremented each time when
data is loaded into the stack and incremented when data is retrieved from the stack. Stack
pointer always points to the top of the stack memory The stack pointer (SP) controls the
addressing of the stack. The Stack Pointer contains the address of the top element of data
stored in the stack.

[ The stack pointer refers to data, not code. The stack is a major memory area where data
is kept and your local variables are created and deallocated (low-cost automatic memory
management).]

7. Temporary Register :
It is a 8-bit register that holds data values during arithmetic and logical operations.

8. Instruction register and decoder :


It is a 8-bit register that holds the instruction code that is being decoded. The instruction
is fetched from the memory.

9. Timing and control unit :


The timing and control unit comes under the CPU section, and it controls the flow of data
from CPU to other devices. It is also used to control the operations performed by the
microprocessor and the devices connected to it. There are certain timing and control
signals like: Control signals, DMA Signals, RESET signals, Status Signal.

10. Interrupt control :


Whenever a microprocessor is executing a main program and if suddenly an interrupt
occurs, the microprocessor shifts the control from the main program to process the
incoming request. After the request is completed, the control goes back to the main
program. There are 5 interrupt signals in 8085 microprocessors: INTR, TRAP, RST 7.5,
RST 6.5, RST 5.5

The TRAP has the highest priority among interrupts. The order of priority of interrupts is as
follows:

o TRAP (Highest priority)


o RST 7.5
o RST 6.5
o RST 5.5
o INTR (Lowest priority).

11. Address bus and data bus :


Data bus is bidirectional and carries the data which is to be stored. Address bus is
unidirectional and carries location where data is to be stored.
12. Serial Input/output control :
It controls the serial data communication by using Serial input data and Serial output
data.

Explain the operation of different flag register in 8085


13. Flag Register :
It is an 8-bit register that contains five flip-flops to serve as a status flags. The flip-flops
are reset or set according to the conditions which arise during an arithmetic or logical
operation.
o Carry Flag (CS)
o Parity Flag (P)
o Auxiliary Carry Flag (AC)
o Zero Flag(Z)
o Sign Flag(S)
o Sign Flag: It occupies the seventh bit of the flag register, which is also known as
the most significant bit. It helps the programmer to know whether the number
stored in the accumulator is positive or negative. If the sign flag is set, it means
that number stored in the accumulator is negative, and if reset, then the number is
positive.
o Zero Flag:: It occupies the sixth bit of the flag register. It is set, when the
operation performed in the ALU results in zero(all 8 bits are zero), otherwise it is
reset. It helps in determining if two numbers are equal or not.
o Auxiliary Carry Flag: It occupies the fourth bit of the flag register. In an
arithmetic operation, when a carry flag is generated by the third bit and passed on
to the fourth bit, then Auxiliary Carry flag is set. If not flag is reset. This flag is
used internally for BCD(Binary-Coded decimal Number) operations.
Note – This is the only flag register in 8085 which is not accessible by user.
o Parity Flag: It occupies the second bit of the flag register. This flag tests for
number of 1’s in the accumulator. If the accumulator holds even number of 1’s,
then this flag is set and it is said to even parity. On the other hand if the number of
1’s is odd, then it is reset and it is said to be odd parity.
o Carry Flag: It occupies the zeroth bit of the flag register. If the arithmetic
operation results in a carry(if result is more than 8 bit), then Carry Flag is set;
otherwise it is reset.

What are different addressing mode in 8085 explain with example


Addressing modes in 8085 microprocessor

The way of specifying data to be operated by an instruction is called addressing mode.

Types of addressing modes


In 8085 microprocessor there are 5 types of addressing modes:

1. Immediate Addressing Mode –


In this mode the 8 bit or 16 bit data is specified in the instruction itself as it’s one of the
operand. If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then the
instruction will be of 3 bytes.
Examples:
MVI B 45 (move the data 45H immediately to register B)
LXI H 3050 (load the H-L pair with the operand 3050H immediately)
JMP address (jump to the program counter address immediately)

2. Direct Addressing Mode –


In this addressing mode memory address of the data is directly given in the
instruction itself.
Examples:
LDA 2050 (load the contents of memory location 2050 into accumulator A)
LHLD 2050 (load contents of memory 2050 into L register and contents of memory 2051 into
H register)

3. Register Addressing Mode –


In this mode the operands are registers of microprocessor. Therefore the operation is
performed within various registers of the microprocessor.
Examples:
MOV A, B (move the contents of register B to register A)
ADD B (add contents of registers A and B and store the result in register A)
INR A (increment the contents of register A by one)

4. Register Indirect Addressing Mode –


In this mode the memory address of the data is specified by the register pair.
Examples:
MOV A, M (move the contents of the memory location pointed by the H-L pair to the
accumulator)
LDAX B (move contents of address of B-C register to the accumulator)
5. Implied/Implicit Addressing Mode –
In implied/implicit addressing mode the operand is hidden and the data to be operated is
available in the instruction itself.
Examples:
CMA (finds and stores the 1’s complement of the contents of accumulator A and store in A)
RRC (rotate accumulator A right by one bit)
RLC (rotate accumulator A left by one bit)

Explain the difference between RLC and RAL instruction in 8085


RLC: - Each binary bit of the accumulator is rotated left by one position. Bit D7 is placed in
the position of D0 as well as in the Carry flag. CY is modified according to bit D7. Any other
bit is not affected.
RAL: - Each binary bit of the accumulator is rotated left by one position through the Carry
flag. Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant
position D0. CY is modified according to bit D7.

Explain the operation od SIM instruction in 8085 microprocessor


Set Interrupt Mask (SIM) :
In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte
instruction and it is a multi-purpose instruction.
The main uses of SIM instruction are –
 Masking/unmasking of RST7.5, RST6.5, and RST5.5
 Reset to 0 RST7.5 flip-flop.
flop.
 Perform serial output of data.

5+2+5=12

What are the differences between memory m


mapped
apped IO and IO mapped IO

IO devices are accessed like They cannot be accessed like


Addressing any other memory location. any other memory location.

They are assigned with 16


16- They are assigned with 8-bit
8
Address Size bit address values. address values.

The instruction used are The instruction used are IN


Instructions Used LDA and STA, etc. and OUT.

Cycles involved during


Cycles involved during operation are IO read and IO
operation are Memory Read, writes in the case of IO
Cycles Memory Write. Mapped IO.

Registers Any register can Only Accumulator can


Communicating communicate with the IO communicate with IO devices
device in case of Memory in case of IO Mapped IO.
Mapped IO.

216 IO ports are possible to Only 256 I/O ports are


be used for interfacing in available for interfacing in
Space Involved case of Memory Mapped IO. case of IO Mapped IO.

During writing or read cycles During writing or read cycles


(IO/M` = 0 ) in case of (IO/M` = 1) in case of IO
IO/M` signal Memory Mapped IO. Mapped IO.

What is vectored and non-vectored Interrupts. Mention different vector interrupt.


Vectored and Non-Vectored Interrupts –
Vectored Interrupts are those which have fixed vector address (starting address
of sub-routine). For hardware interrupt Vector Addresses are calculated by the
formula 8 * TYPE
INTERRUPT VECTOR ADDRESS

TRAP (RST 4.5) 24 H

RST 5.5 2C H

RST 6.5 34 H

RST 7.5 3C H

For Software interrupts vector addresses are given by:

INTERRUPT VECTOR ADDRESS

RST 0 00 H

RST 1 08 H

RST 2 10 H

RST 3 18 H

RST 4 20 H

RST 5 28 H
INTERRUPT VECTOR ADDRESS

RST 6 30 H

RST 7 38 H

Non-Vectored Interrupts are those in which vector address is not predefined.


The interrupting device gives the address of sub-routine for these
interrupts. INTR is the only non-vectored interrupt in 8085 microprocessor.

Explain using a program to generate 1ms delay in 8085 microprocessor which is


having 1MHz clock frequency.

Say value of resister C = X


MVI C,X ; (7)
LOOP: DCR C ; (4)
JNZ LOOP ; (10/7)

Clock frequency of the system = 1 MHz


Clock period= 1/T= 1 μs
Time to execute MVI C,FFH = 7 T states * 1= 7 μs
Time Delay in Loop TL= {(X-1)*(10+4)*1 +7)μs
Now total time delay
=7us+{(X-1)*14*1 +7) us=1ms=1000us
(X-1)*14=1000-14
14X=1000
X==71.472=48H

SO program is
MVI C,48H ; (7)
LOOP: DCR C ; (4)
JNZ LOOP ; (10/7)

Write an assembly language program to convert binary code in to ASCII code


MOV A,M
MOV B,A
STC
CMC
SUI 0AH
JC NUM
ADI 41H
JMP STORE
MOV A, B
ADI 30H
INX H
MOV M,A
HLT

Write an assembly language program for converting a 2 digit BCD number to its
binary equivalent using 8085 microprocessor
Examples:
Input : 72(BCD) (0111 0010)

Output : 7*10+2=72(D) = 48H (in hexadecimal) (0011 0000)2

Algorithm:
1. Load the BCD number fro
from memory in the accumulator
2. Unpack the 2 digit BCD number into two separate digits. Let the left digit be
BCD1 and the right one BCD2
3. Multiply BCD1 by 10 and add BCD2 to it and store the result to next memory
location

LXI H,2000
MOV A,M
ANI 0FH
MOV B,A
MOV A,M
RRC
RRC
RRC
RRC
ANI 0FH
MOV C,A
SUM: ADD A
DCR C
JNZ SUM
ADD B
INX H
MOV M,A

You might also like