L-3rr-l/CSE Date:: Iw Iw
L-3rr-l/CSE Date:: Iw Iw
SECTION -A
There are FOUR questions in this section. Answer any THREE questions_
I. (a) Complete the provided incomplete diagram of the MIPS single cycle datapath for
Iw $tl, O($tO)
Iw $t2, 4($tO)
How many cycles are required to execute the above code? Can you reduce the number
of cycles using code scheduling? If yes, what will be resulting number of cycles?
(c) What do you mean by data hazard for branches? Give MIPS code examples with
explanations for each of the following cases of data hazard for branches: (10)
(i) Needs no stall to resolve
(ii) Needs one cycle stall to resolve
(iii) Needs two cycle stalls to resolve
2. (a) What do you mean by forwarding for data hazard? Design a complete forwarding
unit in the provided diagram with necessary equations for the MIPS pipeline
considering double data hazard. (15)
(b) Draw the block diagram of a dynamically scheduled multiple-issue super-scalar
cpu. (10)
(c) Consider the following program: (10)
Loop: lw $tO, O($sl)
addu $tO, $tO, $s2
sw $10, O($sI)
addi $s I, $s 1, -4
bne $s I, $zero, Loop
Schedule the above program for a dual-issue MIPS with the following configuration:
Two-issue packets, one ALUlbranch instruction, one load/store instruction,
ALUlbranch then load/store.
What will be the Instructions per Cycle (IPC) for this scheduling? Which technique
can increase the IPC even more?
3. (a) Suppose we have a processor with a base CPI of 1.0, assuming all references hit in
the primary cache and a clock rate of 4 GHz. Assume a main memory access time of
200 ns, including all the miss handling. Suppose the miss rate per instruction at the
primary cache is 4%. How much faster will the processor be if we add a second level
cache that has a IOns access time for either a hit or a miss and is large enough to
reduce the miss rate to main memory to I%? How much faster will the processor be if
we add a third level cache that has a 40 ns access time for either a hit or a miss and is
large enough to reduce the miss rate to main memory to 0.5%? (10)
(b) Explain with necessary diagrams how the page table works with respect to the
virtual address, physical address, main memory, and disk. (10)
(c) You are given the following hit/miss status ofTLB, Page Table and Cache. (10)
Serial No. TLB Page Table Cache
I Hit Hit Hit
2 Hit Miss Hit
3 Miss Miss Hit
4 Miss Miss Miss
5 Miss Hit Hit
Table 3(c)
Explain which of the scenarios in Table 3(c) is possible or impossible and under what
circumstance with proper reasoning.
(d) Explain how snooping protocol solves the cache coherence problem with an
example. (5)
Contd P/3
=3=
CSE 305
4. (a) Assume there are three small caches, each consisting of four one-word blocks and
uses LRU replacement policy. One cache is fully associative, a second is two-way set-
associative, and the third is direct-mapped. Find the number of misses for each cache
connect a separate GPU. How do the CPU and GPU access each other's memory? (10)
(c) What do you mean by kernel, grid, and thread block of the CUDA paradigm?
Briefly describe how they map to the streaming processor (SP) cores and streaming
SECTION - B
There are FOUR questions in this section. Answer any THREE questions.
5. (a) The following four design principles have been guiding the instruction-set
designers to find a balance between the number of instructions needed to execute a
program, the number of clock cycles needed by an instruction, and the speed of the
6. (a) Write the MIPS assembly code for the C code shown in the following figure
(Figure: 6.a). (15)
if (n==O) return 0;
else if (n == 1) return 1;
Figure: 6.a
(b) Suppose the program counter (PC) is set to Ox2000 0000. Explain your answer for
(i) Is it possible to use the jump Ul MIPS assembly instruction to set the PC
to the address Ox4000 OOOO?
(ii) Is it possible to use single branch (beq/bneq) instruction to set the PC to
this same address?
(c) Draw the block diagram of 32-bit combined multiplication and division hardware
which uses 32-bit ALU, and briefly mention functions of different components of this
hardware. (10)
7. (a) Assume that you have four different threads as shown in figure (Figure: 7.a) below.
Show how the four threads could be combined to execute on the processor more
efficiency using the following three multithreading options. You only need to show the
T1 A A B B B C C C D
T2 A C C C C D D
T3 A A A A D D D
T4
T5 C C C D D D D
T6 A D D
T7 A A B B B B C C C C D
T8 A A A B B D D D
Figure: 7.a
(b) Suppose you are using Floating Point Operations Per Second (FLOPS) as a
performance metric for comparing processors. Your research partner believes that
FLOPS might be a misleading metric for measuring the general performance of a
processor, but it could still be a useful performance measure for a specific part of the
processor or a specific type of processors. Do you agree or disagree with your research
partner's statements? Provide a detailed explanation to support your position. (10)
(c) With illustrative example(s), explain how vector processor differs from array
processor. (10)
8. (a) Consider two different implementations (PI and P2) of the same instruction set
architecture. There are three classes of instructions A, B, and C. Suppose, a program
has 200,000 instructions divided into three classes as 25% class A, 60% class B, and
15% class C. The clock rate and CPl of each implementation are given in the following
table (Table: 8.a). (3+3+5=11)
Clock CPlof CPlof CPlof
Implementation
Rate Class A Class B Class C
PI 2.7 GHz 3 3 2
P2 3.5 GHz 2 4 1
Table: 8.a
(i) Find the total clock cycle required in both implementations.
(ii) Calculate the execution time required for both implementations and
determine which implementation is faster.
(iii) How much must we improve the CPI of Class C instructions if we want
the program to run two times faster in the better implementation
determined in the previous question?
(b) Consider representing the set of consecutive positive integers {l, 2, 3, 4, ..., n}
using IEEE single precision floating point (8-bit exponent and 23-bit mantissa). Find
the largest n such that every number in the above set can be represented. (14)
(c) What are the different addressing modes of MIPS? Illustrate the calculation process
.,
0
c:
~ to
:J '"~
0" Instruction [25-21]
'":; Read
to ...
:J
Read register 1 Read
~
'"q
ii'
~
~
PC 1*-1 address
II Instruction [20-16] Read
register 2
data 1
Instruction 0
[31--0] M Write Read
u register data 2
Instruction Instruction [15-11] 1X
memory
1111
Write
data Registers \.!.../
I I I Write
' memory
Data
data
Instruction [15-0] 16
Instruction [5--0]
,
IFIID lDIEX EXIMEM MEWM3
V>
~ jj r- Read
•• S register 1 Read
i> ."
"0
••
w data 1
,. c
~
-c
Read
-
Instruetlon register 2
••• ""V
~. 0- memory t- Registers Read
Address
Read
or ~ Wnte data 2 data
-< regIster II
0 Q O.la
c c
~ r-
Write memory -V
•• •••!:!.
:J '" 0
data
~ 11
'":E :J Write
N
•••
~
'"n
"'.
~
E 16 032 data
.,
SECTION-A
There are FOUR questions in this section. Answer any THREE questions.
1. (a) Differentiate the use cases of these following design patterns with necessary
(b) Your younger brother who wanted to build an Avengers themed game. For his game
he wrote a method which takes a Super Hero's name as input and returns the Super
Hero item used by that Super Hero. He wrote the method as follows: (13)
class GetSuperHeroltem {
public SuperHero Item suit;
if (heroName.equalslgnoreCase("lronMan"» {
return suit;
}
else if (heroName.equalslgnoreCase("Thor"» {
return hammer;
}
else if (heroName.equalslgnoreCase("CaptainAmerica"» {
return shield;
}
else if (heroName.equalsignoreCase("Hawkeye"» {
return arrow;
}
else {
return null ;
}
}
Contd P/2
=2=
CSE 307
Contd ... Q. No. l(b)
You came to know about his little project and saw this piece of code. You know a
better way to implement the functionality he wanted. Now, re-write the code above in
such a way that would be much easier to read and maintain, also your method should
have constant run-time (amortized).
(c) Discuss briefly the following System Implementation methods. Also, state a real-
2. (a) Let's assume you are building your own computer networking model. Your model
has five (5) layers. Such as: Physical Layer, Data-link Layer, Network Layer, Transport
Layer and Application Layer. When an user wants to send a message (e.g. "hello")
Identify the design pattern that can best capture the scenario above and implement it
using your preferred language (you can use pseudo syntax). You must provide the
UML class diagram of your implementation.
requirements. (5)
3. (a) Suppose you are working on a restaurant's software development team. Your
restaurant provides four kinds of set menus such as: Veggie Harvest, Chicken Delight,
Beef Fiesta, Sea Shanty. Veggie Harvest contains Mushroom Rice, Paneer Masala and
Fried Vegetable Pakora. Chicken Delight contains Chicken Fried Rice, Butter Chicken
and Fried Chicken wings. Beef Fiesta contains Beef Fried Rice, Beef Chili Onion and
Fried Beef Bacon. Sea Shanty contains Rice with Shrimp, Crab Masala and Fried
Calamari. (20)
Your restaurant have three different kitchens named as Rice Station where all the rice
based items are prepared, lv/ain Mania where all the main dishes (Panner Masala,
Butter Chicken, Beef Chili Onion and Crab Masala) are prepared and Fry More where
the fried items are prepared.
Your restaurant takes orders from the user. then assembles the items prepared by the
kitchens described above and delivers it.
Your job is to identify the design pattern that can best capture the scenario above and
implement it using your preferred language (you can use pseudo syntax). You must
provide the UML class diagram of your implementation. "'Be careful, as users are
very sensitive to their orders.'"
(b) Briet1y discuss the six (6) types of testing methods as follows: Unit testing,
Integration testing, Nan-Functional testing, Regression testing, Acceptance testing and
Contd P/4
=4=
CSE 307
4. (a) For each of the situations below, identify the most specific pattern used in that
situation. You need to write the pattern name with sufficient justification (UML class
application. (5)
Contd PIS
=5=
CSE 307
SECTION - B
There are FOUR questions in this section. Answer any THREE.
5. (a) Describe, with an appropriate example, the uncertainty and loss associated with a
(c) Discuss the necessary of writing short. useful, and up-to-date code documents. (5)
6. (a) Point out how incremental and evolutionwy process models address the
the past one month, is provided below in Table for Question 6(b). (15)
Objective Total PV PV after One Month EV after One Month
A $70 $50 $40
B $40 $40 $35
E $50 $0 $0
Table for Question 6(b)
Here, PV and EV stand for planned value and earned value, respectively. The company
expended $130 in this project during the past month. Now, given the information,
compute schedule performance index (SPl), cost peljormance index (CPl), and
estimated cost at completion (EA C) of this project after one month. Put some remarks
on the progress of this project based on the obtained values.
(c) Deline code smell in your own words. Provide 3 (three) examples of smell in a
7. (a) State the reasons behind recent shift from adopting traditional process models to
following information about this project in Table for Question 7(b). (20)
Contd P/6
=6=
CSE 307
Contd ... Q. No. 7(b)
statement. (5)
8. (a) Discuss the role of driver and navigator in the content of code review in pair
programming. (10)
(b) "Kanban method focuses on the visualization aspect of a software project with
kanban cards and kanban board. " -elaborate on this statement. (15)
(c) Explain, in your own words, the people and the process components of a typical
SECTION-A
There are FOUR questions in this section. Answer Q. NO.1 and any TWO from the rest.
Question NO.1 is COMPULSORY.
1. (a) Consider the C code shown below contained in two separate files. Discuss in detail
the issues faced by the linker and the loader when he program is compiled and then
executed. How will these issues be resolved? Explain. (13)
main.c
I #inc1ude <stdio.h>
2 void main ()
3 (
4 ••••••• ;
5 int i;
6 i = subfunction();
7 exitO;
8 }
subcode.c
I void subfunetion()
3 int it n = 0;
6 n = n + i;
8 return nj
9 }
where _ indicates a space. At the current moment, both the lexemeBegin and
(c) Justify with proper reasons the acceptability (or unacceptability) of the each of the
2. (a) Among the reasons why the analysis portion of the compiler is normally separated
into lexical analysis and parsing (syntax analysis) phases, simplicity of design is the
how exactly this action is carried out. The symbols have got their meaning used in the
(d) What is the one-liner rule to determine whether a token will require an attribute or
not? Are all the token attributes single values? Explain. (5)
3 (a) Explain clearly with examples, for a production rule like, X ~ l;Y, ...Y" when E is
(b) Describe what exactly happens during parsing when a cell of the predictive parsing
(c) What are the key decisions during top-down and bottom-up parsing? (6)
For the string kwwrgz, draw the parse tree and hence identify the handles for bottom-
up parsing.
(e) In shift-reduce parsing, the handle will always eventually appear on top of the
stack, never inside - justify this statement for the problem in (d). (5)
Contd P/3
=3=
CSE 309
SECTION -B
There are FOUR questions in this section. Answer any THREE questions.
All the symbols have their usual meanings in the context of compilers
unless explicitly mentioned.
(b) The following Syntax-Directed Translation Scheme (SDT) computes the value of a
6. (a) Illustrate two distinctive aspects that distinguish Static Single-Assignment (SSA)
from three-address code. How does SSA facilitate code optimization? Explain with an
example. (8+5=13)
(b) Consider the following SOD for generating three-address codes using the fall-
B,.false = B.false
B.code = if B.true t- fall then Bf.code II B,.code
else B,.code II B,.code II/abel(Bf.true)
Now add rules to the SOD above for the following two productions using the same
fall-through technique.
(i) B ~ B, & & B,
(ii) B ~ £, rei £,
Assume all the symbols, attributes, functions, labels, and notations have their usual
meamngs.
(c) Write down a translation scheme for generating code using backpalching for the
flow-of-control statement yielded by the following production. You may add marker
symbols in the production as required; specify the semantic actions corresponding to
the marker symbols. Make any other justified assumptions, as necessary. (8)
S ~ for(S,;B;S,)SJ
7. (a) Which condition must procedure calls or aClivalions of procedure satisfy to enable
stack allocation? Explain. Give an example of a programming language feature that
violates the condition and thus cannot be implemented with purely a runtime stack.
What are calling and return sequences in the context of procedure calls? (6+6+5= 17)
(b) Consider the network of objects in the figure below. Assume, X denotes the rool
sel. Suppose at some point in time, the pointer A ~ C is deleted. Then we execute
Cheney's copying garbage collection algorithm on the network. Also, suppose that, (18)
(i) Each object has size 100 bytes,
(ii) The unscanned list is managed as a queue, and when an object has more
than one pointer, the reached objects are added to the queue in
alphabetical order,
(iii) The From semispace starts at location 0, and the To semispace starts at
location 10,000, and
(iv) Initially, all the objects in the heap are arranged m alphabetical order
starting at byte O.
What is the value of NewLoclion(o) for each object 0 that remaInS after garbage
collection? Draw the heaps before and after running garbage collection, showing-
(i) locations of the allocated objects, (ii) references running among the objects. What is
the time complexity of the algorithm?
Contd """"" PIS
=5=
CSE 309
Coutd .... for Q. No. 7(b)
dp = 0
j=O
L: t1 = j.a
12 = A[t1)
t3 = j.a
. t4 = B[t3]
t5 = 12.t4
dp = dp + t5
i= j + 1
if j<n goto L
(b) Given the flow graph of a program, formulate the problem of global register
allocation as a graph coloring problem. Show detailed formulation steps using the tlow
graph in the figure below as an example. Subsequently, find a register allocation for
the given program using Chaitin's algorithm. Assume that three physical registers are
available. Illustrate all steps of the algorithm. (13+ 12=25)
a=b+c
d=d-b 61
e=a+f
63
64
b, e live
SECTION-A
There are FOUR questions in this section. Answer any THREE questions.
1. (a) Derive the Fourier spectmm of a gate signal of width B. Also, find the exponential
Fourier series of a periodic gate signal of the same width and period 2B. Draw all four
time domain and spectral domain representations. Comment on and correlate your
2. (a) Differentiate between all-pass and distortionless transmission systems. Draw the
frequency response of a distortion less transmission system. Justify from its time
streams. Assume that the last signal level has been positive. (15)
Data streams: 0110011001100110 and 1100110011001100
3. (a) With appropriate examples and mathematical derivations, establish the relationship
between time compression and frequency compression of a signal. Nonlinear
quantization uses logarithmic compression of a signal, yet it does not change the
bandwidth of the signal. Why is it so? Why is nonlinear quantization necessary? (20)
(b) While sampling a signal g(t) band limited to B at Nyquist sampling rate, all samples
are found to be zero except at time t = 0, where it is A. Derive the most simplified
cxpression of the signal g(t) from its sample values. Justify and correlate the expression
Contd P/2
=2=
CSE 311
4. (a) In a video surveillance system, data from 24 video cameras are brought to a
processing center and are sampled, quantized, binary coded and time-division
multiplexed. The multiplexed data are then transmitted to a monitoring system over a
cable. Assume the bandwidth of all video signals is 200 Hz. The maximum acceptable
error in sample amplitudes is 0.25% of the peak signal amplitude. The sampling rate is
exactly the Nyquist rate. Derive the minimum cable bandwidth needed to transmit
these data. (18)
(b) "Delta modulation is a special case of differential pulse coded modulation.
However, they differ on what types of signals they can process, e.g., continuous time
and discrete time signals." Justify the statement with appropriate mathematical
derivations and block diagrams of both modulation techniques. (17)
SECTION -B
There are FOUR questions in this section. Answer any THREE questions.
5.
.l /31.~
./
~
Ml~)
M~)
m(l)
lOW Pass
Aler
?
mz{l)
'j
Cz{l)
SwI1ch.
52 Mz{l)
F1••••.• : 5.1
Consider the circuit diagram shown in figure 5.1 and assume the corresponding signals
to be as following.
ml(l) = IOcos600t, m2(1) = IOcos900t, CI(t) = 20cos30000t, C2(t) = 20cos60000t Now
Answer the following questions.
(a) Assume that, both the switches are on (circuit connected). Draw the frequency
spectrum of Inl(t) and m2(t). Determine the mathematical equations of MI(t), M2(t),
M(t) and met). Draw the frequency spectrum of each of them too. (20)
(b) Considering both switches being on, explain how it is possible to generate ml(t) as the
output of the demodulation side. [You can use the derived equation ofm(t) from 5(a)] (5)
(c) Assume that, the switch, SI is open and the carrier, C2(t) is also passed with M2(t).
Draw the envelope of M(t). Can this scheme be considered as a tone modulation now?
Find out the modulation index, power efficiency under this constraint. (10)
Contd P/3
l
=3=
CSE 311
6. (a) What is power spectral density? Briefly explain how a signal power is detemlined
using the previous QPSK signal? What will be the minimum phase shift then? (8)
7. (a) A modulating signal is defined using the function: met) = 3t - 6Lo.5f J Volts, where
J
Lf is the integer part of 1. Draw the modulating signal and determine its frequency in
Hertz. The carrier signal is defined to be c(t) = cos (21lfct), fc = 10kHzVolts. Write the
equation of a Phase Modulated (PM) signal, (where c(t) is modulated by met»~. Draw
the graphs of the catTier signal and the PM signal Briefly explain the nature of phase
If the frequency sensitivity is 2 HzIV olt, determine the modulating signal. (13)
Assume,
I jo =
-0.025 x mr.h = -0.0175 x mr'jz = 0.09 x mr.h = 0.1075 x mr.j• = -0.07 x
mr.h = 0.0325 x mr.j6 = 0.0125 x m{.js = 0.0325 x mr.h = 0.005 x mr.j" = 0.0. n >7
(c) Discuss three differences between Amplitude Modulation and Angular Modulation. (6)
Contd P/4
=4=
CSE 311
Modulation. Explain using figures of frequency spectrum and mathematical analysis. (13)
(b) You are assigned to arrange a pattern of lighting in a family get-together using 2
handling various range of frequencies for a large range of communication channels. (7)
(d) Show that, the minimum frequency difference to make two signals orthogonal is,
I
81'= - (7)
2Th
L-3ff-l/CSE Date: 13/04/2023
BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY, DHAKA
~~,. L-3/T-I B. Sc. Engineering Examinations 2021-2022
(
Sub: CSE 315 (Microprocessors, Microcontrollers, and Embedded Systems)
SECTION-A
There are FOUR questions in this section. Answer any THREE questions .
• Assume system clock frequency IMHz if not given .
• List of registers and necessary diagrams are at the end of the question .
• If configuration for any required register/control-word/bit is missing, just assume a
configuration and clearly show the assumed configuration.
I. (a) Suppose an active-high push switch is connected to the PD3 pin of an ATmege32.
Also, eight LEOs are connected to PBO-PB7. Write a C code for an 8-bit ring counter
using an interrupt. An 8-bit ring counter counts like 00000001, 000000010, 00000100,
"., 10000000, then loops back to 00000001. Subsequently, display the counter status
modify the code to measure the period of a low-frequency square wave. (15)
1 #include <avr/io.h>
2 #include <avr/interrupt.h>
3 #include <avr/inttypes.h>
4
5 volatile uintl6_t period;
6
7 ISR(TlMERl_CAPT_vectl
10
11
8
9
I
l
period = ICRl;
TCNTI = 0;
12 int main () {
13 TCCRIA = ObOOOOOOOO;
14 TCCRIB = Obll00000l;
15 TIMSK = ObOOOOOl00;
16 return 0;
17
Figure l(c)
Contd """ P/2
=2=
CSE 315
2. (a) What are the difference between Harvard and von Neumann architecture? Which
the corresponding dotted box. Each device is also configured to transmit the LSB first. (10)
Determine the contents of the shift registers of the four devices after
i. 4 clock pulses
ii. 16 clock pulses
SCKf---_>---1,~ SCK
SPI MISOI<IIJE----+----iMISO SPI
.tv.1~.~.t.~.U.tv.11 ..(~1.2
..~I.'l.y.~
MOSIl-----, ~ MOSI
.1.9..1.9.1.9..1.9..J l.1.1.9..9.1.1.9..9
r--+-+--+-~SS.
+--H~SCK
-MISO SPI
,.~I.'l.y.~.f??)
~MOSI
L9...1.9.1..9 ..1.9..1.
"---+-+-+--l~SS'
L--t--l,~SCK
-MISO SPI
..(?})
,.~I.'l.y.~
L----l~ IMOSI
L..Q.Q9..Q..1..1..1.1.
+----~:SS.
Figure 2(c)
ATmega32
PAD 1---../
Figure 2(d)
Contd P/3
=3=
CSE 315
3. (a) What is the problem associated with _de1ay-ms() function of Atmege32? Explain
ATmega32? (5)
(c) Suppose TIMERI of ATmega32 is operating in mode WGM = 1010 (Table 2).
Prescaler is 8. The value of ICRI is 2000, and OCRIA is 400. OCIA is configured to
be clear on compare match when up-counting and set on compare match when down-
counting. Draw the wave shape of OC IA with respect to TCNT!. Also, calculate the
Also, calculate the duty cycle and frequency ofOCIA and OCI B. (15)
4. (a) Write a C code for ATmega32 using TIMER I to generate a square wave signal with
period 2000~ts and high time 300J..ls.You must use Fast PWM mode for this. Refer to
explanation. (10)
Figure 4(b)
Contd P/4
=4=
CSE 315
Contd ... Q. No.4
SECTION -B
There are FOUR questions in this section. Answer any THREE.
5. (a) Define memory-mapped and port-mapped I/O. Which I/O system is used in 8086
pP? Discuss its advantage(s) and disadvantage(s) over the other. (10)
(b) Suppose you want to access memory location 00223h to 00226h using an 8086 pP. (10)
i) Determine the minimum number of required clock cycle(s).
ii) Draw the signals (timing diagram) of BH E and AO throughout these clock
cycles.
(Buffer full)
OBF
(Interrupt requested)
INTR
Pon
Figure S(c)
Contd P/52
=5=
CSE 315
Contd ... Q. No. 5(c)
6. (a) (i) Why is address decoding essential for interfacing memory components with
(c) Figure 6(c) expands the intelTupt stmcture of8086 ~LP. (5+10=15)
i) What are the vector numbers for IR2 and IRS?
ii) Suppose the vector addresses for IR2 and IRS are 4C215h and 13D2Bh
respectively. If IR2 has higher priority than IRS and both the inten'upts are activated
simultaneously, explain the priority resolution protocol.
80286 wilh
the 82288
DO
01
02
0)
DC Low data bus
~
D6
07
I I I
I 6. i Sll
9 7
I I I I 2 2 2 2
yyy yy Y Y Y 1I1
I 2 ) 41234 74ALS244
I I I I 2 2 2 2
AAA AAAAA I 2
12) 41234 GG
OOA
I I I I
2 • 6 8 I )S 7 H~v~c 10K
U2
INn
1<{
14ALS30
Figure 6(c)
CSE 315
Contd ... Q. NO.7
(b) Mark has a laser-activated alarm system the generates edge-triggered interrupt
requests upon activation. He must interface it with his 8086 ~LPthrough the INTR pin.
But his attempts to directly connect the output interrupt signal to the INTR pin were
unsuccessful. So, Mark seeks advice from his genius little brother who pin-points the
(c) Suppose CS:IP = 0 154h:03BOh and DS:SI = 0 I 71h:OI EOh in an 8086 ~LP. (15)
i) Calculate the physical address for both the segment:offset pairs and comment on
the results.
ii) Calculate the amount of overlap in the code and data segment.
8. (a) Define Computer Bus. Explain the necessity of tri-state buffers to connect
Keyboard/Mouse
Microprocessor iill Pon A
INone
Imer1ace 8255
At
Keyboard/Mouse
Pone INone
Figure S(c)
-- -:L_
'{ -
Name Configuration
GICR
I I . I . I - I IVSEL I IVCE I
I INTl I INTO INT2
ADCSRA
I ADEN I ADSC I ADATE I ADIF I ADIE I ADPS2 I ADPS1 I ADPSO I
UCSRA
I RXC I TXC I UDRE I FE I DOR I PE I U2X I MPCM I
UCSRB
I RXCIE I TXCIE I UDRIE I RXEN I TXEN I UCSZ2 I RXBB I TXBB I
IUCSZ2.
URSEL UMSEL I UPM1 II UPMO USBS UCSZ1 UCSZO I
UCPOL I I I I
UCSRC UCSZ1. UCSZO: 000 ....•S-bit. 001 ....•6.bit. 010 •..• 7-bit. 011 •..• B-bit. 111 •..•9-bit
UPM1.UPMO: 00 •..• No parity. 10 •..• even parity. 11 •..• odd parity
USBS: 0 •..• 1 stoo bit. 1 •..• 2 stan bits
TCCRIA I COM1A1 I COM lAO I COM1B1 I COM1BO I FOC1A I FOC1B I WGM11 I WGM10 I
TCCRIB
ICNCl I ICES1 I
ICS12. . I WGM13 I WGM12 I CS12 I CS11 I CS10 I
CS11. CSI0: 001 ....•No prescaling. 010 ....•elk/B. 011 ....•elk/64. 100 ....•elk/256
TIMSK
I OCIEZ I TOIEZ I TICIEl I OCIE1A I OCIEIB I TOIEl I OCIEO I TOIEO I
TIFR
I OCF2 I TOV2 I ICFl I OCF1A I OCFIB I TOVl I OCFO I TOVO I
WGM Timer/Counter Mode of Operation TOP Update of OCRIX TOVl Flag Set on