Assignment 1

You might also like

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

Introduction to Computing

Section B
Assignment # 1
Deadline: 5:00 PM Friday, September 30, 2016

1. Using paper and pen, manually convert the following decimal numbers into binary
numbers. Show the process that you used for each conversion.

a) 100 b) 256 c) 27 d) 48 e) 112


2. Using paper and pencil, manually convert the following binary numbers into decimal
numbers. Show the process that you used for each conversion.

a) 100 b) 101 c) 1100 d) 10101 e) 1111


3. Describe what is wrong with the following sequence:
10 100 110 1000 1001 1100 1110 10000
4. Write down your full name, such that each part of your name (first name, middle
name, last name etc.) starts with the capital letter followed by small letters. Convert
your name into ASCII binary code. (Hint. First convert each character into its ASCII
decimal equivalent then into respective ASCII binary code).
5. Draw a flowchart and then convert into a pseudocode to represent the logic of a
program that accepts the input of a series of 10 numbers. The program will display
“Even Number” if number entered is even. Otherwise the program will display “Odd
Number. (Hint: A number n is even if n%2=0 otherwise it is odd)

6. Suppose you are part of a software development team and you are asked to draw a
flow chart of an algorithm.
Algorithm’s Details: The given algorithm is taking a number n as input from user
and print the sum of even and odd numbers from 1 to n. The algorithm scans from 1
to n. It checks whether the number is even or odd. If number is even, add that number
in SUM_EVEN and if it is odd, then add it in SUM_ODD and increment the value of
n by 1.
Instructions:
1. Your task is to draw the Flow chart of the given algorithm.
2. Check the symbols used for each building block of an algorithm for flowchart.
3. Use appropriate symbols for each type of statement.

7. There are many situations in which your computer does not have enough physical
memory (RAM) to meet the requirements of a software program. For example,
assume an older desktop has 256MB of physical RAM installed. How would a
program that requires 512 MB of RAM run on your machine? Explain your answer ?

You might also like