Faculty of Computer Studies Course Code: M150A Course Title: - TopicsExpress



          

Faculty of Computer Studies Course Code: M150A Course Title: DATA, COMPUTING and INFORMATION – A Question1: (20 marks) 1. Computers can be used as a tool of finding in the sense of geographical location. GPS is the U.S. space-based global navigation satellite system. Based on your knowledge, answer the following questions. a. What GPS stands for? b. How does this system work? c. What are the advantages of GPS d. Give examples of applications for GPS 2. The process of crossing the boundary from analogy world to computer`s digital world called encoding. a. Briefly explain the main two steps for the encoding process. b. Find and explain encoding technique for visual information. c. Find and explain encoding technique for sound information. d. Why it is impossible to make a perfect digital coding? 3. Compare between the following terms by definitions. a. Lossless compression vs. Loosy compression b. Software vs. Firmware c. RAM vs. ROM d. Compilation vs. Interpretation e. Supercomputer vs. Supercluster 4. Draw the diagram for each of the 3 different instructions` execution mechanisms in most programming languages Question 2: (20 marks) 1. For the given numbers find their equivalent in each specified base. Show your steps. Decimal Binary Octal Hexadecimal 38 1000001011 1253 2A8 2. Use truth table to verify and prove the Boolean expressions X AND (X OR Y) X X Y (X OR Y) X AND (X OR Y) 3. Consider a 3-hour film to be displayed on a computer at 24 fps. Each frame is 720 x 230 pixels and a 24-bit RGB colour encoding is being used. How many bytes will be required to represent the whole film? Question3: (20 marks) 1. Explain with an example the difference between the following JavaScript errors. • Syntax error • Semantic error 2. What output does the following script produce? var a = 3; var b = 6; a += 4; b *= 2; document.write(a + + b + ); a++; b--; document.write(a + + b + ); a = 6; b = 3; a /= b; document.write(a + + b + ); 3. Consider the following structure: Read the temperature if (the temperature is less than 15) write ‘The weather is very cold’ else if (the temperature is less than 25) write ‘The weather is nice’ else write ‘The weather is hot’ go to a new line write ‘Thank you’ a. Does the above structure involve selection, repetition or both? b. Specify the Boolean expression(s) in the given structure. c. What is the exact output for the following values of temperature: 16, 27 and 45? d. Draw a flowchart for the above structure. 4. The following flowchart diagram shows a loop structure program. START Input Low (1), High (10) Count = Low Print Count STOP Y is Count High N Count = Count +1 a. How many times will the loop be executed? b. What is the exact output after these instructions have been executed? Use and draw trace table c. What will be the output if the condition “Count ≥ High is replaced by “Count High? Explain your answer. Question4: (20 marks) 1. Write JavaScript code equivalent to the structure given in Question 3 part (3). Insert a screenshot showing the resulted output when the three temperature values entered. 2. Write a JavaScript program that converts a person’s age to “dog years”. Folk wisdom says a person’s age in dog years is their normal age multiplied by 7, so a 10-year-old person would be 70 years old in dog years. The script should prompt the user for their age, and then print out a message about how old that person would be in dog years. If the age someone types in is less than zero, then tell the user they made a mistake and don’t do the conversion. (You don’t need to ask them to type in their age again; they only get once chance.) a. Run your program with print out a message about how old that person would be in dog years. b. insert two screenshots: • One showing the program prompting the user for their age. • One showing the result if the age someone types in is less than zero.
Posted on: Fri, 14 Mar 2014 10:41:50 +0000

Trending Topics



Recently Viewed Topics




© 2015