Your next chapter starts hereExplore admission guide

DUET CSE 2012-2013 - Previous Year

Reading mode — untimed, no attempt is recorded
Back
Question 1 Programming

Question 1

The line joining the two points (2, 2) and (5, 6), which lie on the circumference of a circle is the diameter of the circle. Write a program in C/C++ to compute the area of the circle. Use a symbolic constant to define the value of \(\mathbf{\pi}\) .[বৃত্তের পরিধিতে অবস্থিত দুইটি বিন্দু (2, 2) ও (5, 6)দ্বারা গঠিত রেখাই হল বৃত্তের ব্যাস। C/C++ প্রোগ্রামিং ল্যাঙ্গুয়েজ ব্যবহার করে একটি প্রোগ্রাম লিখ যা ঐ বৃত্তের ক্ষেত্রফল বের করবে। \(\mathbf{\pi}\) এর মানকে একটি সিম্বলিক ধ্রুবক হিসেবে ব্যবহার করতে হবে।]

Solution

\[d=\sqrt{(5-2)^2+(6-2)^2}=5,\quad r=2.5,\quad A=\pi r^2=6.25\pi\approx19.635\]

#include <stdio.h>
#define PI 3.14159265358979323846

int main(void) {
    double dx = 5.0 - 2.0, dy = 6.0 - 2.0;
    double area = PI * (dx * dx + dy * dy) / 4.0;
    printf("Area = %.6f\n", area);
    return 0;
}
Question 2 Programming

Question 2

What is inheritance? Write a program to show the inheritance used in a class. [ইনহেরিটেন্স কি? ক্লাসে ইনহেরিটেন্স দেখানোর জন্য একটি প্রোগ্রাম লিখ।]

Solution

Inheritance-এ derived class base class-এর accessible data ও behaviour পুনর্ব্যবহার করে এবং নতুন behaviour যোগ করতে পারে। উদাহরণ: Vehicle থেকে Car ও Bus।

#include <iostream>
class Vehicle {
public:
    void start() const { std::cout << "Started\n"; }
};
class Car : public Vehicle {
public:
    void drive() const { std::cout << "Driving\n"; }
};
int main() { Car c; c.start(); c.drive(); }
Question 3 Historical: Discrete Mathematics

Question 3

(a) The blood groups of people are distributed as follows: 50 have type A blood, 65 have type B blood, 70 have type O blood and 15 have type AB blood. If a person from this group is selected at random, what is the probability that this person has type O blood? [২০০ জন লোকের রক্তের গ্রুপ নিম্নরূপ: ৫০ জন A গ্রুপের, ৬৫ জন B গ্রুপের, ৭০ জন O গ্রুপের এবং ১৫ জন AB গ্রুপের। এদের মধ্যে দৈবভাব একজনকেও নির্বাচন করলে তার রক্তের গ্রুপ O হওয়ার সম্ভাবনা কত?]

Solution

\[P(O)=\frac{70}{200}=\frac7{20}=\boxed{0.35}\]

Question 3b Historical: Discrete Mathematics

(b) Show that, $(p \oplus q)$ and $\sim(p \leftrightarrow q)$ are logically equivalent. [দেখাও যে- $(p \oplus q)$ ও $\sim(p \leftrightarrow q)$ যৌক্তিকভাবে সমতুল্য]

Solution
pqp XOR qNOT (p ↔ q)
0000
0111
1011
1100

শেষ দুই column একই, তাই proposition দুটি logically equivalent।

Question 4a Data Structure

4. (a) Classify data structures with examples.

[উদাহরণ ডাটা স্ট্রাকচার সমূহের শ্রেণীবিভাগ কর।]

Solution
ধরনউদাহরণ
PrimitiveInteger, character, boolean
Non-primitive linearArray, linked list, stack, queue
Non-primitive non-linearTree, graph

Allocation-এর দিক থেকে fixed-size array static-size; linked list dynamic-size।

Question 4b Data Structure

4. (b) An automobile company keeps the records of sold automobile in AUTO array in every year from 1940 to 2000. If $\text{Base}(\text{AUTO}) = 200$ and $\text{W} = 4\text{ words/ memory cell}$, calculate the address of array element for the year of 1985.

[একটি অটোমোবাইল কোম্পানি 1940 থেকে 2000 সাল পর্যন্ত প্রতি বছরে বিক্রিত অটোমোবাইল সংখ্যার রেকর্ড AUTO অ্যারেতে save করে। যদি $\text{Base}(\text{AUTO}) = 200$ এবং $\text{W} = 4\text{ words/ memory cell}$ হয়, তবে 1985 সনের অ্যারের উপাদানের অ্যাড্রেস নিরূপণ কর।]

