This paper is not to be removed from the Examination Halls

advertisement
This paper is not to be removed from the Examination Halls
UNIVERSITY OF LONDON
IS1168 ZA
BSc degrees and Diplomas for Graduates in Economics, Management, Finance
and the Social Sciences, the Diplomas in Economics and Social Sciences and
Access Route
Introduction to Computer Systems Architecture and Programming
Wednesday, 27 May 2015 : 10:00 to 13:00
Candidates should answer FOUR of the following EIGHT questions: TWO from Section
A and TWO from Section B. All questions carry equal marks.
PLEASE TURN OVER
© University of London 2015
UL15/0277
Page 1 of 5
D1
SECTION A
Answer two questions from this section.
1.
2.
In 1945 John von Neumann wrote a famous Report in which he proposed ideas for an
architecture for a computer called the EDVAC. The development of the EDVAC is viewed as
an important milestone in the development of computer technology.
(a)
Explain and discuss the significance of von Neumann's ideas and the development of
the EDVAC for the field of computer architecture.
(15 marks)
(b)
Apart from the ideas realized in the EDVAC computer what do you consider to be the
most significant advancement in the field of computer architecture? Justify your answer.
(10 marks)
Boolean logic provides the theoretical basis for the logic gates circuit design that is used
when constructing a computer.
(a)
Explain the underlying ideas of Boolean logic. Give examples of Boolean operations to
support your explanation.
(6 marks)
(b)
Explain what a gate is and how different gates implement the ideas of Boolean logic.
(5 marks)
(c)
A machine (output M) operates if one of the following conditions is true:
- if the automatic mode (input A) is switched on and the safety switch (input S) has been
set
- if the manual mode (input M) is on and the button B (input B) has been pressed
- if the override button (input O) is not on.
i.
ii.
Create a circuit that represents the operation of this machine. State any
assumptions you might make.
(10 marks)
Create a truth table for your circuit.
(4 marks)
© University of London 2015
UL15/0277
Page 2 of 5
D1
3.
Within many modern computers a hard disk drive is used to store different types of
information as different patterns of magnetization (representing different binary states) on the
rapidly rotating magnetically coated surface.
(a)
Describe how we measure the storage capacity of a hard disk and describe two ways in
which text might be represented on the hard drive storage.
(5 marks)
(b)
Assume that an average journal is 50 pages long, and that each page contains 600
words.
Calculate roughly how many journals can be stored on a 500Gb hard drive (assume
1000 bytes to a kilobyte).
(6 marks)
(c)
Describe how images may be represented on the hard drive storage. Distinguish
between black and white images and colour images.
(4 marks)
(d)
Convert the numbers 12310 and 23010 into binary numbers. Then use these binary
numbers to show how binary addition is carried out in the binary number system. Make
sure you show and explain the steps you are taking to get to your results.
(6 marks)
(e)
Describe two ways in which negative numbers can be represented in binary.
(4 marks)
4.
The Internet today consists of a massive worldwide connection of LANs, WANs and MANs
involving billions of computers.
(a)
Describe the differences between LAN, WAN and MAN. Include an example of different
network technology that might be used for each.
(9 marks)
(b)
Discuss how the four layers of the TCP/IP work to transmit an email between two
people across the globe. You should describe each layer, discuss the protocols
involved, and explain the mechanisms used to ensure successful delivery of the
message.
(16 marks)
© University of London 2015
UL15/0277
Page 3 of 5
D1
SECTION B
Answer two questions from this section.
5.
Within Java a class can be considered as a "blueprint" from which individual objects are
created through instantiation.
(a)
Consider the class "university student".
i.
Suggest 4 attributes and 2 methods for the university student class.
(2 marks)
ii.
Create a class for your university student using the Java Programming Language.
Include explanatory comments in your code.
(8 marks)
(b)
Explain the underlying ideas of object-orientation. Use the class created in (a) to
illustrate how Java implements the ideas of object-orientation.
(10 marks)
(c)
Why, in your view, has Java become a leading programming language?
(5 marks)
6.
Repetition is an important way to allow operations to be repeated on a large number of
different data items.
(a)
A shop sells a variety of different products, each at different prices. The shop needs a
program that will operate as a (basic) cash-register (till). The program should:
- ask for the price of each item
- ask, for each (new type of) item, how many the customer wants to purchase
- record how many items the person is purchasing in total
- stop asking for the price of each item when the user enters a price of -1 (a negative
number)
- then display the number of items sold, and the total price for all the items sold.
i.
Use pseudocode to describe the algorithm for this program.
(8 marks)
ii.
(b)
Write a Java program for your algorithm. Include comments to explain your
program.
(12 marks)
Describe nested loops and explain why they are important, using an example of a
program which might need a nested loop (you do not need to provide any code).
(5 marks)
© University of London 2015
UL15/0277
Page 4 of 5
D1
7.
The if statement is used to change the flow of control within a program.
(a)
With the help of a simple example, explain how the if statement can change the flow of
control within a Java program.
(5 marks)
(b)
Consider a program called CurrencyConversion that offers the user the choice of
converting US Dollars into British Pounds or the other way around. (You may assume
that 1 US Dollar = 0.663 Pounds.)
i.
Use pseudocode to describe the algorithm for this program.
(8 marks)
ii.
8.
Write a Java program for your algorithm. Include comments to explain your
program.
(12 marks)
Arrays are a way to organize several elements of the same data type into a format that is
more easily manageable within a program.
(a)
You have been asked to write a program to help a college with the recording of exam
results. The college has up to 1000 students. Each student has to write an end-of-year
exam in each of the 8 subjects they have to study.
Your program should use a multi-dimensional array and



i.
for each student, request and record the student ID and the 8 exam results. (The
student ID is an 8 digit number.)
for each student, calculate and record the average exam mark achieved.
identify the student with the best average mark and display the result on the screen.
Use pseudocode to describe the algorithm for this program.
(10 marks)
ii.
(b)
Write a Java program for your algorithm. Ensure that you use comments
throughout your program code to explain how your program works.
(13 marks)
Outline a major disadvantage that is associated with the use of arrays.
(2 marks)
END OF PAPER
© University of London 2015
UL15/0277
Page 5 of 5
D1
Download