BCA 2nd Sem Assignment 2022-23

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

BACHELOR OF COMPUTER

APPLICATIONS
(BCA)

(Revised Syllabus)

BCA(Revised Syllabus)/ASSIGN/SEMESTER-II

ASSIGNMENTS

(July - 2022 & January - 2023)

ECO-02, MCS-011, MCS-012, MCS-015, MCS-013, BCSL-021, BCSL-022,

SCHOOL OF COMPUTER AND INFORMATION SCIENCES


INDIRA GANDHI NATIONAL OPEN UNIVERSITY
MAIDAN GARHI, NEW DELHI – 110 068

1
CONTENTS

Course Code Assignment No. Submission-Schedule Page


No.

For July- For January-


December Session June Session

ECO-02 BCA(2)/02/Assignment/22-23 31st October, 2022 15th April, 2023 3

MCS-011 BCA(2)/011/Assignment/22-23 31st October, 2022 15th April, 2023 4

MCS-012 BCA(2)/012/Assignment/22-23 31st October, 2022 15th April, 2023 6

MCS-015 BCA(2)/015/Assignment/22-23 31st October, 2022 15th April, 2023 11

MCS-013 BCA(2)/013/Assignment/22-23 31st October, 2022 15th April, 2023 14

BCSL-021 BCA(2)/L-021/Assignment/22-23 31st October, 2022 15th April, 2023 17

BCSL-022 BCA(2)/L-022/Assignment/22-23 31st October, 2022 15th April, 2023 18

Important Notes
1. Submit your assignments to the Coordinator of your Study Centre on or before the due
date.
2. Assignment submission before due dates is compulsory to become eligible for appearing
in corresponding Term End Examinations. For further details, please refer to BCA
Programme Guide.
3. To become eligible for appearing the Term End Practical Examination for the lab
courses, it is essential to fulfill the minimum attendance requirements as well as
submission of assignments (on or before the due date). For further details, please refer to
the BCA Programme Guide.

2
Course Code : ECO-02
Course Title : Accountancy-1
Assignment Number : BCA (2)/02/Assignment/2022-23
Maximum Marks : 100
Weightage : 25%
Last Dates for Submission : 31st October, 2022 (For July Session)
: 15th April, 2023 (For January Session)

There are six questions in this assignment which carried 100 marks. Answer all the
questions. Please go through the guidelines regarding assignments given in the Program
Guide for the format of presentation.

Attempt all the questions:

Q1. (a) “Ledger is said to be the principal book of entry and the transactions can even (10+10)
be directly entered into the ledger account.” Elaborate on the statement and
explain why Joumal is necessary.

(b) What is the purpose of noting on the bill? Is it necessary in case of a


promissory note?

Q2. Why is distinction between capital and revenue important? Give examples to show (20)
, how wrong classification can affect the ascertainment of profit.
Q3. X of Bangalore consigned 100 bags of cement for sale to his agent Y. Cost price (20)
of each bag is Rs. 120. 'X' immediately drew a 4 months bill for Rs. 5,090 on the
latter and discounted it with bank at 6% per annum. 'X' paid Rs. 800 on packing
and Rs, 250 for carriage. 'Y' spent Rs. 300 as selling expenses. The consignee
returned 5 bags. He realised 20 bags at Rs. 130 per bag and 50 bags on credit at
Rs. 140 per bag and took the balance in his own stock at Rs. 135 per bag.
Consignee is entitled to get commission of 3% and 2% del credre commission on
credit sales. 'Y' recovered all money from debtors except Rs. 500. Prepare the
necessary ledger accounts in the books of both parties.
Q4. What is Sectional Balancing? How does it differ from Self-balancing? Give (20)
proforma of a Total Debtors Account.
Q5. Differentiate between the following: (10+10)
(a) Trading Account and Manufacturing Account
(b) Non-recurring and Recurring Expenses

3
Course Code : MCS-011
Course Title : Problem Solving and Programming
Assignment Number : BCA(2)/011/Assignment/2022-23
Maximum Marks : 100
Weightage : 25%
Last Dates for Submission : 31st October, 2022 (For July Session)
15th April, 2023 (For January Session)

There are seven questions in this assignment, which carry 80 marks. Rest 20 marks are for
viva-voce. Answer all the questions. You may use illustrations and diagrams to enhance the
explanations. Please go through the guidelines regarding assignments given in the
Programme Guide for the format of presentation.

Q1. Write an algorithm, draw corresponding flow chart and write an interactive program in C
which prompts the user with the following options on the opening menu: (15)

