কম্পিউটার সায়েন্স এন্ড ইঞ্জিনিয়ারিং
Subjects / বিষয়
Non-Technical · Shared by all departments
পদার্থ বিজ্ঞান
8 chapters
Non-Technical · Shared by all departments
রসায়ন
15 chapters
Non-Technical · Shared by all departments
গণিত
4 chapters
Non-Technical · Shared by all departments
ইংরেজি
11 chapters
Technical
Computer Science and Engineering
12 chapters
Questions
0 read · 0 practiced · 0 answered in exams13. 2's Complement কী? 8-bit ব্যবহার করে 45 − 60 কর।

CQ / Written solution
2's complement: সব bit invert করে 1 যোগ করতে হয়।
\[45=00101101_2,\quad60=00111100_2,\quad-60=11000100_2\]
\[00101101_2+11000100_2=11110001_2\]
ফল negative; invert করে 1 যোগ করলে 00001111 = 15।
\[\boxed{45-60=-15}\]
14. Memory Management-এ Logical Address এবং Physical Address Space-এর পার্থক্য
CQ / Written solution
| Logical/virtual address | Physical address |
|---|---|
| CPU/program-এর address space | RAM-এর বাস্তব address space |
| MMU দিয়ে অনুবাদ হয় | Address translation-এর ফল |
| Process অনুযায়ী পৃথক হতে পারে | Hardware memory access-এ ব্যবহৃত হয় |
15. IP Address: 192.168.1.1, Subnet Mask: 255.255.255.192
CQ / Written solution
\[255.255.255.192=/26,\quad h=32-26=6\]
| বিষয় | ফল |
|---|---|
| Network | 192.168.1.0/26 |
| Broadcast | 192.168.1.63 |
| Usable hosts | 192.168.1.1 - 192.168.1.62 |
| Usable host count | \(2^6-2=62\) |
192.168.1.0/24 parent network ধরা হলে /26 subnet সংখ্যা \(2^{26-24}=4\)। Parent prefix ছাড়া subnet সংখ্যা নির্দিষ্ট নয়।
16. Department(DeptID, DeptName), Employees(Name, DeptID, Salary)
- সব department-এর average salary বের কর।
- Salary 50000-এর বেশি এমন employee-এর name ও department দেখাও।
CQ / Written solution
সব department, এমনকি employee না থাকা department-ও দেখাতে LEFT JOIN ব্যবহার করা হয়েছে।
SELECT d.DeptID, d.DeptName, AVG(e.Salary) AS AverageSalary
FROM Department AS d
LEFT JOIN Employees AS e ON e.DeptID = d.DeptID
GROUP BY d.DeptID, d.DeptName;
SELECT e.Name, d.DeptName
FROM Employees AS e
JOIN Department AS d ON d.DeptID = e.DeptID
WHERE e.Salary > 50000;Employee না থাকলে average NULL; সেটি শূন্য salary বোঝায় না।
17. Decoder কী? NAND Gate ব্যবহার করে 2-input Decoder Design কর।
CQ / Written solution
Decoder n-bit input থেকে সর্বোচ্চ \(2^n\)টি output নির্বাচন করে। NAND-only 2-to-4 decoder-এর output active-low।
\[\bar A=\operatorname{NAND}(A,A),\quad\bar B=\operatorname{NAND}(B,B)\]
\[Y_0=\overline{\bar A\bar B},\quad Y_1=\overline{\bar AB},\quad Y_2=\overline{A\bar B},\quad Y_3=\overline{AB}\]
| A | B | Y0 | Y1 | Y2 | Y3 |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 0 |
Active-high output চাইলে প্রতিটি output-কে আরেকটি tied-input NAND দিয়ে invert করতে হবে।
18. Circuit থেকে Rt, It, P, Vr2 বের কর

