5 DTM
5 DTM
5 DTM
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
WINTER – 19EXAMINATION
Subject Name: Digital Techniques and Microprocessor Model Answer Subject Code: 22323
Important Instructions to examiners:
1) The answers should be examined by key words and not as word-to-word as given in themodel answer
scheme.
2) The model answer and the answer written by candidate may vary but the examiner may tryto assess the
understanding level of the candidate.
3) The language errors such as grammatical, spelling errors should not be given moreImportance (Not applicable
for subject English and Communication Skills.
4) While assessing figures, examiner may give credit for principal components indicated in thefigure. The figures
drawn by candidate and model answer may vary. The examiner may give credit for anyequivalent figure drawn.
5) Credits may be given step wise for numerical problems. In some cases, the assumed constantvalues may vary
and there may be some difference in the candidate’s answers and model answer.
6) In case of some questions credit may be given by judgement on part of examiner of relevant answer based on
candidate’s understanding.
7) For programming language papers, credit may be given to any other program based on equivalent concept.
10-Total
Q.1 Attempt any FIVE of the following:
Marks
a) List one application of each of following 2M
(i) Gray code
(ii) ASCII code
Ans: (i) Gray codes are used for error correction in digital communication system. 1M
(ii)ASCII codes are used for identifying characters and numerals in a keyboard. Each
b) State the principle of multiplexer and mention its two types. 2M
Ans: Circuit : 2M
Page 1/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Ans: (Note: Consider any 4) 2M
Features of 8086 microprpcessor
1)It requires +5v power supply.
2)It has 20 bit address bus,can acceess 220 =1MB memory location.
3)16 bit data bus.
4)It is a 16 bit processor having 16 bit ALU,16 bit registers.
5)It has instruction queue which is capable of storing 6 instruction bytes from the memory
for faster processing.
6)It has pipelining,fetch and execute stagefor improving performance.
7)It has 256 vectored interrupts.
8)Clock range is 5-10 MHz.
e) Convert the following numbers into Hexadecimal number. 2M
(i) (10110111)2 = (?)16
(ii) (567)8 = (?)16
Ans: (i) (10110111)2 =(B7)16 2M
(ii) (567)8 =(177)16
f) State four characteristics of RISC processor. 2M
Ans: 1)Reduced instruction set. 2M
2)Simple addressing mode.
3)RISC processor consumes less power and has high performance.
4)Instruction is of uniform fixed length.
5)Large number of registers.
g) Give example of any two types of addressing mode of 8086 2M
Ans: 1)Direct addressing mode
Eg:MOV CL,[1234]
2)Immediate addressing mode
Eg:MOV AX,0005H Any two
3)Register addressing mode 1M each
Eg: MOV AX,BX
4)Base indexed addressing mode
Eg:MOV CL,[BX+SI]
a) Perform the following subtaction using 1’s compliment and 2’s compliment (1010 0101)2
4M
– (1110 1110)2.
Ans:
2M
2M
Page 3/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Ans: 4M
D Qn+1 T Qn+1
0 0 0 Qn
1 1 1 ̅̅̅̅
Reduce the following Boolean expression using laws of Boolean algebra and realize
a) using logic gates. 4M
Y = (A + BC) (B + ̅ A)
Page 4/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
2M
Ans:
2M
Write an assembly language program to transfer block of 10 numbers from one memory
b) location to another. 4M
(Assume suitable data.)
Ans: .model small 4M
.data
src_arr dw 1,2,3,4,5,6,7,8,9,10
.code
mov ds, ax
up:
Page 5/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
mov [di] , ax ;write number to destination array
loop up ;check word counter for zero ,if not zero then read up number from
array
ends
end
For the given circuit, identify the inputs and outputs. Name the circuit and draw its
truth table. Refer Fig .No. 1.
c) 4M
Ans: 4M
Page 6/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Simplify the given K-map using standard form and realize the circuit using gates. Ƒ
Refer Fig. No. 2.
d) 4M
Ans: 2M
2M
a) Write an assembly language program to find the sum of series of ten numbers 4M
stored in memory.(Assume suitable data.)
Ans: Sum Of Series: 4M
Page 7/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Page 8/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
c) Differentiate between sequential and combinational logic circuits. (Any four points) 4M
Ans: 4M
Page 9/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Ans: Use of Flag Register: Microprocessor 8086 has 16 bit flag register among which 9 bits 2M
are active. The purpose of flag register is to indicate the status of the processor
Depending upon the value of result after any arithmetic and logical operation the flag
bits become set (1) or reset (0).
1. Carry Flag (CF): Set 1 if there is carry out of MSB position.
2. Auxiliary Flag (AF): Set 1 if carry from lower nibble to upper nibble.
3. Parity Flag (PF): Set 1 if operation contains even number.
4. Zero Flag (ZF): Set 1 if result of arithmetic or logical operation is zero.
5. Sign Flag (SF): Set 1 if result of operation is negative.
6. Overflow Flag (OF): Set 1 if result is too large to fit in the numbers bits available to
accommodate it.
7. Control Flags:
(i) Trap Flag (TF): Set 1 if program can be run in single step.
(ii) Interrupt Flag (IF): Set 1 if INTR of 8086 is enabled.
(iii) Direction Flag (DF): Set 1 if string bytes are write or read from higher memory
address to lower memory address.
Use of Segment Register: The 8086 has four segment register of 16 bit each. i.e. 2M
CS,DS,SS and ES. The code segment CS register used to address a memory location
in the code segment of memory. The data segment point to data segment of memory
where the data is stored the extra segment ES used to address the segment is
additional data segment. The Stack segment SS register is used to point location in
stack segment of the memory, used to store data temporarily on the stack.
e) Describe the construction of half adder using K – map. 4M
Ans: Half Adder using k-map: 2M
Half adder is a combinational logic circuit with two inputs and two output , circuit has two
outputs namely “carry” and “sum”, and two inputs A and B.
Page 10/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
2M
Write an assembly language program to find the factorial of a number using looping
(a) 6M
process.
Ans: The JK flip flop is basically a gated SR flip-flop with the addition of a clock input circuitry
that prevents the illegal or invalid output condition that can occur when both inputs S and R
are equal to logic level “1”. Due to this additional clocked input, a JK flip-flop has four
Page 12/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
possible input combinations, “logic 1”, “logic 0”, “no change” and “toggle”. The symbol for a
JK flip flop is similar to that of an SR Bistable Latch as seen in the previous tutorial except
for the addition of a clock input.
The Basic JK Flip-flop
2M
Both the S and the R inputs of the previous SR bistable have now been replaced by two inputs
called the J and K inputs. Then this equates to: J = S and K = R.
The two 2-input AND gates of the gated SR bistable have now been replaced by two 3-
input NAND gates with the third input of each gate connected to the outputs at Q and Q. This
cross coupling of the SR flip-flop allows the previously invalid condition of S = “1” and R =
“1” state to be used to produce a “toggle action” as the two inputs are now interlocked.
If the circuit is now “SET” the J input is inhibited by the “0” status of Q through the
lower NAND gate. If the circuit is “RESET” the K input is inhibited by the “0” status
of Q through the upper NAND gate. As Q and Q are always different we can use them to
control the input. When both inputs J and K are equal to logic “1”, the JK flip flop toggles as
shown in the following truth table.
The Truth Table for the JK Function
CLK J K Qn+1 Qn+1 Description
2M
1,0,↑ X X Qn Qn No Change
↓ 0 0 Qn Qn No Change
↓ 0 1 0 1 Reset Condition
↓ 1 0 1 0 set Condition
↓ 1 1 Q n Q n Toggle condition
Then the JK flip-flop is basically an SR flip flop with feedback which enables only one of its
two input terminals, either SET or RESET to be active at any one time thereby eliminating
the invalid condition seen previously in the SR flip flop circuit.
2M
Also when both the J and the K inputs are at logic level “1” at the same time, and the clock
input is pulsed “HIGH”, the circuit will “toggle” from its SET state to a RESET state, or visa-
versa. These results in the JK flip flop acting more like a T-type toggle flip-flop when both
terminals are “HIGH”.
Although this circuit is an improvement on the clocked SR flip-flop it still suffers from timing
problems called “race” if the output Q changes state before the timing pulse of the clock input
has time to go “OFF”. To avoid this the timing pulse period ( T ) must be kept as short as
possible (high frequency). As this is sometimes not possible with modern TTL IC‟s the much
improved Master-Slave JK Flip-flop was developed.
(c) Differentiate between CISC and RISC and justify use of each of them in practice. 6M
Ans: The architecture of the Central Processing Unit (CPU) operates the capacity to function from 2M
Page 13/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
“Instruction Set Architecture” to where it was designed. The architectural design of the CPU
is Reduced instruction set computing (RISC) and Complex instruction set computing (CISC).
CISC has the capacity to perform multi-step operations or addressing modes within one
instruction set. It is the CPU design where one instruction works several low-level acts. For
instance, memory storage, loading from memory, and an arithmetic operation. Reduced
instruction set computing is a Central Processing Unit design strategy based on the vision that
basic instruction set gives a great performance when combined with a
microprocessor architecture which has the capacity to perform the instructions by using some
microprocessor cycles per instruction. The hardware part of the Intel is named as Complex
Instruction Set Computer (CISC), and Apple hardware is Reduced Instruction Set Computer
(RISC).
Sr.
CISC RISC
No.
A large number of instructions are present Very fewer instructions are present.
1 in the architecture. The number of instructions are
generally less than 100. 4M
Some instructions with long execution No instruction with a long execution
times. These include instructions that copy time due to very simple instruction set.
an entire block from one part of memory to Some early RISC machines did not
2 another and others that copy multiple even have an integer multiply
registers to and from memory. instruction, requiring compilers to
implement multiplication as a sequence
of additions.
Variable-length encodings of the Fixed-length encodings of the
3
instructions. instructions are used.
Example: IA32 instruction size can range Example: In IA32, generally all
4 instructions are encoded as 4 bytes.
from 1 to 15 bytes.
Multiple formats are supported for Simple addressing formats are
specifying operands. A memory operand supported. Only base and displacement
5 specifier can have many different addressing is allowed.
combinations of displacement, base and
index registers.
6 CISC supports array. RISC does not supports array.
Arithmetic and logical operations can be Arithmetic and logical operations only
applied to both memory and register use register operands. Memory
operands. referencing is only allowed by load and
7
store instructions, i.e. reading from
memory into a register and writing
from a register to memory respectively.
Implementation programs are hidden Implementation programs exposed to
from machine level programs. The ISA machine level programs. Few RISC
8
provides a clean abstraction between machines do not allow specific
programs and how they get executed. instruction sequences.
9 Condition codes are used. No condition codes are used.
Registers are being used for procedure
The stack is being used for procedure arguments and return addresses.
10
arguments and return addresses. Memory references can be avoided by
some procedures.
Page 14/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
To speed up program execution, the Bus Interface Unit(BIU) fetches as many as 6 instruction
bytes ahead of time from the memory and these are held for execution unit in the (FIFO) 3M
group of registers called QUEUE.
The BIU can fetch instruction bytes while EU is decoding or executing an instruction which
does not require the use of buses. When the EU is ready for the next instruction, it simply
reads the instruction from the QUEUE in the BIU. This is much faster than sending out
addresses to system memory and waiting for the memory to send back the next instruction
byte.
The Queue is refilled when at least two bytes are empty as 8086 has a 16-bit data bus.
In case of Branch instructions however, the instructions pre-fetched in the queue are of no
use. Hence the QUEUE has to be dumped and new instructions are fetched from the
destination addresses specified by the branch instructions.
Page 15/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Physical Address Generation:
The 8086 addresses a segmented memory. The complete physical address which is 20-bits
long is generated using segment and offset registers each of the size 16-bit.The content of a
segment register also called as segment address, and content of an offset register also called
as offset address. To get total physical address, put the lower nibble 0H to segment address
and add offset address. The figure shows formation of 20-bit physical address.
3M
Page 16/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
1. Implementing an Inverter Using only NAND Gate The figure shows two ways in which a
NAND gate can be used as an inverter (NOT gate).All NAND input pins connect to the input
signal A gives an output A‟.
2. Implementing AND Using only NAND Gates An AND gate can be replaced by NAND
gates as shown in the figure (The AND is replaced by a NAND gate with its output
complemented by a NAND gate inverter).
3. Implementing OR Using only NAND Gates An OR gate can be replaced by NAND gates
as shown in the figure (The OR gate is replaced by a NAND gate with all its inputs
complemented by NAND gate.
inverters)
2. Implementing OR Using only NOR Gates An OR gate can be replaced by NOR gates as
shown in the figure (The OR is replaced by a NOR gate with its output complemented by a
NOR gate inverter).
3. An AND gate can be replaced by NOR gates as shown in the figure (The AND gate is
replaced by a NOR gate with all its inputs complemented by NOR gate inverters)
(c) Describe the use of shift and rotate instructions as well as string instructions with the 6M
Page 17/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
help of one relevant examples of each.
Working:
Working:
Page 18/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
Syntax: SAL Register, Bits to be shifted
Example: SAL CL, 2
Working:
Working:
Working:
Working:
Working:
STRING INSTRUCTIONS
String is a group of bytes/words and their memory is always allocated in a sequential order.
1. MOVS/MOVSB/MOVSW Instruction :
This instruction copies a byte or word from a location in the data segment to a location in the
extra segment. The offset of the source byte or word in the data segment must be in the SI
register. The offset of the destination in the extra segment must be contained in the DI
register. For multiple byte or multiple word moves the number of elements to be moved is put
in the CX register so that it can function as a counter. After the byte or word is moved SI and
DI are automatically adjusted to point to the next source and the next destination. If the
direction flag is 0, then SI and DI will be incremented by 1 after a byte move and they will
incremented by 2 after a word move. If the DF is a 1, then SI and DI will be decremented by
1 after a byte move and they will be decremented by 2 after a word move. MOVS affects no
flags.
2. CMPS/CMPSB/CMPSW Instruction :
A 8086 String Instructions is a series of the same type of data items in sequential memory
locations. The CMPS instruction can be used to compare a byte in one string with a byte in
another string or to compare a word in one string with a word in another string. SI is used to
hold the offset of a byte or word in the source string and DI is used to hold the offset of a byte
or a word in the other string. The comparison is done by subtracting the byte or word pointed
to by DI from the byte or word pointed to by SI. The AF, CF, OF, PF, SF, and ZF flags are
affected by the comparison, but neither operand is affected.
Page 20/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)
__________________________________________________________________________________________________
3. SCAS/SCASB/SCASW Instruction :
SCAS compares a string byte with a byte in AL or a string word with word in AX. The
instruction affects the flags, but it does not change either the operand in AL (AX) or the
operand in the 8086 String Instructions. The string to be „scanned must be in the extra
segment and DI must contain the offset of the byte or the word to be compared.
After the comparison DI will be automatically incremented or decremented according to
direction flag, to point to the next element in the two strings (if DF = 0, SI and DI ↑ ) CX
functions as a counter which is decremented after each comparison. This will go on until CX
= 0. SCAS affects the AF, CF, OF, PF, SF and ZF flags.
SCASB says compare 8086 String Instructions as bytes and SCASW says compare strings as
words.
4. LODS/LODSB/LODSW Instruction :
This instruction copies a byte from a string location pointed to by SI to AL, or a word from a
string location pointed to by SI to AX. LODS does not affect any flags. LODSB copies byte
and LODSW copies a word.
5. STOS/STOSB/STOSW Instruction :
The STOS instruction copies a byte from AL or a word from AX to a memory location in the
extra segment. DI is used to hold the offset of the memory location in the extra segment.
After the copy, DI is automatically incremented or decremented to point to the next string
element in memory. If the direction flag, DF, is cleared, then DI will automatically be
incremented by one for a byte string or incremented by two for a word 8086 String
Instructions. If the direction flag is set, DI will be automatically decremented by ono for a
byte string or decremented by two for a word string. STOS does not affect any flags. STOSB
copies byte and STOSW copies a word.
Page 21/ 21
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 2 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
A. (B.C) = (A.B)C
7. Distributive Law
A.(B+C) = A.B + A.C.
8. A.(A+B) = A
9. A. (A + B) = AB
10. A = A
11. De-Morgan's theorem
A. B = A + B
12. A + 0 = A
13. A + 1 = 1 A + 1 =1 OR law
14. A + A = A
15. A + A = 1
16. A + B = B + A
17. A + (B + C) = (A + B) + C
18. A + (B. C) = (A + B) . (A + C)
19. A + AB = A
20. A + AB = A + B
21. A + AB = A+ B
22. A + AB= A + B
23. A + B = A . B
d) Define: 2M
i) Bit
ii) Nibble
Ans.
i) Bit: Bit is a Binary digit which is the smallest unit of data in
digital systems. A bit has a single binary value, either 0 or 1. Each
definitio
ii) Nibble: A group of 4 bits is referred as Nibble. Eg: 1011, 1001, n 1M
1100
Page 3 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
1M
1M
Maxterm:
Each individual term in the canonical POS (Product of Sums) form is
called as Maxterm.
Example:
Page 4 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Correct
diagram
OR 2M
OR
Page 5 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
D flip
flop
Symbol -
½M;
Truth
Symbol Truth Table table-
Applications of D flip flop: 1M;
1. used as a Latch One
2. Divide - by - 4 Ripple Counter applicati
3. Ring Counter on -½M
4. Johnson Counter
5. Used in registers
T flip flop:
T flip
flop
Symbol -
½M;
Truth
table-
Symbol Truth Table 1M;
One
Applications of T flip flop: applicati
1. As the basic building block of counter. on -½M
2. In frequency divider circuits.
3. Used in D to A converter (DAC)
b) Minimize the following function using K-map. 4M
F = Σm (0,1,2,3,11,12,14,15).
(Note: Any other equations shall be considered).
Ans.
Page 6 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Four
variable
K-map
2M
Final
equation
2M
OR
Minimized Expression
F = 𝑨𝑩 + A B𝑫 + A C D
Page 7 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
2M
Page 8 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
2M
Page 9 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
= AB + A(B + C) ∵ 1 + C = C, B + BC = B + C
= AB + AB + AC
= B (A + A) + AC ∵ A+A=1 2M
= B (1) + AC
= B + 𝐀C
ii) Y = (A + B) (A + 𝐁) (𝐀 + 𝐁)
=(A.A + A B + AB + B B) (A + B)
= (A + A B + AB + 0) (A+ B) (∵ A.A = A, B B =0)
= A (1 + B + B) (A + B)
2M
= A (1) (A + B) (∵ B+B=1, 1+A=1)
= A (A + B)
= A A + AB
= 0 + AB (∵ A A = 0)
= AB
3. Attempt any THREE of the following: 12
a) Draw 8086 architecture block diagram and state the functions of 4M
EV and B/V.
(Note: EV and B/V are considered as EU and BIU).
Ans.
Diagram
2M
Page 10 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
BIU: It handles all transfers of data and addresses on the buses for the
execution unit.
Sends out addresses
Fetches instructions from memory. 1M for
Read / write data from/to ports and memory i.e. handles all BIU
transfers of data and addresses on the busses
EU:
Tells BIU where to fetch instructions or data from 1M for
Decodes instructions EU
Executes instructions
OR
The functions performed by the Bus interface unit are:
- The BIU is responsible for the external bus operations.
- It performs fetching, reading, writing for memory as well as I/O of
data for peripheral devices.
- The BIU also performs address generation and the population of the
instruction queue.
Page 11 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
1M each
for K
map of
sum and
carry
Sum= A B+ A B
Carry=A.B
1M for
Logic
Diagram
Page 12 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
1M for
each
conversi
AND using NAND: on
OR using NAND:
Page 13 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
d) Interpret the given program and specify the output for the 4M
following situation.
MOV AX, 34F9H
MOV BX, 3A69H.
(i) Masking of lower nibble of AX.
(ii) Rotate right through carry contents of BX by 4 positions.
(iii) Shift left contents of BX by 6 positions..
(iv) XOR AX, BX
(Note: If the outputs are written correctly according to the sequence
also, marks shall be given. Weightage shall be given to the output
need not consider the steps).
(i) Masking of lower nibble of AX:
Ans. AND AL,0F0H
After the execution of this instruction the content of AX register will
be 34F0H.
AX= 34F0H
Page 14 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 15 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
2M
1M
diagram
Page 16 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
IP=689AH
Zero is inserted 1M for
3 4 20 0 example
+ 6 8 9A
=3AA9A
For
each
theorem
2M
Theorem no 2:
It states that, the complement of a product is equal to sum of the
complements.
Page 17 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
2M for
suggesti
on
Page 18 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Algorithm:
1. Start
2. Load the array offset in BX
3. Initialize the CX with count value. Algorith
m 2M
4. Initialize AL with FFh.
5. Compare the first number in BL with AL
6. Compare and transfer the smallest number in AL.
7. Decrement counter and if it is not zero then repeat the loop from
step 5.
8. Store the smallest number in the defined destination location.
9. Stop the process.
Program:
data segment
STRING1 DB 08h,14h,05h,0Fh,09h, 01h, 05h, 18h, 2Ah, 0ACh
res db ?
data ends Correct
code segment Program
4M
assume cs:code, ds:data
start: mov ax, data
mov ds, ax
mov al, 0ffh
mov cx, 0ah
mov bx, offset STRING1
again: cmp al, [bx]
jc skip
mov al, [bx]
skip: inc bx
loop again
mov res, al
int 3
code ends
end start
b) Draw minimum mode configuration of 8086 and explain the 6M
function of any four control signals.
Ans.
Page 19 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
4M
Page 20 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
6. 𝐖𝐑: It is used by the 8086 for outputting a low to indicate that the
processor is performing a write memory or write I/O operation
depending on the 𝑀/𝐼𝑂 signal.
7. HOLD:This is s request signal which is given by peripheral device
to the microprocessor to have control over address and data lines.
8. HLDA: If the microprocessor is ready to give the control of
address and data lines to external device then it provides Hold
Acknowledge.
c) List the addressing modes of 8086 and describe them with an 6M
example.
Ans. Addressing Modes:
1. Immediate Addressing Mode
2. Register Addressing Mode
3. Direct Addressing Mode
4. Indirect Addressing mode List (any
5. Register Indirect Addressing Mode 4) -2M
6. Based Addressing with displacement
7. Indexed Addressing Mode
8. Based Indexed Addressing Mode
9. Based Indexed Addressing with Displacement Mode
10. Fixed or Direct Port Addressing
11. Variable or Indirect Port Addressing
12. Implied (Implicit) Addressing Modes
Page 21 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
MOV DS, AX
iii. Indexed Addressing Mode: In this EA is the sum of the 8/16 bit
displacement plus the contents of the index registers SI or DI.
Ex: MOV [DI + 2345H], 1234H; MOV AX, [SI + 45H]
4. I/O Port addressing: There are two types of I/O port addressing:
i. Fixed or Direct Port Addressing: In this case a one byte port
Page 22 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Each
definitio
n 1M
The delay times are measured between 50% voltage levels of I/P &
O/P wave forms. There are 2 delay times t PHL when O/P goes from
high to low & t PLH when it goes from low to high. The propagation
delay time of the logic gate is taken as the average of these 2 delay
Page 23 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
times.
(ii) Fan in: Fan-In is defined as the number of inputs the gate has. For
e.g. a two input gate will have fan-in equal to 2.
(iii) Fan out: Fan-out is the no. of similar gates which can be driven
by the gate. High fan out is better as it reduces need for additional
drivers to drive more gates
(v) Noise margin: Some electric & magnetic fields can induce
unwanted voltages on the wires between logic circuits. They are
called ‘Noise Signals’. They may cause a change in VIH or VIL &
may produce undesired operation. The ability of circuit to tolerate
these noise signals is called as Noise immunity. These are indicated
by noise margins. If they are defined above, they are called DC noise
margins. If the noise pulse width is less & is approaching the
propagation delay of circuit, it is called AC noise margin.
(vi) Threshold voltage: For any logic family, there are a number of
threshold voltage levels to know:
1. VOH -- Minimum OUTPUT Voltage level a
TTL device will provide for a HIGH signal.
2. VIH -- Minimum INPUT Voltage level to be
considered a HIGH.
3. VOL -- Maximum OUTPUT Voltage level a
device will provide for a LOW signal.
4. VIL -- Maximum INPUT Voltage level to still
be considered a LOW.
Page 24 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Ans. Program:
DATA SEGMENT
ARRAY DB 15h,05h,08h,78h,56h, 60h, 54h, 35h, 24h, 67h
DATA ENDS
CODE SEGMENT
ASSUME CS: CODE, DS:DATA
START:MOV DX, DATA
MOV DS, DX
MOV BL,0AH
step1: MOV SI,OFFSET ARRAY Correct
MOV CL,09H Program
step: MOV AL,[SI] 4M
CMP AL,[SI+1]
JC Down
XCHG AL,[SI+1]
XCHG AL,[SI]
Down : ADD SI,1
LOOP step
DEC BL
JNZ step1
MOV AH,4CH
INT 21H
CODE ENDS
END START
Flowchart:
Page 25 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Flowchar
t 2M
c) Refer given Fig. No.1 and write the outputs for each of the 6M
following input:
Page 26 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
A B C F
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Page 27 / 27
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Symbol
Truth Table 1M
Truth Table for two input EX-OR gate. A logical gate whose output
is one when odd number of inputs are one, for any other condition
output is low.
Inputs Output
A B Y Truth
0 0 0 Table
1 0 1 1M
0 1 1
1 1 0
Page 1 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Maxterm:
Each individual term in the canonical POS form is called as Maxterm. Each
Example: Definitio
n with
example
1M
Symbol
1M
Truth Table:
Inputs Output Truth
Jn Kn Qn+1 Table
0 0 Qn 1M
0 1 0
1 0 1
1 1 Qn
Page 2 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 3 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 4 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 5 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Standar
d SOP
form
2M
Conversi
on to
Standar
d POS
2M
c) Draw symbol and write truth table for the following flip flop and 4M
give one application of each.
i) Clocked R-S flip flop
ii) T- flip flop
Ans. (i) Clocked R-S flip flop
Symbol
Symbol
½M
Page 6 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Truth Table
Truth
table
1M
Symbol
½M
Truth Table
Truth
table
1M
Page 7 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
d) Prove 𝑨 𝑨 + 𝑪 𝑨 𝑩 + 𝑪 𝑨 𝑩𝑪 + 𝑪 = 𝟎 4M
Ans. Note: Any other relevant laws applied shall be considered while
obtaining the correct answer.
Correct
solution
4M
Output
Expressi
on
1M
Circuit
Diagram
1M
Page 8 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Output
Expressi
on
1M
Circuit
Diagram
1M
b) Explain following instructions for 8 bit and 16 bit data. 4M
(i) PUSH
(ii) DAA
(iii) IDJV
(iv) XOR
Note: Any other relevant registers shall also be considered in the
Ans example/explanation.
Explain
(i) PUSH ation of
Format: PUSH source each
½M
This instruction decrements the SP (Stack Pointer) register (by 2) and
copies the word specified by source to the location at the top of the
stack. Example
Here, Source can be a 16-bit general purpose register, segment for each
register or memory location. case
½M
Example- PUSH AX
OR
PUSH AX
This instruction decrements the stack pointer by 2 and copies the 16
bit data from AX register to the stack segment where the stack pointer
then points.
Page 9 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
(ii) DAA
DAA stands for Decimal Adjust Accumulator AL after BCD
Addition
Explanation:
This instruction is used to make sure the result of adding
two packed BCD numbers is adjusted to be a correct BCD number.
The result of the addition must be in AL for DAA instruction to work
correctly. If the lower nibble in AL after addition is > 9 or Auxiliary
Carry Flag is set, then add 6 to lower nibble of AL. If the upper
nibble in AL is > 9H or Carry Flag is set, and then add 6 to upper
nibble of AL.
Example: - (Any Same Type of Example)
OR
DAA instruction is used to convert the sum of two packed BCD
numbers in the register AL into a correct BCD number.
Example :
Page 10 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
(iii) IDJV
(NOTE: CONSIDER THE GIVEN INSTRUCTION AS IDIV):
Syntax : IDIV source
It divides a signed word in AX by an signed byte in source during
16/8 division. Also it is used to divide a signed double word in
DX,AX by an signed word in source during 16/8 division.
operation:
a. if the source is byte then
AL AL/signed 8 bit source
AH AL MOD signed 8 bit source
OR
IDIV BL
This instruction is used to divide signed word in AX register by
signed byte in BL register. The quotient after division will be stored
in AL register, whereas the remainder is stored in AH register.
IDIV BX
This instruction is used to divide signed double word in DX,AX
register by signed word in BX register. The signed 16 bit quotient
will be stored in AX register, whereas the signed 16 bit remainder is
stored in AH register.
Page 11 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Diagram
2M
Any
relevant
situation
1. Edge triggering can be used in flipflops as clock input. where
2. It is used in counters circuits. triggerin
3. They can be used in shift registers g is used
4. They can be used to synchronous data. 2M
Page 12 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Correct
K-map
2M
Correct
equation
2M
Page 13 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Correct
K-Map
2M
Page 14 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Simplifi
cation
1M
Logic
diagram
1M
Ans. Any 2
differen
ces
2M
Page 15 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Block
diagram
1M
1. Sequential logic circuits are those, whose output depends not only
on the present value of the input but also on previous values of the Explana
input signal. tion
2. Sequential circuit can be considered as combinational circuit with 1M
feedback circuit.
3. Sequential circuit uses a memory element like flip – flops as
feedback circuit in order to store past values.
d) i) Differentiate between RISC and CISC processor (Three point) 4M
ii) Compare 8086 and 80586 (Pentium)(3 points)
Ans i) Differentiate between RISC and CISC processor (Three point)
Sr. RISC
PARAMETER CISC PROCESSOR
No PROCESSOPR Any
1. Instruction set Few instructions More instructions three
points
2. Data types Few data types More data types
2M
3. Addressing Few Addressing More Addressing
mode modes modes
4. Registers Large number of Small number of
general purpose general purpose
registers registers & special
purpose registers.
5. Architecture Load/store architecture No load/store
type architecture
6. Operation Single- cycle Multi-cycle
Page 16 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Proper
Labeling
1M
Page 17 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
PROGRAM
DATA SEGMENT
SALARY DW 4000H,5000H,6000H,7000H,8000H
NUM1 DW 05H
AVG DW ? Program
DATA ENDS 3M
CODE SEGMENT
ASSUME DS:DATA, CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV CX,NUM1
MOV BX, OFFSET SALARY
MOV AX,0000H
Page 18 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Fig No.1
Page 19 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Truth Table
Truth Table
Input Output
A B C D Y
0 0 0 0 0
0 0 0 1 0
Ans 0 0 1 0 0
0 0 1 1 1
0 1 0 0 0
0 1 0 1 0 Truth
0 1 1 0 0 Table
0 1 1 1 0 3M
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
Expressi
on at
output
of gates
3M
Page 20 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 21 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 22 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Block
Diagram
3M
b) Design full adder using K-MAP and draw logic circuit using 6M
basic gates and write truth table.
Ans. Note : In logic diagram, instead of basic gates, Exclusive –OR
(EXOR) gates shall be considered.
Full Adder is the adder which adds three inputs and produces two
outputs. The first two inputs are A and B and the third input is an
input carry as Cin. The output carry is designated as Cout and the
normal output is designated as S which is SUM.
A full adder logic is designed in such a manner that can take eight
inputs together to create a byte-wide adder and cascade the carry bit
from one adder to the another.
Page 23 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Truth Table
Truth
Table
2M
Based on the truth table, the Boolean functions for Sum (S) and Carry
– out (Cout) can be derived using K – Map.
For Sum S :
Page 24 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
K map
design
2M
Logic
diagram
2M
Page 25 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)
Page 26 / 26