1) To reverse a 5-digit number


2) To check whether the 5-digit number is a palindrome or not
3) To find the sum of all the digits of the 5-digit number
4) Quit
Enter your choice:

Note: Use SWITCH..CASE statement.

Q2. Write the functions in C for the following: (9)


(a) To calculate the power without using the pow(x,y) function of <;math.h>.
(b) To calculate the cube of a given number.
(c) To calculate the LCM of two given numbers

Q3. Write interactive programs in C using recursion for the following: (12)
(a) To find the HCF of two given numbers.
(b) To find the GCD of two given numbers.
(c) To find the factorial of a given number.

Q4. Write interactive C programs to perform the following on strings: (12)


(a) To check if two strings are Anagram.
(b) To check whether the given alphabet is a vowel or consonant.
(c) To convert the given string from lower case to upper case without using the inbuilt
function in <string.h>

Q5. Using arrays in C write a program to input 2 arrays consisting of 10 numbers each and
display all the numbers those are common to both the arrays and display their count. (10)

4
Q6. Using Structures in C, write an interactive program to display the pay-slips for 10
employees working in a small departmental stores. (10)
Note: Assumptions can be made wherever necessary and mention them.

Q7. Using File Handling concept in C programming, write the C programs for the following:
(12)
(a) To create and store student information of 10 MCA students in a .dat file.
(b) To edit the file created in (a) to add data for 2 more students.
(c) To delete specific line(one student record) from a file.

5
Course Code : MCS-012
Course Title : Computer Organization and Assembly
Language Programming
Assignment Number : BCA(2)/012/Assignment/2022-23
Maximum Marks : 100
Weightage : 25%
Last Dates for Submission : 31st October, 2022 (For July Session)
15th April, 2023 (For January Session)

There are four questions in this assignment, which carries 80 marks. Rest 20 marks are for
viva voce. You may use illustrations and diagrams to enhance the explanations. Please go
through the guidelines regarding assignments given in the Programme Guide for the
format of presentation. Answer to each part of the question should be confined to about
300 words. Make suitable assumption, if any.

Q1. (a) Please refer to Figure 4 of Unit 1 of Block 1 on page 11 of Instruction execution
example. Assuming a similar machine is to be used for execution of the following three
consecutive instructions:
LODA A ; Load the content of Memory location A into the Accumulator Register.
ADD B ; Add the content of memory location B from Accumulator Register.
STOR C ; Stores the content of Accumulator register to memory location C.
However, this machine is different from the example of Figure 4 in the following ways:

 Each memory word of this new machine is of 64 bits in length.


 Each instruction is of length 64 bits with 24 bits for operation code (opcode) and 40
bits for specifying one direct operand.
 The Main Memory of the machine would be of size 240 words.
 The three consecutive instructions are placed starting from memory location
(000000FFFE)h ; operand A is at location (00000FFFF1) h and contains a value
(0000051121)h, Operand B is at location (00000FFFF2)h and contains a value
(00050048FE)h and operand C is at location (00000FFFF3) h and contains a value
(0000000000)h.
 The AC, IR and MBR registers are of size 64 bits, whereas PC and MAR registers are
of size 40 bits. The initial content of PC register is (000000FFFE) h,

Draw the diagrams showing the following information:

(i) Initial State of the machine with the addresses and content of memory locations in
hexadecimal. Show only those address locations of the memory that store the
instruction and data. Also show content of all the stated registers. (2)

(ii) Draw three more diagrams, each showing the state of machine after execution of
every instruction viz. LOAD, ADD and STOR. Show the changes in the values of

6
Registers and memory locations, if any, due to execution of instruction. Show all the
addresses and values in hexadecimal notations. (3)

(b) Perform the following conversion of numbers: (2)


i) Decimal (6545679870)10 to binary and hexadecimal
ii) Hexadecimal (ABCDEFF90) h into Octal.
iii) String “Assembly Language Programming” into UTF 8
iv) Octal (2345671)O into Decimal
(c) Simplify the following function using K-map: F(A, B, C, D) = Σ (0, 1, 4, 5, 9, 10, 15)
Draw the circuit for the resultant function using NAND gates. (2)
(d) Consider the Adder-Subtractor circuit as shown in Figure 3.15 page 76 of Block 1.
Explain how this circuit will perform subtraction (A-B), if the value of A is 1001 and B is
0111. You must list all the bit values including Cin and Cout and overflow, if any. (1)

