# MCA 1st Semester Assignment 2013 – 2014

## MCS-011  Problem Solving and Programming

Q 1: Write a C program to find out perfect numbers from 1 and 50.

Q 2: Write an algorithm, draw a corresponding flowchart and write an interactive program to convert a binary number to its octal equivalent.

Q 3: Write the function strreplace(s, chr, repl_chr) which will replace each occurrences of character chr with the character repl_chr in the string s. The function returns the number of replacements. Place the source code of this function in a file named strreplace.c

Q 4: Writer an interactive C program to check whether the given string is a palindrome or not, using pointers.

Q 5: Write an interactive program called “WEIGHT CONVERTER” that accepts the weight in milligrams / decigrams / centigrams / kilograms /ounces / pounds / tons and displays its equivalent in grams.

Q 6 : Write an interactive program to generate pay slips for the staff of size 12 employees (2 members are clerks, one computer operator, 6 salesmen, 3 helpers) , working in a small chemist retail shop.

Assumptions can be made wherever necessary. The payslip should display the employee no., employee name, no. of days worked during the month, date of generation of the payslip, month for which the salary is being paid, all the details of the payment, deductions, gross-pay and net-pay.

## MCS-012  Computer Organisation and Assembly

Question 1 (covers Block 1)

(a) Perform the following arithmetic operations using binary signed 2’s complement notation for integers. You may assume that the maximum size of integers is of 10 bits including the sign bit. (Please note that the numbers given here are in decimal notation)

i) Add – 512 and 198
ii) Subtract 400 from –98

Please indicate the overflow if it occurs.

(b) Convert the hexadecimal number: 21 3A FE into binary, octal and decimal equivalent.

(c) Convert the following string into equivalent “UTF 16” code – “Email addresses always use @ sign”.

Are these codes same as that used in ASCII?

(d) Design two logic circuits. The first circuit takes 3 bit input and produces an odd parity bit output of the three input bits. The second circuit takes the 3 bit input and the parity bit (which is produced as output of circuit 1) and outputs 0 if the odd parity is satisfied, else it outputs 1. Draw the truth tables and use K-map to design the Boolean expressions for each of the output bits. Draw the resulting circuit diagram using AND – OR – NOT gates.

(e) Design a two bit counter (a sequential circuit) that counts as 0, 1, 2, 0, 1, 2… and so on. You should show the state table, state diagram, the k-map for circuit design, logic diagram of the resultant design using D flip-flop.

(f) Design a floating point representation of size 24 bits closer to IEEE 754 format. The number should have a 7 bit biased exponent having a bias of 64. You may assume that the mantissa is in normalised form with first bit being the sign bit of mantissa. Represent the number (34.125) 10 using this format .

Question 2 (covers Block 2)

(a) A RAM has a capacity of 256K × 8.

(i) How many data input and output lines does this RAM need? Explain your answer.
(ii) How many address lines will be needed for this RAM? Explain.

(b) A computer have 1024 words RAM with a word size of 16 bits and a cache memory of 16 Blocks with block size of 32 bits draw a diagram to show the address mapping of RAM and Cache, if (i) direct cache mapping is used, and (ii) the two way set associative memory to cache mapping scheme is used.

(c) Compare various Input/output techniques that are used in a general purpose computer. Which I/O technique will be used for each of the following situation? Give justification in support of your answer.

(i) Data input to a chat server
(ii) Copying the data from one disk file to another disk file

(d) Define various terms relating to access of a Magnetic disk. Find the average disk access time that reads or writes to a 2048 byte sector. Assume that the disk rotates at 3000 rpm; each track of the disk has 16 sectors and data transfer rate of the disk is 64 MB/second.

(e) What is the purpose of SCSI? Compare and contrast SCSI with that of IDE? Which of the two is better for a Server? Justify your answer. (Word limit for the answer is 200 words ONLY)