Solution

\[\operatorname{LOC}(AUTO[y])=200+4(y-1940)\]

\[\operatorname{LOC}(AUTO[1985])=200+4(45)=\boxed{380}\]

প্রশ্নে address unit word ধরা হয়েছে।

Question 5 Database Management

5. Let the following relation schemas be given: $\text{R} = (\text{A}, \text{B}, \text{C})$ and $\text{S} = (\text{D}, \text{E}, \text{F})$. Let relations $r(\text{R})$ and $s(\text{S})$ be given. Give an expression in SQL that is equivalent to each of the following queries:

[নিম্নলিখিত রিলেশনাল স্কীমা দেওয়া আছে: $\text{R} = (\text{A}, \text{B}, \text{C})$ এবং $\text{S} = (\text{D}, \text{E}, \text{F})$। $r(\text{R})$ এবং $s(\text{S})$ রিলেশন ধরে নিম্নের কুয়েরীগুলি SQL এর মাধ্যমে প্রকাশ কর:]

  • (i) $\prod A(r)$

  • (ii) $\sigma B = 17(r)$

  • (iii) $r \times s$

  • (iv) $\prod A, F(\sigma C=D(r \times s))$

Solution

Relational algebra set semantics বজায় রাখতে projection-এ DISTINCT ব্যবহার করা হয়েছে।

-- (i) Projection of A
SELECT DISTINCT A FROM r;

-- (ii) Selection B = 17
SELECT * FROM r WHERE B = 17;

-- (iii) Cartesian product
SELECT * FROM r CROSS JOIN s;

-- (iv) Projection A, F after C = D selection
SELECT DISTINCT r.A, s.F
FROM r JOIN s ON r.C = s.D;
Question 6 Historical: Software Development

6. Define system and information system. State the key elements of a system.

[সিস্টেম ও ইনফরমেশন সিস্টেমের সংজ্ঞা দাও। সিস্টেমের মূল উপাদানগুলো লিখ।]

Solution

System হলো নির্দিষ্ট লক্ষ্য অর্জনে পরস্পর-সম্পর্কযুক্ত উপাদানের সমষ্টি।

  1. Input
  2. Processing
  3. Output
  4. Control ও feedback
  5. Boundary, environment ও interface

Information system মানুষ, procedure, data ও technology ব্যবহার করে তথ্য সংগ্রহ, প্রক্রিয়াকরণ, সংরক্ষণ ও বিতরণ করে।

Question 8b Microprocessor & Microcomputer

8. (b) Describe the functions of flag of 8086 microprocessor.

[8086 মাইক্রোপ্রসেসরের flag register সমূহের কাজ লিখ।]

Solution

8086-এ একটি 16-bit FLAGS register আছে; এর 9টি flag সক্রিয়।

Flagকাজ
CFUnsigned carry/borrow
PFফলাফলের নিচের 8 বিটে even parity
AFBit 3 থেকে bit 4-এ carry/borrow
ZFফলাফল শূন্য
SFফলাফলের sign bit
OFSigned arithmetic overflow
TFSingle-step execution
IFMaskable interrupt enable
DFString operation-এর দিক: 0 হলে বৃদ্ধি, 1 হলে হ্রাস
Question 9a Data Communication & Computer Network

9. (a) What is a MAC address? [ম্যাক অ্যাড্রেস কি?] (b) Define DNS [DNS এর সংজ্ঞা দাও]

Solution

MAC address হলো link-layer interface identifier, সাধারণ Ethernet-এ 48-bit। Locally administered MAC বদলানো সম্ভব। DNS = Domain Name System; domain name-কে IP address-সহ resource record-এর সঙ্গে resolve করে।

Question 10 Data Communication & Computer Network

10. What are 10 Base 2, 10 Base 5 and 10 Base T Ethernet LANs? [10 Base 2, 10 Base 5 এবং 10 Base T ইথারনেট LANs কি?]

Solution
StandardMediaSpeedMaximum segment
10BASE2Thin coaxial10 Mbit/s185 m
10BASE5Thick coaxial10 Mbit/s500 m
10BASE-TTwisted pair10 Mbit/s100 m
Question 11a Digital Electronics Incomplete source data

