ES2C4 Computer Architecture and Systems



Module Code:

ES2C4

Module Title:

Computer Architecture and Systems

Assessment Setter:

Dr Sam Agbroko [email protected]

Assessment Weighting:

20%

Target Learning Outcome:

● Represent different types of data in binary and perform arithmetic operations on them.

● Create basic C programs.

Feedback:

Brief comments in the feedback textbox on Tabula.

Deadline:

31 August 2021


1. Introduction

This assessment is designed to allow you to demonstrate your understanding of the concepts presented in lectures and labs of the ES2C4 Computer Architecture and Systems module. It will also assess your ability to efficiently use computing resources, represent different types of data in binary and carry out basic arithmetic operations.

All programming tasks are to be written in the C programming language. Add comments to help others understand your code. Enter your solution to the tasks below in a word document and submit a .docx version of the document. Please include all the code in the document you submit.


2. Tasks

A. Write a program that takes a binary number (from 0 to 255) from a user and returns the number in a decimal format. The user should enter a binary number in the console window and the number, in a decimal format, should be printed in the console window.

(25 marks)


B. Write a program that takes a binary number (from 0 to 255) from a user and returns the number in a hexadecimal format. The user should enter the binary number in the console window and the number, in hexadecimal format should be printed in the console window.

(25 marks)


C. During the design of programs for a 32-bit computing architecture, explain how pointers could be used to improve the efficiency of the programs. Describe instances where the use of pointers could be less efficient in a program.

(25 marks)


D. Explain how the header and source files could be used to improve the design of a program.

(25 marks)