(f) Define each of the following term. Explain the main purpose/ use/ advantage. (Word Limit for answer of each part is 50 words ONLY)

(i) Inode
(iii) Raster Display
(iv) Use of colour depths
(v) Scan codes in keyboards
(vi) Resolution of monitor

Question 3 (Covers Block 3)

(a) Assume that a new machine has been developed. This machine has 64 general purpose registers of 64 bits each. The machine has 2 GB main memory with memory word size of 32 bits. The Instructions of this machine are of one or two memory words. Each instruction should have at most two operand addresses. The machine implements the internal stack on 32 of its registers. List four addressing modes that must be supported by such a machine. Give justification of the selection of each of the addressing modes.

(b) Assume a hypothetical machine that has only PC, AC, MAR, IR, DR and Flag registers. (You may assume the roles of these registers same as that are defined in general for a Von Neumann machine). Also assume that the instruction of this machine has only one operand address (it must be a register operand, except for the load and store instructions that require this operand to be a memory operand). The second operand is assumed to be any one of the register depending on
the type of instruction. It has an instruction:

LOAD InsMem // this instruction causes next instruction that is in the memory location pointed to by PC register to get
loaded into the IR register. This instruction also uses MAR, DR, PC and IR registers.

Write and explain the sequence of micro-operations that are required to load and execute the next instruction. Make and state suitable assumptions, if any.

(c) Assume that you have a machine as shown in section 3.2.2 of Block 3 having the micro-operations as given in Figure 10 on page 62 of Block

3. Consider that R1 and R2 both are 8 bit registers and contains 10101010 and 10010110 respectively. What will be the values of select inputs, carry-in input and result of operation if the following micro-operations are performed? (For each micro-operation you may assume the initial value of R1 and R2 as defined above)
1) Transfer R1
2) Shift Right R1
3) Add R1 and R2 with carry
4) Complement R1

(d) Explain the Control Memory Organisation with the help of a diagram. (3 Marks) Explain how this control memory may be used to perform various instruction cycles.

(e) What is the use of pipelining in a processor? Explain with the help (3 Marks) of an example. Draw the diagram and explain a four stage instruction pipeline which has the following cycles:

• Instruction Fetch
• Operand Fetch
• Execute and store results

(f) Assume that a RISC machine has 128 registers out of which 32 registers are reserved for the Global variables. Assume that 10 registers are to be used for storing two input parameters, two output parameters and 6 local variables of a single function. Explain with the help of a diagram, how the remaining registers can be used as overlapped register windows that may be used for implementing procedure call. Also show the parameter passing for the subroutine calls.

Question 4

(a) Write a program in 8086 Assembly Language (with proper comments)  to find if the two given strings of length 5 are reverse of each other. You may assume that both the strings are available in the memory. Make suitable assumptions, if any.

(b) Write a program in 8086 assembly language to convert a two digit unpacked BCD number into equivalent ASCII digits and a packed BCD number. The packed BCD number is to be stored in BH register. Your program should print the two ASCII digits. You may assume that the unpacked BCD numbers are in the AL and BL registers.

(c) Write a simple near procedure in 8086 assembly language that receives one parameter value in AL register from the main module and returns sign bit of the input parameter. Make suitable assumptions, if any.

## MCS- 14  Systems Analysis and Design

Q 1:  Develop SRS for Assignment Marks Recording System. When a student submits assignment at Study Center, it is evaluated and Marks are sent to RC. RC will check the validity of the Marks as well as other details such as validity of Registration, Fee Payment, etc. and then will forward to IGNOU HQs for recording them in the Grade Card of the student. Use IEEE format. Make necessary assumptions.

Q 2: Draw the DFDs upto 3rd level for Assignment Marks Recording System.

Q 3: Draw ERD for Assignment Marks Recording System. Make necessary assumptions.

Q 4: Assume that an organization does not implement MIS. However, after a couple of years, it decides to implement it. What problems do you anticipate in implementing MIS in an organization which did not implement earlier? How to handle them?

