Loading...
Loading...
এই টপিক থেকে ২টি প্রশ্ন — বাইনারি → ডেসিমেল ও Big-O।
→ ২০৩ ✓
→ A asymptotically ধীর ✓
11001011₂
= 1×2⁷ + 1×2⁶ + 0×2⁵ + 0×2⁴ + 1×2³ + 0×2² + 1×2¹ + 1×2⁰
= 128 + 64 + 0 + 0 + 8 + 0 + 2 + 1
= 203
203 / 2 = 101 R 1
101 / 2 = 50 R 1
50 / 2 = 25 R 0
25 / 2 = 12 R 1
12 / 2 = 6 R 0
6 / 2 = 3 R 0
3 / 2 = 1 R 1
1 / 2 = 0 R 1
→ Read up: 11001011₂
| System | Base | Digits |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0-7 |
| Decimal | 10 | 0-9 |
| Hexadecimal | 16 | 0-9, A-F |
| Notation | অর্থ | উদাহরণ |
|---|---|---|
| O(1) | constant | array index access |
| O(log n) | logarithmic | binary search |
| O(n) | linear | linear search |
| O(n log n) | linearithmic | merge sort, quick sort (avg) |
| O(n²) | quadratic | bubble sort, naive matrix mult. |
| O(n³) | cubic | classical matrix mult. |
| O(2ⁿ) | exponential | recursive Fibonacci, subset gen. |
| O(n!) | factorial | brute-force TSP |
| n | O(n²) | O(n) |
|---|---|---|
| 10 | 100 | 10 |
| 100 | 10,000 | 100 |
| 1,000 | 1,000,000 | 1,000 |
| 1,000,000 | 10¹² | 10⁶ |
ছোট n-এ O(n²) দ্রুত হতে পারে (constants-এর কারণে); কিন্তু n বড় হলে O(n) ই দ্রুত — তাই asymptotically O(n²) > O(n)।
| গেট | প্রতীক | বাইনারি Truth |
|---|---|---|
| AND | · | 1·1=1, otherwise 0 |
| OR | + | 0+0=0, otherwise 1 |
| NOT | ¯ | 0→1, 1→0 |
| NAND | NOT(AND) | universal গেট |
| NOR | NOT(OR) | universal গেট |
| XOR | ⊕ | same=0, different=1 |
| XNOR | NOT(XOR) | same=1 |
নম্বর সিস্টেম ও লজিক — মূল লেকচার শিট — Binary/Octal/Decimal/Hex রূপান্তর, 1's & 2's complement, floating point, Boolean algebra, K-map, Big-O analysis, ও algorithm complexity।