CQ / Written solution
\[R_a=2\parallel3=\frac{2\times3}{2+3}=\frac65\,\Omega\]
\[R_b=4+R_a=\frac{26}{5}\,\Omega,\qquad R_p=2\parallel R_b=\frac{13}{9}\,\Omega\]
\[R_t=4+R_p=\boxed{\frac{49}{9}\,\Omega\approx5.444\,\Omega}\]
\[I_t=\frac{12}{49/9}=\boxed{\frac{108}{49}\,\mathrm A\approx2.204\,\mathrm A}\]
\[P=12I_t=\boxed{26.449\,\mathrm W},\quad V_{R_2}=I_tR_p=\boxed{\frac{156}{49}\,\mathrm V\approx3.184\,\mathrm V}\]
1. What are the advantages of using inheritance in C++ programming? Write a program in C/C++ to print the following number pattern: [C++ programming এ inheritance এর সুবিধাগুলো কি কি? C/C++ এ একটি প্রোগ্রাম লিখো যা নীচের নম্বর প্যাটার্ন প্রিন্ট করবে।] (4+10)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
CQ / Written solution
Inheritance existing class-এর reusable behavior, extension এবং substitutable derived types তৈরি করতে সাহায্য করে।
#include <iostream>
int main() {
for (int i = 1; i <= 5; ++i) {
for (int j = 1; j <= i; ++j)
std::cout << j << (j == i ? '\n' : ' ');
}
}
2. What is the relationship between a class and an object? Distinguish between modifier and accessor in C++ language with an example. [Class এবং object এর মধ্যে সম্পর্ক কি? উদাহরণ সহকারে modifier এবং accessor এর মধ্যকার পার্থক্য C++ ল্যাংগুয়েজের সাপেক্ষে বর্ণনা কর।] (6+8)
CQ / Written solution
Class হলো user-defined type/blueprint; object হলো সেই class-এর instance। Modifier object-এর state বদলায়; accessor state পড়ে, সাধারণত const member function হয়।
#include <iostream>
class Student {
int marks = 0;
public:
void setMarks(int value) { marks = value; }
int getMarks() const { return marks; }
};
int main() {
Student s;
s.setMarks(85);
std::cout << s.getMarks() << '\n';
}
3. What is the power set of S = {a,b,c}? Compare between linked list and array. [সেট S = {a,b,c} এর পাওয়ার সেট কি? Linked list ও array এর মধ্যকার তুলনা কর।] (6+8)
CQ / Written solution
\[\mathcal P(\{a,b,c\})=\{\varnothing,\{a\},\{b\},\{c\},\{a,b\},\{a,c\},\{b,c\},\{a,b,c\}\}\]
\[|\mathcal P(S)|=2^3=8\]
| Array | Linked list |
|---|---|
| Contiguous elements | Nodes linked by pointers |
| Random access \(O(1)\) | Index access \(O(n)\) |
| Middle insertion/deletion often \(O(n)\) | Known predecessor/node থাকলে link update \(O(1)\); node খুঁজতে সময় লাগে |
| কম per-element overhead ও ভালো cache locality | Pointer overhead; size incrementally বদলানো যায় |
4. What are the different phases of SDLC? Classify mapping cardinalities for a binary relationship set with examples. [SDLC এর বিভিন্ন ফেজগুলো কি কি? উদাহরণ সহকারে একটি বাইনারি রিলেশনশিপ সেটের ম্যাপিং কার্ডিনালিটি শ্রেণিভুক্ত কর।] (6+8)
CQ / Written solution
SDLC = System Development Life Cycle।
- Planning ও feasibility
- Requirements analysis
- Design
- Implementation
- Testing
- Deployment
- Maintenance
| Type | উদাহরণ |
|---|---|
| One-to-one | এক country-এর একটি capital, model-এর assumptions সাপেক্ষে |
| One-to-many | এক department-এ বহু employee |
| Many-to-one | বহু employee-এর একটি department |
| Many-to-many | বহু student বহু course নেয় |