(e) Explain the functioning of a 4 × 1 multiplexer with the help of logic diagram and example
input. (2)

(f) Assume that a source data value 1101 was received at a destination as 1111. Show how
Hamming's Error-Correcting code bits will be appended to source data, so this error of
one bit is identified and corrected at the destination. You may assume that transmission
error occurs only in the source data and not the source parity bits. (2)

(g) Explain functioning of J-K flip flop with the help of a logic diagram and characteristic
table. Also explain the excitation table of this flip-flop. (2)

(h) Explain the functioning of a master-slave flip-flop with the help of a diagram. (2)

(i) Represent (-49.125)10 and (0.00000025)10 in IEEE 754 single precision and double
precision formats. (2)

Q2. (a) Refer to the Figure 2(b) on page 8 in Unit 1 of Block 2. Draw the Internal organisation
of a 16×4 RAM. Explain all the Input and Output of this organisation. Also answer the
following: (2)

(i) How many data input and data output lines does this RAM needs? Explain your
answer.
(ii) How many address lines are needed for this RAM? Give reason in support of your
answer.
(b) A computer has 1 MB RAM with each memory word of 8 bits. It has cache memory
having 256 blocks having a size of 64 bits (8 memory words). Show how the main
memory address (03FAC) h will be mapped to cache address, if (3)
(i) Direct cache mapping is used

7
(ii) Associative cache mapping is used
(iii)Two way set associative cache mapping is used.
You should show the size of tag, index, main memory block address and offset in your
answer.

(c) Explain the process of interrupt handling with the help of a diagram. (3)

(d) What is DMA? Explain with the help of a flowchart. Differentiate between the
working of DMA and I/O processor. (2)

(e) Assume that a disk has 256 tracks, with each track having 64 sectors and each sector is
of size 1 M bits. The cluster size in this system can be assumed to be as 4 sectors. A
file having the name bcaassignment.txt is of size 32 MB. Assume that disk has 64 free
- continuous clusters. How can this file be allotted space on the disk? Also show the
content of FAT after the space allocation to this file. You may make suitable
assumptions. (4)

(f) Explain the following, giving their uses and advantages/disadvantages, if needed. (6)
(Word limit for answer of each part is 100 words ONLY)

(i) Programmed Input/Output


(ii) Access time computation on Hard disk
(iii) CD-ROM
(iv) Resolution of a scanner
(v) Printer Technology
(vi) Capacitor-based Keyboards

Q3. (a) A single core uniprocessor system has 16 general purpose registers. The machine has
1MB RAM. The size of every general purpose register and memory word is 32 bits.
The computer uses fixed length instructions of size 32 bits each. An instruction of the
machine can have two operands. One of these operands is a direct memory operand
and other is a register operand. Both these operands use direct addressing. An
instruction of a machine consists of bits for operation code, bits for memory operand
and bits of register operand. The machine has about 64 different operation codes. The
special purpose registers, which are other than general purpose registers, are - Program
Counter (PC), Memory Address Register (MAR), Data Register (DR) and Flag
registers (FR). The first register of the general-purpose registers can be used as
Accumulator Register. The size of Integer operands on the machine may be assumed
to be equal to the size of accumulator register. In order to execute instructions, the
machine has another special register called Instruction Register (IR) of size 32 bits, as
each instruction is of this size. Perform the following tasks for the machine. (Make and
state suitable assumptions, if any.)

8
(i) Design suitable instruction formats for the machine. Specify the size of different fields
that are needed in the instruction format. Also indicate how many bits of the
instructions are unused for this machine. Explain your design of instruction format.
Also indicate the size of each register. (3)

(ii) Demonstrate two valid instructions of the machine; put some valid data values in
registers and memory locations and show the execution of these two instructions. (2)

(iii) Assuming that the instructions are first fetched to Instruction Register (IR), memory
operand is brought to DR register and result of an operation is stored in the
Accumulator register; write and explain the sequence of micro-operations that are
required to fetch and execute an instruction, which performs addition of a memory
operand and a register operand. The result is stored in the accumulator register. Make
and state suitable assumptions, if any. (5)

(b) Assume that you have a machine, as shown in section 3.2.2 of Block 3 having the
micro-operations given in Figure 10 on page 62 of Block 3. Consider that R1 and R2
both are 8 bit registers and contains 10100101 and 11000110 respectively. What will be
the values of select inputs, carry-in input and result of operation (including carry out
bit) if the following micro-operations are performed? (For each micro-operation you
may assume the initial value of R1 and R2 as given above) (2)
(i) Increment R1
(ii) Subtract R2 from R1
(iii) Exclusive OR of R1 and R2
(iv) Shift left R1

