38th BCS Written Exam 2018 — Question Solution | বিসিএস নিয়োগ পরীক্ষা ২০১৮ — প্রশ্ন সমাধান
- BCS
- 2018
- 8 questions · 0 MCQ, 8 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The 38th BCS Written exam was held in 2018. The paper had 8 written questions. The subjects asked most were Data Structures (2), Networking (2) and Computer Architecture (1). This page lists every question, with 1 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
বিসিএস নিয়োগ পরীক্ষার (২০১৮) এই প্রশ্নপত্রে ৮টি প্রশ্ন ছিল, বেশিরভাগ ডেটা স্ট্রাকচার ও নেটওয়ার্কিং থেকে। এখানে ১টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- BCS
- Exam date
- 2018
- Questions
- 8 (0 MCQ, 8 written)
- Exam guide
- BCS (ICT and CSE cadre) · বিসিএস (আইসিটি ও সিএসই ক্যাডার)
a) Determine the Nyquist sampling rate and the Nyquist sampling interval for the signal X(t)=sin(2100πt)
b) What is modulation? Describe the pulse code modulation (PCM) technique. State the advantage and disadvantage of PCM.
Consider the following algebraic equation
Y = AB̄CD̄ + ABC̿ + ĀBD + AB̿CD
a) Draw a truth table that satisfies the above-mentioned equation.
b) Simplify the equation by using K-map: f(A, B, C) = ĀBC̄ + ĀBC + ĀB̄C + ABC
c) Draw circuit diagram for the simplified equation by using basic gates. Calculate the number of basic gates required for implementing the simplified circuit.
Sign up free to see the model answers to written questions 1–2 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
a) What are the building blocks of a digital computer? Describe each unit briefly with their functions.
b) What is pipelining? How does pipeline implementation make faster instruction execution?
c) How can an interrupt be enabled? What are the steps that occur when an interrupt is processed?
Model answer
a) Building blocks of a digital computer
A digital computer has five functional units: input, memory, arithmetic logic unit (ALU), control unit (CU) and output. The ALU, CU and registers together form the CPU; secondary storage adds permanent bulk storage.
flowchart LR
IN["Input unit"] --> MEM["Primary memory (RAM/ROM)"]
subgraph CPU["CPU"]
CU["Control unit"]
ALU["ALU"]
REG["Registers"]
end
MEM <--> ALU
ALU <--> REG
MEM --> OUT["Output unit"]
SEC["Secondary storage"] <--> MEM
CU -.->|"control signals"| IN
CU -.-> MEM
CU -.-> ALU
CU -.-> OUT
| Unit | Function |
|---|---|
| Input unit | accepts data and instructions (keyboard, mouse, scanner) and converts them into binary form for the computer |
| Memory unit (primary) | RAM holds the running program, its data and intermediate results; ROM holds firmware such as the boot program |
| ALU | performs arithmetic (add, subtract, multiply, divide) and logical operations (AND, OR, NOT, compare) |
| Control unit | fetches each instruction from memory, decodes it and issues timing and control signals that direct every other unit; it does not process data itself |
| Registers | very fast storage inside the CPU (PC, IR, MAR, MBR, accumulator) holding addresses, instructions and operands during execution |
| Output unit | converts results into human-usable form (monitor, printer, speaker) |
| Secondary storage | non-volatile, large and cheap storage (HDD, SSD) for programs and data kept permanently |
b) Pipelining
Pipelining is a technique in which instruction execution is divided into independent stages (for example IF fetch, ID decode, EX execute, WB write-back), and different instructions occupy different stages at the same time, like an assembly line.
Four instructions on a 4-stage pipeline
| Cycle | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| I1 | IF | ID | EX | WB | |||
| I2 | IF | ID | EX | WB | |||
| I3 | IF | ID | EX | WB | |||
| I4 | IF | ID | EX | WB |
Without pipelining the four instructions need 4 × 4 = 16 cycles; with pipelining they need 7.
How it makes execution faster
- All stages work in parallel on different instructions, so no unit sits idle.
- After the pipeline fills, one instruction completes every cycle (ideal CPI = 1), so throughput rises.
- For k stages and n instructions with stage time τ: non-pipelined time = n·k·τ; pipelined time = (k + n − 1)·τ.
Speed-up S = n·k / (k + n − 1), which approaches k when n is large.
Example: k = 4, n = 100 → 400 cycles versus 103 cycles, S = 400/103 ≈ 3.88. - Each single instruction is not faster (its latency stays about k cycles, slightly more because of stage registers); the gain is in throughput.
- Hazards reduce the gain: structural (two stages need one resource), data (an instruction needs a result not yet written; fixed by forwarding or stalls) and control (branches; fixed by branch prediction or pipeline flush).
c) Interrupts
How an interrupt is enabled
- Global enable: the CPU has an interrupt-enable flag. In the 8086 it is IF in the flag register:
STIsets IF = 1 (maskable interrupts accepted) andCLIclears it. Non-maskable interrupts (NMI) cannot be disabled. - Individual enable (mask): each source has a mask bit in an interrupt controller (e.g. the IMR of the 8259A PIC) or in the device's control register.
- 8051 example: the bit-addressable IE register enables interrupts only when the global bit EA = 1 and the source's own bit = 1.
| Bit | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|---|---|---|
| IE | EA | – | ET2 | ES | ET1 | EX1 | ET0 | EX0 |
To enable external interrupt 0: SETB EA and SETB EX0 (or MOV IE, #81H).
Steps when an interrupt is processed
- A device raises an interrupt request (IRQ/INTR).
- The CPU completes the current instruction and, at the end of the instruction cycle, checks for pending requests that are enabled.
- The CPU acknowledges the request (INTA) and identifies the source or its vector number.
- It saves the context: the flags/PSW and the return address (PC) are pushed onto the stack (8086: FLAGS, then CS, then IP).
- Further interrupts are disabled so that the service routine starts uninterrupted (the 8086 clears IF and TF right after pushing FLAGS).
- The PC is loaded with the address of the interrupt service routine (ISR) from the interrupt vector table (8086: new IP from address 4 × type, new CS from 4 × type + 2).
- The ISR saves the registers it uses, services the device, clears the request (e.g. sends EOI to the PIC) and restores those registers.
- The return-from-interrupt instruction (
IRET, orRETIon the 8051) pops the PC and flags, and the interrupted program resumes exactly where it stopped.
Exam tip: CPU = CU + ALU + registers; pipelining speeds up throughput (S → k), not a single instruction; an interrupt is accepted only at the end of an instruction, and only when its global and individual enable bits are set.
Given a host IP address in a network is written as both 192.68.25.16/28 and 3FFE:85B:1F1F::A9:1234.
a) Which one is IPv6 address? How many bits are used for IPv6 address? How does the above IPv6 address comply with the addressing scheme?
b) How many subnets and hosts are to be supported by the above mentioned IPv4 address?
c) Classify IPv4 and IPv6 address.
(a) What is structured programming language? Explain with example.
(b) Write a program to store information using structures with dynamically memory allocation.
(c) State the advantages of object-oriented programming (OOP) over structured programming.
(d) Explain encapsulation and inheritance in details.
A list of numbers 3, 5, 7, 11, 13, 17 is stored in sequence. Which of the following data structure will have the least data movement when the number 11 is removed from the list? FIFO, QUEUE, HEAP, Linked list and stack. Justify your answer.
(a) Suppose a circular array QUEUE has 6 memory locations. What are the values of FRONT and REAR after the following operations?
a) Initially QUEUE is empty.
b) A, C and D are added to the queue.
c) F is inserted;
d) Two letters are deleted;
e) K, L and M are added to the queue;
f) Two letters are deleted; and
g) R is added to the queue
(b) What is an operating system? Why do we need an operating system?
(c) What is deadlock? Describe the ways of detecting and protecting against deadlock.
(d) What is the relationship between the operating system and computer hardware?
(a) Describe different techniques used in the risk analysis of software development.
(b) Why are the following two overloaded functions inherently ambiguous?
int f(int a, int b=5);
int f(int &a);
(c) What is database security? Describe different approaches to ensure database security.
Sign up free to see the model answers to written questions 4–8 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
7 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ৭টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 7 syllabus chapters; the biggest is Arrays & Linked Lists, in Data Structures, with 2 questions. Arrays & Linked Lists is asked in 38 other papers too (2017–2025).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- Arrays & Linked Lists Data Structures · 38 other papers, 2017–20252
- IP Addressing & Subnetting Networking · 133 other papers, 2012–20261
- Language Basics & Syntax Programming · 122 other papers, 2015–20261
- Transmission & Media Networking · 79 other papers, 2012–20261
- CPU Organization Computer Architecture · 77 other papers, 2011–20261
- Boolean Algebra & K-Maps Digital Logic · 50 other papers, 2016–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the 38th BCS Written exam (2018)?
- 8 written questions.
- Which subjects were asked most in the 38th BCS Written exam (2018)?
- Data Structures (2), Networking (2) and Computer Architecture (1), out of 8 questions.
- When was the 38th BCS Written exam held?
- In 2018. The exact day isn't in our records.
- Where can I find the 38th BCS Written exam (2018) question solution?
- On this page: 1 of the 8 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers