EXAMSHARE

Western Delta University, Oghara Delta State

department of computer science
college of computing
western delta university

first semester examination 2022/2023 session

CSC209 - foundations of sequential programming time: 2hrs: 30mins

answer four (4) questions


  1. Question 1

      1. Define Computer Programming (1.5 marks)
      2. Differentiate between interpreters and compilers (2 marks)
    1. What is program design? List and explain five (5) aims of program design (6 marks)
    2. With the aid of a suitable diagram, discuss the program development life cycle (8 marks)
  2. Question 2

    1. Using a sample pseudo-code in each case describe the following control structures:
      1. Sequence (2.5 marks)
      2. Selection (2.5 marks)
      3. Repetition (2.5 marks)
    2. Write a pseudo-code that computes and displays the product, sum, average of three (3) integer numbers on the screen (5 marks)
    3. Draw the corresponding flowchart (5 marks)
  3. Question 3

    1. Define the following Assembly language terms:
      1. Mnemonics
      2. Labels
      3. Operands
      (4.5 marks)
    2. Consider the Assembly language code below and use it to answer the question that follows:READ X
      ADD Y
      STORE Z
      PRINT Z
      HALT
      Explain the code, one line after the other (3 marks)
    3. Write explanatory notes on the following:
      1. High level languages
      2. Fifth generation languages
      (4 marks)
      1. Convert 10010 to Base 8 (2 marks)
      2. Convert 75110 to Base 16 (2 marks)
      3. Convert 2210 to Base 2 (2 marks)
  4. Question 4

    1. Explain the following data storage representations:
      1. Binary Coded Decimal
      2. Unsigned representation
      3. Signed representation
      (6 marks)
      1. Store 200 and 260 in a 16-bit memory location using unsigned representation (4 marks)
      2. Store 30 and -40 in an 8-bit memory location using signed representation(4 marks)
      3. Give the BCD equivalent of 1827 and 124 (3.5 marks)
  5. Question 5

    1. Compute the following:
      1. NOT 101101010111
      2. 101001011 OR 010110100
      3. 10000 AND 01011
      4. 101110111011 XOR 001111011101
      (6 marks)
    2. Explain the following shift operations:
      1. logical shift left
      2. logical shift right
      3. circular left shift
      4. circular right shift
      (6 marks)
      1. Perform shift left operation on 1000110 (2 marks)
      2. Carry out shift arithmetic right on 01100110 (2 marks)
      3. Calculate logical shift right on 11001100 (1.5 marks)
  6. Question 6

    1. Define machine architecture (2 marks)
    2. Draw the Von Neuman model of a conventional digital computer and briefly explain its Principle of operation (5 marks)
    3. Write explanatory notes on the following:
      1. Central Processing Unit
      2. Data registers
      3. Instruction registers
      4. Program counter
      5. Memory system
      (7.5 marks)
    4. State three (3) functions of the processor (3 marks)