(c) Consider that an instruction pipeline has five stages namely instruction fetch (F),
Instruction Decode (D), Operand Fetch (O), Instruction Execute (E) and store results
(S). Draw an instruction pipeline diagram showing execution of five sequential
instructions using this pipeline. What are the problems of this instruction pipelining?
(3)
(d) Explain the functioning of micro-programmed control unit with the help of a diagram.
Is Wilkes control Unit uses microprogramming? Explain. (2)

(e) Explain the use of large register file in RISC? Also, explain the optimisation of RISC
pipelining. (3)

Q4. (a) Write a program using 8086 assembly Language (with proper comments) that accepts
four different digits input from the keyboard. Each digit is first converted to binary
equivalent and then smallest of these digits is put in AL register. This AL register is to
be added in each value of a byte array of size 9, which is stored in the memory. You
may assume the byte array has the value 01h, 03h 02h, 03h, 00h, 01h, 02h, 01h, 04h.
Make suitable assumptions, if any. (7)

9
(b) Write a NEAR subroutine using 8086 assembly Language (with proper comments) that
returns the largest value in a byte array of length 4-bytes. All the four values of the byte
array are passed to the subroutine in a stack. You should write both the calling program
and subroutine. (7)

(c) Explain the following in the context of 8086 Microprocessor: (6)


(i) Use of segment registers with the help of example
(ii) Interrupt handling in 8086 micro-processor
(iii) Any four bit manipulation instructions in 8086 micro-processor

10
Course Code : MCS-015
Course Title : Communication Skills
Assignment Number : BCA(2)/015/Assignment/2022-23
Maximum Marks : 100
Weightage : 25%
Last date of submission : 31st October, 2022 (For July Session)
15th April, 2023 (For January Session)

This assignment has eight questions. Answer all questions. Assignment is for 100 marks.
You may use illustrations and diagrams to enhance the explanations. Please go through the
guidelines regarding assignments given in the Programme Guide for the format of
presentation.

Q1. Read the following passage carefully.

Psychoanalysts treat their patients by delving into their past – often their early years of
childhood – in an attempt to help them understand present feelings and behaviour.
Consultants try to understand their clients’ history and track record in an attempt to
identify the roots of failure or the seeds of success.

In some respects, consultants have an easier job; they can look over past balance sheets
and profit and loss statements in order to analyse the management of assets, profitability
and cost control. They can follow the company’s history through from its initial successes
with perhaps a single product to its present-day range of products or services. They can
study the organizational structure of the company, marketing and personnel policies, even
the physical layout of offices and factory.

However, putting their finger on why one company fails and another succeeds is not
always so easy. Companies look outside for this advice because they cannot find the
answers themselves. They hope that the consultant will be able to draw on his or her
wider experience – perhaps recognize a symptom that he has previously encountered.
Then perhaps he or she will be able to diagnose their ills, prescribe a course of treatment
for recovery and recommend a new life-style to ensure future health and prosperity.
Now answer the following questions:

i. Why do Psychoanalysts and consultants need to delve into the past of their patients
and clients? (3)
ii. Why do you think a consultant’s job is easier than a Psychoanalyst? (2)
iii. Companies evidently want help from consultants from time to time. Why? Discuss.
(2)
iv. Taking the passage as the basis, write in about 100 words.
“The role of a consultant in a company”. (4)
v. Give an appropriate title to the passage. (1)

11
Q2. (a) Match the following words from the text in column A with their meanings in column B:
(8)
i To delve a Bring back to original form
ii Track record b Configuration
iii Roots c History of achievements
iv Seeds d Come across
v Layout e Origins, causes
vi To put your finger on f Origins, beginnings
vii To restore g Dig, try to uncover
viii Encounter h Use, refer to
i Identify precisely

(b) As we saw in the passage, it is possible to draw parallels between business and human
health. Match the common medical terms with their business equivalents. (5)

i Symptom a Malaise
ii Diagnose b Turn-around
iii Medical history c Track record
iv Course of treatment d Policy/strategy
v Recovery e Identify/conclude
f Sign/indicator

Q3. You have arranged to meet your colleague Priyanshu for coffee in the evening.
However, you have just heard an urgent message that you must leave for Kolkatta
immediately. Telephone Priyanshu and, (15)

 tell him you won’t be able to meet him


 tell him about the urgent business
 fix another tentative date

The answer must be in the form of dialogues.