## MCS-015  Communication Skills

Q 1: Read the passage below and answer the questions that follow:

Training to become a respiratory therapist, a fire-safety technician, a floral designer, a locksmith, a forensic science assistant, or a wedding planner, in most western countries happens in a vocational institute or community college. In
Germany and several other central European countries, they have a formal dual education system where training at a vocational school (Berufsschule in Germany) is combined with apprenticeship at a company or guild. In the US, a network of career institutes and community colleges, both traditional and online, provide a wide variety of career and technical education options. The Association for Career and Technical Education is the largest national association in the US dedicated to the advancement of education that prepares youth and adults for careers. Successful vocational training systems abroad have three common elements – they are adaptive to changing needs of the economy, they are collaborative and they offer credible (and portable) certification. This portability is geographical and also between
certificates, diplomas and degrees.

In India, government Industrial Training Institutes and state technical institutes dominate the vocational training system. There are over 1,800 ITIs in India. There are also eleven technical training institutes for women. The World Bank has
allocated \$359 million for upgrading several institutes to centres of excellence. The plan was to take place under a public-private-partnership model. It has seen implementation delays and has largely been a failure because critical decision-
making elements, such as staffing and course fees, have been retained by the government. Periodic reviews of this programme available in public domain are voluminous documents with lots of tables and numbers that suggest only modest improvement.

The goal of a vocational system is clear. It is jobs. On that score and on others, the entire chain of post-secondary vocational and career training to apprenticeship and employment is broken in India. Existing institutes do not embody either adaptability or collaboration – imperative for success in a fast evolving economy. Even if they are successfully upgraded they do not offer the capacity required for the size of the economy. The full current capacity for public and private vocational training centres is less than a million seats. This is less than a fifth of India’s desired annual capacity.

Modern India needs to change its failed post-independence model to achieve that objective. Tinkering will not do the trick. A brand new architecture for our vocational training system is required. Governments – both state and Union – should focus on skill standards and certification portability. For the rest, vocational training should be fully privatized.

This private ecosystem needs to be organized under a governance umbrella (made up of educators, government and business) that becomes the instrument for standards, evolution, collaboration, certification and portability.

The National Skill Development Corporation, which has made a good start on retraining the workforce, should be retained. It adds a dimension to this framework. Apprenticeship regulation (Apprenticeship Act, 1961) should be relaxed and rigid
conditions eliminated so long as minimum wages are paid. To provide for wider access, online and distance career education should be encouraged when standards are met through credible testing.

“Start by doing what’s necessary, then do what’s possible, and suddenly you are doing the impossible,” said Saint Francis of Assisi. Narayan Ramachandran, Mint 22, April, 2013

a) How is the European system of vocational education different from the American?
b) What are the three elements of successful vocational training in the West? Discuss in your own words.
c) Why is the Indian vocational education system failing according to the writer? Discuss.
d) According to the writer what are some of the steps the government can take to improve the vocational training system in India?
e) What title would you give the passage? Give reason.
f) Give the meaning of the words ‘adaptability’ and ‘collaboration’.

Q 2:  Alok Gupta works for the Nadars. Complete the description of his work. Use the Present Simple or Present Continuous form of the verbs in brackets.

Alok Gupta (i)…………………(work) in the Public Relations department. Every day he (ii)………………(spend) a lot of time with foreign journalists. They often (iii)…………… (phone) him and (iv)……………….(ask) for an appointment. He (v)………….. (speak) to three reporters from Britain at the moment. He (vi)……………… (give) them information about Nadars for their magazines. He (vii)…………….. (enjoy) his job very much because he (viii)……………. (meet) a lot of interesting people and every day is different. Today, for example, Alok (ix)…………………. (organize) a visit for a group of French people. They (x)………..… (make) a film for their TV channel. They (xi)……………….. (film) the Nadars’ at the Gallery of Modern Indian Art, at the moment. The newspaper and TV people often (xii)…………… (want) news stories on Nadars and it is Alok’s
job to help them.