11. (a) Perform the following operation in the 2’s complement system: (Use eight bit including the sign bit) [২ এর সম্পূরক সিস্টেমের সাহায্যে নিম্নলিখিত অপারেশনগুলি কর: (সাইন বিট সহ আট বিট ব্যবহার কর।)]

Solution

প্রশ্নে operands অনুপস্থিত; source solution থেকে দুটি operation বোঝা যায়। এগুলোকে reconstructed example হিসেবে দেখানো হলো:

\[(11010000)_2+(10110000)_2=(1\,10000000)_2\]

8-bit signed হিসেবে −48 + (−80) = −128; carry বাদ দিলে 10000000, signed overflow নেই।

\[14-17=00001110_2+11101111_2=11111101_2=\boxed{-3}\]

Original operands ভিন্ন হলে এই ফল প্রযোজ্য নয়।

Question 11b Digital Electronics

(b) Differentiate between Synchronous & Asynchronous counters. [Synchronous Asynchronous কাউন্টারের পার্থক্য উল্লেখ কর]

Solution
বিষয়SynchronousAsynchronous/ripple
Clockসব flip-flop একই clock পায়প্রথমটি external clock; পরেরটি আগের output
DelayCombinational next-state ও flip-flop delayStage ধরে ripple delay জমে
Transitionএকই clock edge-এ state updateIntermediate transient state দেখা যায়
Designঅতিরিক্ত next-state logic লাগেসাধারণ ripple circuit সহজ
Question 12 Digital Electronics

12. Compute the $\text{V}_{\text{CE}}$ and $\text{I}_{\text{C}}$ for the following circuit. [নিম্নের সার্কিট $\text{V}_{\text{CE}}$ ও $\text{I}_{\text{C}}$ এর মান বের কর]

NPN fixed bias: VCC = 12 V, RB = 240 kΩ from VCC to base, RC = 2.2 kΩ from VCC to collector; emitter grounded; β = 50. Input/output coupling capacitors = 10 μF.

Solution

Source-এর fixed-bias circuit অনুযায়ী emitter grounded, RB = 240 kΩ, RC = 2.2 kΩ, VCC = 12 V, β = 50। Silicon transistor-এ VBE ≈ 0.7 V ধরে:

\[I_B=\frac{12-0.7}{240000}=47.0833\,\mu\mathrm A\]

\[I_C=50I_B=\boxed{2.35417\,\mathrm{mA}}\]

\[V_{CE}=12-I_C(2200)=\boxed{6.82083\,\mathrm V}\]

VCE saturation voltage-এর চেয়ে অনেক বেশি, তাই active-region assumption consistent।

Question 13 Basic Electricity Source ambiguity: see solution note

13. Calculate the power consumed by $\text{R}_1$ and $\text{R}_4$ resisters in the following circuit: [নিম্নের সার্কিট $\text{R}_1$ and $\text{R}_4$ রেজিস্টারের গৃহীত পাওয়ারের মান নির্ণয় কর:]

Plaintext

R3 150 Ω

+-------/\/\/\/\-------+

| |

| 500 Ω |

[ ] R1 \/\/\/ R2 [ ] R4

1 kΩ| | |450 Ω

| | |

+----------| |---------+

11 V

Solution

ASCII diagram অস্পষ্ট। Source-এর reduction অনুযায়ী 500 Ω series with [1000 Ω parallel (150 + 450) Ω] ধরে:

\[R_T=500+(1000\parallel600)=875\,\Omega\]

\[V_{parallel}=11\frac{375}{875}=\frac{33}7\,\mathrm V\]

\[P_{R1}=\frac{(33/7)^2}{1000}=\boxed{22.2245\,\mathrm{mW}}\]

\[P_{R4}=\left(\frac{33/7}{600}\right)^2(450)=\boxed{27.7806\,\mathrm{mW}}\]

এটি উপরোক্ত topology-এর conditional answer; original circuit image প্রয়োজন।

Question 14.1 Programming

(i) What is the output of the following code? [নিম্নের কোডের আউটপুট কি?]

# include <stdio.h>
void main()
{
int s = 0;
while (s++ < 10)
{
If (s < 4 && s < 9) // ((s<4) && (s<9))
continue;
printf ("\n%d\t", s);
}
}
  • a. 1 2 3 4 5 6 7 8 9
  • b. 1 2 3 10
  • c. 4 5 6 7 8 9 10
  • d. 4 5 7 8 9
Solution

If-কে lowercase if ধরলে body-তে s = 1 থেকে 10; 1,2,3 skip হয়, output 4 5 6 7 8 9 10।