Q4. You require 2,000 Slate Airdopes 141 items. Since it is a fast moving item, you are
ready to buy boxes for six months at once, provided you get a large enough discount.
Write a letter to your distributor negotiating a deal. Make use of the negotiation
techniques we discussed in the unit. (15)
Q5. Fill in the blanks with the correct form of the verbs in brackets: (10)

i. The consultant _____________ (never work) in London before she got this
contract.
ii. She recently _____________ (decide) to move to London.
iii. She ______________ (drive) to London when the storm began.

12
iv. While the manager _____________ (talk) to the consultant, the employees
_____________ (pack) the prints ready for dispatch.
v. Is that what those men __________ (work) on when I __________(come) in?
vi. Unless we invest in our staff, they _____________(not stay) with the company.
vii. After the initial launch, we ___________ (plan) to extend it to the rest of the
country.
viii. We would be doing much better if we ______________ (not waste) so much money
last year.

Q6. Complete the following phrasal verb in the sentences by inserting an appropriate
adverb. (10)
i. I can’t get to Munich this week, so I’m going to put ______________ my visit till
next week.
ii. Despite our efforts, the negotiations have broken _____________ again.
iii. I’m very relieved that the workers have called the strike _______________.
iv. Before you leave, make sure that you shut___________ the computer system.
v. I look _____________ to seeing you in the near future.
vi. To get through security, you’ll have to fill ________________ a form.
vii. I’m afraid I didn’t understand that point. Could we come __________ to it
afterwards?
viii. We’ve decided to increase our offer; we’ve put it ___________ by $ 30,000.
ix. Let’s throw this idea _________ and see if it has any potential.
x. He ran _____________ an enormous telephone bill.

Q7. Prepare Power Point Presentations (atleast 15 slides each) on the following.

i. Artificial Intelligence (10)


ii. 3D Printers and Their Applications (10)

Q8. Mark the stress in the following words: (5)

i. Delve
ii. Psychoanalysts
iii. Consultant
iv. Assess
v. Organization
vi. Identify
vii. Profitability
viii. Recommend
ix. Experience
x. Personnel

13
Course Code : MCS-013
Course Title : Discrete Mathematics
Assignment Number : BCA (2)/013/Assignment/2022-23
Maximum Marks : 100
Last Date of Submission : 31st October, 2022 (for July Session)
15th April, 2023 (for January Session)

There are eight questions in this assignment, which carries 80 marks. Rest 20 marks are for
viva-voce. Answer all the questions. You may use illustrations and diagrams to enhance the
explanations. Please go through the guidelines regarding assignments given in the
Programme Guide for the format of presentation.

Q1. (a) State and explain De Morgan’s laws for Boolean algebra. (3)

(b) Make truth table for followings. (4)


i) p→(~r  q)  (~p  r)
ii) p→ (~r  ~ q)  (p  ~ r)

(c) Give geometric representation for followings: (3)

i) {5, 5) x ( -2, -2)


ii) {1, 5) x ( -2, -3)

Q2. (a) Draw Venn diagram to represent followings: (3)


i) (A  B  C)  (A  B  C)
ii) (A  B  C)  (B  C)

(b) Write down suitable mathematical statement that can be represented by the following
symbolic properties. (4)

i) (  x) (  y) (  z)P
ii)  (z) (  y) (  z)Q

(c) Show whether √5 is rational or irrational. (3)

Q3. (a) Explain inclusion-exclusion principle with example. (2)

(b) Make logic circuit for the following Boolean expressions: (4)

i) (x'y'z') + (x'yz)' + (xz'y)


ii) ( x'yz') (xyz') (x'y'z)

14
(c) What is a tautology? If P and Q are statements, show whether the statement

(𝑃 → 𝑄) ∨ ( → 𝑃) is a tautology or not. (4)


Q4. (a) How many words can be formed using letter of PEPSUDENT using each letter at most
once? (2)

i) If each letter must be used,


ii) If some or all the letters may be omitted.

(b) Show that: (2)


Q => P and (~Q  P) are equivalent.

(c) Prove that 2n > n3 ,  n ≥ 10 (4)


(d) Explain principal of duality with the help of example. (2)

Q5. (a) How many different professionals committees of 10 people can be formed, each
containing at least 2 Professors, at least 3 Managers and 3 ICT Experts from list of 10
Professors, 6 Managers and 8 ICT Experts? (4)
(b) A and B are mutually exclusive events such that P(A) = 1/4 and P(B) = 2/5 and P
(AU B) = 1/2. What is the probability of P(A Ո B) (4)
(c) Explain addition theorem in probability. (2)