Q 3: Complete the conversation. A part of the conversation is given.

Tony: Yes. ……………………………………………………… .
Tony: …………………………………… . So I sent in a letter of application along with my curriculum vitae. Three weeks later they said I was on their short list of six candidates for the job. They asked me to go for an ……………………………………………………… .
Tony: Well, first they checked my ………………… – age, family, education, and that sort of thing. Then they asked about my …………….. .
Roohi: Did they offer you the job immediately?
Tony: …………………….
Roohi: So, what exactly is your new ……………………..?
Tony: Assistant Sales Manager.
Roohi: ………………… . Do you get any nice fringe benefits with the job?
Tony: ……………………………………………………………………… .
Roohi: That’s wonderful.
Tony: ……………………………………………………………… .

Q 5:  Locate an ad or a job description for a post you would like to have. Write a cover letter as well as your curriculum vitae. Please copy the ad in your answer.

Q 6: The sentences below are in the passive voice. Write them in the active voice.

i . I was allowed by the court to file an appeal
ii. He was awarded by the company president.
iii. Two hundred people are employed by the factory.
iv. He was given a very high salary by the new company.
v.  The photographs were taken by a leading photographer in London.
vi.  He has been seen by the police in a restaurant.
vii.  My car was hit on the back.
viii.  We were shown the beautiful paintings.
ix.  He was taught by one of the leading physicists.
x.  I was handed in the letter yesterday.

Q 7: Write short notes on the following:

i Barriers to communication.
ii Language and style of Minutes of Meeting.
iii How to be successful in a Group Discussion.
iv Body language when making a presentation.

Q 8: You are the editor of your college magazine. You would like to request the District Collector for an interview. Telephone the District Collector’s office and speak to her secretary, Ms. Sushma Reddy. You must do the following:

Introduce yourself
Explain why you have called
Ask when you can get an appointment with the Collector.

## MCSL-16  Internet Concepts and Web design (Lab Course)

Q 1: Answer the following questions:

a) Create a web page of your study centre using HTML tags only having the following features:

(i) You should include the photograph of the study centre at the top of the page
(ii) It should include two tables – first providing name, qualification and subject being counselled for every counsellor and second displaying the theory and practical counselling schedule (assume only one batch).
(iii) The page should include a list highlighting the available resources at the study centre.
(v) The page should provide links to useful web pages for the students including a link to IGNOU web site.

b) Create another page which contains a form that provides feedback about the assignments to the student. The form is to be filled by the assignment evaluator. You must use JavaScript to check that all the required fields are entered by the evaluator.

c) Write a program using VBscipt that adds that two upper triangular matrices. The program should be efficient.

d) Design a main web page which displays a pulled down menu:
Home (the page itself)
Dates of Assignment Submission
Dates of Term End Examination

Each of this menu option should link to a different web page. Also all the pages should include the current date and time.

## MCSL-17  C and Assembly Language Programming

Section 1: C Programming Lab

Q 1: Write a program that takes a decimal number and converts it into binary, octal and hexadecimal equivalents. Your program should have functions for each type of conversion. These functions should implement algorithms to perform these conversions. Predefined functions OR %x and %o codes are not allowed. The output of the programme should be stored in a text file named ourput.txt.

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

Section 2: Assembly Language Programming Lab

Q 1: (a) Write a program in assembly language to calculate the average of numbers in an array.

(b) Write an assembly language program to accept a decimal number and display it’s two’s complement representation in binary and hexadeimal formats.

(c) Write an assembly language program to implement a stack.

(d) Write a Program in assembly language that has two subroutines:
One for encrypting alphabets of a string and second for decrypting the encoded string. In Encryption, simply convert a character /number into its predefined numerical/character value. Decryption is a reverse process of encryption. Write suitable Main program in C that calls these function. Test your program suitably.

More Interesting Content