Instructions: Answer ALL FIVE (5) questions. Each question carries SIXTEEN (16) marks. Please write your answers clearly. _____________________________________________________________ Question 1 (a)...

Instructions: Answer ALL FIVE (5) questions. Each question carries SIXTEEN (16) marks. Please write your answers clearly. _____________________________________________________________ Question 1 (a) Using appropriate logic gates, draw a combinational logic circuit for a TWO (2) bits adder. Please include the truth table and explain your choice of logic gates. (10 marks) (b) Write the Boolean expression that represent the following combinational circuit, include the logic table and output expression. (6 marks) Question 2 (a) Write a C program to perform the following: i) Request the user to enter 10 different numbers into an array ii) Request the user to enter a number and check if the number appears in the array. iii) Display ‘Found’ if the number appears anywhere in the array iv) Display ‘Not found’ if the number is not found.


Page 1 of 4 Full time Diploma in Information Technology Intake 64 Fundamental of Computer Systems Main Examination Date of Examination : 16 December 2020 Exam Duration : FIVE (5) hours Time : 4pm – 9pm Weightage : 80% Total Score : 80 marks Instructions: 1. This is a remote open exam book examination. Any student found to have plagiarised (e.g. copying directly from the source without making attempts to write in your own words) with their answers, will be deemed to have committed an academic offence leading to penalties. 2. Only Basic Calculator is allowed. Scientific, Programmable & Financial Calculators NOT allowed. 3. This paper consists of ONE section with a total of FIVE (5) questions (80 marks) 4. This examination paper consists of 4 pages (including this cover page). Check that you have all the pages. No part of this document, whether image, text or otherwise, may be copied, reproduced, published, adapted, modified, distributed, transmitted, communicated and/or stored in any form Page 2 of 4 Instructions: Answer ALL FIVE (5) questions. Each question carries SIXTEEN (16) marks. Please write your answers clearly. _____________________________________________________________ Question 1 (a) Using appropriate logic gates, draw a combinational logic circuit for a TWO (2) bits adder. Please include the truth table and explain your choice of logic gates. (10 marks) (b) Write the Boolean expression that represent the following combinational circuit, include the logic table and output expression. (6 marks) Question 2 (a) Write a C program to perform the following: i) Request the user to enter 10 different numbers into an array ii) Request the user to enter a number and check if the number appears in the array. iii) Display ‘Found’ if the number appears anywhere in the array iv) Display ‘Not found’ if the number is not found. (12 marks) (b) Briefly explain why the naming convention for variables should be meaningful and list any TWO (2) good programming practices that you know of in naming variables. (4 marks) Page 3 of 4 Question 3 (a) Identify and correct the errors in each of the following statements: i) scanf( "d", value ); ii) printf( "The product of %d and %d is %d"\n, x, y ); iii) if ( number => largest ) largest == number; iv) if ( x = y ); printf( %d is equal to %d\n", x, y ); (8 marks) (b) Write a C program that prompts the user for 5 integers and then prints out the average of the 5 integers. The average should be rounded to 2 decimal places. (8 marks) Question 4 (a) Briefly explain using relevant examples, the differences(s) between counter-controlled and sentinel-controlled repetition. (4 marks) (b) Write a fully annotated C program to request the user to enter two numbers and pass them to a function that compute the total. Print the result from the main calling program. (12 marks) Page 4 of 4 Question 5 (a) Develop the logic table, circuit diagram and the 4 output logic expressions for a 2-bit decoder. (10 marks) (b) With the aid of a diagram, briefly explain how the different types of memory helps to improve the performance of the computer system. (6 marks) - End of Paper-
May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here