Q6. (a) How many ways are there to distribute 15 district item into 5 distinct boxes with:

i) At least two empty box.


ii) No empty box. (3)

(b) Explain principle of multiplication with an example. (3)

(c) Three Sets A, B and C are: A = {1, 2, 8,9,12,15,17}, B = { 1,2, 3 ,4, 10 } and
C {7, 9, 10, 11, 13}. Find A  B  C ; A  ~B  C; A  B  C and (A  ~C). (4)

Q7. (a) Find how many 3 digit numbers are even? (2)

(b) A coin is tossed n times. What is the probability of getting exactly p tails? (3)

(c) What is a function? Explain following types of functions with example. (3)
i) Surgective
ii) Injective
iii) Bijective

15
(d) Write the following statements in symbolic form: (2)
(a) Shyam is rich but unhappy
(b) Either do physical exercise or be ready for poor health

Q8. (a) Find inverse of the following function: (2)

x2 + 9
f(x) = x≠5
x−5
What is a relation? Explain equivalence relation with the help of an example. (3)

(b) Find dual of Boolean Expression for the output of the following logic circuit. (3)

(c) Explain Logical Connectives and Logical Quantifiers with the help of examples. (2)

16
Course Code : BCSL-021
Course Title : C Language Programming
Assignment Number : BCA(2)/L-021/Assignment/2022-23
Maximum Marks : 50
Weightage : 25%
Last date of Submission : 31st October, 2022 (for July Session)
15th April, 2023 (for January Session)

This assignment has only one question. This question is for 40 marks. Rest 10 marks are
for viva-voce. You may use illustrations and diagrams to enhance the explanations. Please
go through the guidelines regarding assignments given in the programme guide for the
format of presentation.

Q1. The Electricity Bill Calculator is an application-based micro project that calculates the
month’s electricity bill based on the appliances or loads and units consumed. People who
do not have a technical understanding of calculating power bills can use this program to
forecast/calculate their electricity bills. The application should have the following
features: (40)

 To display the Meter Number


 To display the previous meter reading
 Facility to enter present meter-reading
 To display the no. of units consumed
 To display the complete Tariff Structure (Domestic, Non-Domestic, Industrial)
 Provision to input the no. of units consumed per month
 To display the bill-amount payable as per the tariff structure
 To display the due date of the payment

Note: Assumptions can be made wherever necessary and list them. You must execute the
program and submit the program logic, sample input and output along with the necessary
documentation for this question.

17
Course Code : BCSL-022
Course Title : Assembly Language Programming Lab
Assignment Number : BCA(2)/L-022/Assignment/2022-23
Maximum Marks : 50
Weightage : 25%
Last Dates for Submission : 31st October, 2022 (For July Session)
15th April, 2023 (For January Session)

This assignment has two questions of total of 40 marks. Rest 10 marks are for viva voce.
Please go through the guidelines regarding assignments given in the programme guide for
the format of presentation.

Q1. Design a two-bit counter circuit that does reverse counting. It has the states: 11, 10, 01 and
00. The initial state of the counter may be assumed to be 11. The counter will be in
following successive states: 11, 10, 01, 00, 11, 10, 01, 00, 11…Use J-K flip flops to
design the circuit. You should design the circuit using state transition diagram and
Karnaugh's maps. (10)

Q2. Write and run following programs using 8086 assembly language. (3×10 = 30)

(a) Write and run an 8086-assembly language program that accepts two input digits from the
keyboard and converts it into a two-digit packed BCD number. This resultant number
should be stored in a byte location in the memory. For example, if you input digit ‘3’ and
‘5’ then it will be converted to packed BCD number 35, which is 001101012. This result
should be stored in a byte memory location.

(b) Write and run (using appropriate calling program) a near procedure in 8086-assembly
language, which is passed a single parameter by the calling program. The procedure
checks if the input parameter is divisible by 5 or not. If the input parameter is divisible by
5, then a value of 1 is returned to the calling program, else a value 0 is returned. The
calling program based on the returned value prints “Divisible” or “NOT Divisible”. You
may assume that the parameter value would always be greater than or equal to 1. Make
and state suitable assumptions, if any.

(c) Write and run an 8086-assembly language program that computes the multiplication of 5
natural numbers, starting from number 2. You should use the looping construct to write
this program. The result is stored in a word memory location. Make and state suitable
assumptions, if any.

18

You might also like