Question 14.2 Microprocessor & Microcomputer

(ii) Which of the following typically occurs when a procedure call is executed on a processor? [প্রসেসরে যখন একটি প্রসিডিউর এক্সিকিউট হয় তখন সাধারণত নিম্নের কোনগুলো ঘটে?] Program counter is updatedStack pointer is updatedData cache is flushed to avoid aliasing

  • a. I only
  • b. II only
  • c. I and II only
  • d. II and III only
Solution

প্রচলিত stack-based CALL-এ program counter এবং stack pointer দুটোই বদলায়; সব architecture-এ বাধ্যতামূলক নয়।

Question 14.3 Database Management

(iii) Which of the following is not a level of data abstraction? [নিম্নের কোনটি ডাটা অ্যাবস্ট্রাকশন লেভেল নয়?]

  • a. Physical Level
  • b. Critical Level
  • c. Logical Level
  • d. View Level
Solution

Abstraction levels: physical, logical, view; critical level নয়।

Question 14.4 Historical: Discrete Mathematics

(iv) Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6? [ধরি একটি মসৃণ ছক্কা একবার চালা হল। প্রথম চালনাতে ছক্কার মান 1, 2 অথবা 3 হয়, ছক্কাটি দ্বিতীয়বার চালালে প্রাপ্ত সমষ্টি কমপক্ষে 6 পাওয়ার সম্ভাবনা কত?]

  • a. $\frac{1}{21}$
  • b. $\frac{5}{12}$
  • c. $\frac{2}{3}$
  • d. $\frac{1}{6}$
Solution

প্রথম roll 6 হলে probability 1/6। প্রথম 1,2,3 হলে দ্বিতীয় roll-এ যথাক্রমে 2,3,4টি অনুকূল ফল। মোট 1/6 + (2+3+4)/36 = 5/12।

Question 14.5 Database Management

(v) What is a ‘tuple’? [‘tuple’ কি?] (Top left options are continuing from the previous page's question "What is a 'tuple'?")

  • a. Another name for the key linking different tables in a database
  • b. Another name for a table in an RDBMS
  • c. An attribute attached to a record
  • d. A row or record in a database table
Solution

Tuple হলো table-এর একটি row/record।

Question 14.6 Operating System

(vi) The file system “NTFS” stands for [ফাইল সিস্টেম “NTFS” কি?]

  • a. New Type File System
  • b. Never Terminated File System
  • c. New Technology File System
  • d. Non terminated File system
Solution

NTFS = New Technology File System।

Question 14.7 Digital Electronics

(vii) Which one is the simplified form of the Boolean equation A'C + A'B + AB'C + BC? [বুলিয়ান সমীকরণ A'C + A'B + AB'C + BC এর সংক্ষিপ্তরূপ কি?]

  • a. C' + AB
  • b. C + A'B
  • c. B' – A'C
  • d. C + AB
Solution

A'C + AB'C + BC = C(A' + AB' + B) = C; ফলে F = C + A'B।

Question 14.8 Digital Electronics

(viii) The binary code of $(21.125)_{10}$ is ---- [$(21.125)_{10}$ এর বাইনারী -----]

  • a. 10101.001
  • b. 10100.001
  • c. 10101.010
  • d. 10100.111
Solution

21.125 decimal = 10101.001 binary।

Question 14.9 Historical: Discrete Mathematics Source ambiguity: see solution note

(ix) What is the negation of the predicate $\forall x (p(y) \rightarrow q(x))$? [$\forall x (p(y) \rightarrow q(x))$ predicate এর বিপরীত কি?]

  1. $\forall x \exists y (p(y) \rightarrow \sim q(x))$
  2. $\forall x \exists y (p(y) \wedge \sim q(x))$
  3. $\exists x \forall y (p(y) \wedge \sim q(x))$
  4. $\exists x \forall y (p(x) \wedge \sim q(x))$
Solution

\(\neg\forall x(p(y)\to q(x))=\exists x(p(y)\land\neg q(x))\)। y free থাকে; কোনো option-এ সঠিক quantifier নেই।

Question 14.10 Data Communication & Computer Network

(x) MAC (Medium Access Control) sublayer is the part of ------ [MAC সাব লেয়ার নিম্নের কোনটির অংশ -----]

  • a. Physical Layer
  • b. Network Layer
  • c. Data Link Layer
  • d. Transport Layer
Solution

MAC sublayer data-link layer-এর অংশ।