COSC2473 Introduction to Computer Systems
Introduction to Computer Systems
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
RMIT Classification: Trusted
School of Computing Technologies
COSC2473 Introduction to Computer Systems
Assignment 1
Assessment Type: Individual assignment; no group work.
Submit online via Canvas → Assignments → Assignment 1.
Clarifications/updates may be made via announcements and relevant
discussion forums.
Due Date: Week 5, Friday 20th August 2021, 11:59pm.
Weighting: 150 marks that contributes 30% of the total assessment.
1. Overview
For this assignment you are required to
1. Demonstrate your understanding of number systems, such as decimal, binary, octal, and
hexadecimal.
2. Perform binary addition and subtraction using two's complement.
3. Solve bit manipulation problems using bitmasks.
4. Derive the Boolean expression and produce the truth table for the given logic circuit diagram.
5. Perform the process of encrypting and/or decoding the message with the help of
Hamming/SECDED code.
6. Do some research and find out how real (floating point) numbers are represented in Binary.
2. Learning outcomes
This assessment is relevant to the Course Learning Outcomes CLOs 1-5.
3. Assessment details
This assessment will determine your ability to
1. Understand the concepts taught over the first 4 weeks of the course.
2. Work independently in self-directed study to research the identified issues.
4. Submission
Prepare the answers to this assignment in an electronic format and convert to a single Acrobat
PDF (.pdf) file for submission, with the filename being your student number (e.g., S1234567.pdf)
containing all the answers to all the questions in this assignment.
Paper submissions are not accepted; if some parts of the assignment have been completed by
hand, scan these in and include this in your electronic submission.
Page 2 of 9
RMIT Classification: Trusted
You should submit your assignment via Canvas ? Assignments ? Assignment 1 Submission.
You may resubmit the assignment if you need to, only the most recent version will be marked.
Please note the following.
1. Clearly number each answer according to the numbering in this assignment specification (e.g.,
Q1a, Q1b, Q1c, etc.).
2. Use at least 11-point font size.
3. It is your responsibility to correctly submit your files. Please verify that your submission is
correctly submitted by downloading what you have submitted to see if your submitted file
includes the correct content.
4. Never leave submission to the last minute – you may have difficulty uploading files.
5. You can submit multiple times – a new submission will override any earlier submissions.
However, if your final submission is after the due time, late penalties will apply.
(Note: do not forget to submit Reference and bibliography at the end of your submission)
5. Academic integrity and plagiarism (standard warning)
There is a research component to this assignment:
? Any direct references, figures, or quotes used must be cited, and
? A bibliography should be included as an appendix at the end of your report.
We will not accept citations from any encyclopedic resource, e.g., Encyclopedia Britannica,
Encarta, World Book, Wikipedia (or syndication thereof), and so on.
You may share and discuss any links and references you find relevant to completing this
assignment on the discussion forums, so long as you include how you found the resource that you
mention.
You are free to refer to textbooks, notes, work in study groups etc. to discover approaches to
problems; however, the assignment should be your own individual work.
Do not ever simply copy and paste what another writer has written. This is stealing. What we need is your
own words – your own understanding. If you try to represent someone else’s work as your own it will be
dealt with severely. Instead, we want you to paraphrase what others have said – to put the concepts they
have discussed into your own words.
When preparing a report such as this it is almost impossible to prepare an accurate report without
referring to some resources for assistance to complete the tasks. For this reason, we ask you to
reference from where you get your information. We require these references to be formally
correct according to one of the standard styles used in research. For example, either the APA or
Harvard styles would be acceptable. See the RMIT library reference guides
(http://www.rmit.edu.au/library/study/referencing) for further details.
Let us say that I want to use the ideas in the following paragraph to explain bit depth as it relates
to images:
Page 3 of 9
RMIT Classification: Trusted
“Bit depth refers to the colour information stored in an image. The higher the bit depth of an image,
the more colours it can store. The simplest image, a 1-bit image, can only show two colours, black
and white. That is because the 1 bit can only store one of two values, 0 (white) and 1 (black). An 8-
bit image can store 256 possible colours, while a 24-bit image can display about 16 million colours.”
The above paragraph was taken from the website
The first step might be to paraphrase the information about – that is to put the information above
into your own words, such as:
Bit depth signifies how many colours that can be represented in an image – the more bits per pixel
the wider the range of colours (Techease, 2020)
This would then be cited in your reference list as:
You would reference this citation similarly in the bibliography.
Please note that we require you to have both a reference list and a bibliography. The
difference between these two resources is that the bibliography lists all documents that you have
read that have contributed to your submission whereas the reference list only lists those
documents you have cited in the text of your report.
Also, with the exception of very short quotes (less than a line) we require you to put the content in
your own words – we are assessing you on your understanding of the course content, after all. If
you quote directly from a source, please ensure that the quote is within “talking marks” such as
the ones I have just used. Whether you quote directly from a source or paraphrase the source (as I
have done above) you still need to cite the source and ensure the source is included in the
reference list and bibliography.
6. Rubric and marking guidelines
Submission files not in the required format will not be marked.
A penalty of 10% per day of the total available marks will apply for each day being late. After 5
days, you will receive zero mark for the assignment.
If you want to seek an extension of time for assignment submission, you must have a substantial
reason for that, such as unexpected circumstances. Reasons such as, unable to cope with study
load, is not substantial. Also, you must apply for an extension as soon as possible. Last minute
extensions cannot be granted unless it attracts special consideration.
Any student wishing an extension must go through the official procedure for applying for
extensions and must apply at least a week before the due date. Do not wait till the submission due
date to apply for an extension.
The rubric can be found in Canvas ? Assignments ? Assignment 1.
7. Assignment questions
This assignment has 6 questions and students are required to answer all questions.
RMIT Classification: Trusted
Question 1 – Number Systems (25 marks)
Give answer to the following questions, show all your working out and intermediate steps.
For the questions (a) to (d), use the last four digits of your student number. For example, if your
student number is “s1234567”, then use X=4567 for this question. If any of these digits is a “0”, use
9 instead.
a) (3 marks) Convert X from decimal to binary.
b) (2.5+2.5 = 5 marks) Convert the binary string obtained from your answer to (a) into octal
and hexadecimal.
c) (4 marks) Convert X from decimal to base 13, where A, B and C correspond to 10, 11, and 12
respectively.
d) (1.5 + 1.5 +2 = 5 marks) Now add 3910 (39 in decimal) to X and calculate the sum in base 13.
Consider the following two calculations:
i. Conversion (base 13 to decimal) before addition (in base 13): convert 3910 into base 13,
then add the two base 13 numbers.
ii. Addition (in decimal) before conversion (decimal to base 13): add 3910 to X in
decimal, then convert the decimal sum into base 13.
Which calculation is simpler? Please explain your answer.
How many digits are different from your answer to (c)?
e) (8 marks) Consider a base 26 number system wherein the letters of the alphabet are the
digits. That is, A=0, B=1, C=2, … Z=25 in base 10. Use the first three letters of your given
name as a number in the base 26 system, and the first three letters of your surname as
another number in the base 26 system. Add these two numbers together to obtain the sum
in based 26.
Note: If your given name has letters less than two, repeat the last letter. Then a similar way is
applied for your surname.
Example 1 — if your first name is “Pe” and your surname is “Pa”, then add up PEE26 and
PAA26, and show the sum in base 26.
Example 2 — if your first name is “Peter” and your surname is “Pa”, then add up PET26 and
PAA26, and show the sum in base 26.
Example 3 — if your first name is “Pe” and your surname is “Pan”, then add up PEE26 and
PAN26, and show the sum in base 26.
RMIT Classification: Trusted
Question 2 – Binary Addition and Subtraction (25 marks)
Please answer the following questions, showing all your working out and intermediate steps.
For this question, use the last two digits of your student number. For example, if your student
number is “s1234567”, then A=7 and B=6. If either of these digits is a “0”, use 9 instead.
a) (4+4+2 = 10 marks) Convert the decimal numbers A and B to 4-bit binary numbers. Show
how to:
i. Add together these two 4-bit binary numbers: A+B.
ii. State whether the answer is valid to 4-bit arithmetic.
b) (2+8+5 = 15 marks) Using 5-bit two’s complement representation, show how to:
i. Subtract these two 5-bit binary numbers: A?B.
ii. Translate the 5-bit binary result back to decimal.
Question 3 – Bitwise Operations (10 marks)
The bitwise operators AND, OR, and XOR are used to do bit-masking; that is,
? set (make 1), reset (make 0), invert (toggle or flip) (from 0 to 1, or from 1 to 0) a bit (or bits) in
a byte (or word).
? Bit masks are strings of bits that allow for a single bitwise operation on a bit (or bits).
Commonly a bit string is 8 bits long (referred to as a byte). Conventionally, the bits in a bit string
are indexed from 0 staring with LSB. Let A = XXXX XXXX2, where each X is a unique bit (0 or 1).
Solve the following problems by finding the appropriate bitmask M and bitwise operator O. You
can also choose more than one mask and operator, such as M1, O1 and M2, O2. Show all your
working out and intermediate steps and use A = XXXX XXXX2 with your mask(s) and operator(s):
a) (2 marks) Set bit 0, bit 6 and leave the rest untouched.
b) (4 marks) Make sure that bit 3 and bit 5, and only these are reset, the others are set.
c) (4 marks) Toggle the values (the opposite of what it currently is) of bits 0, 1, 2, 5, 6, and 7,
and reset bits 3 and 4.
RMIT Classification: Trusted
Question 4 – Logic Circuits and Truth Tables (20 marks)
Solve problems related to the two circuits (note the circle is equivalent to a NOT gate) below:
Circuit 1 is the top circuit and Circuit 2 is the bottom one.
a) (5+2 = 7 marks) Write down the equivalent logic expression (simplification is NOT
required).
b) (1.5+7.5+3 = 12 marks) Write a truth table that shows the final output for inputs A, B and C
(Showing all your working out and intermediate steps, i.e., the output of each gate, in the
truth table is a column).
c) (1 mark) Compare the final output columns in these two truth tables. Do these two
expressions give the same output? Hence, are the two expressions equivalent?
Circuit 1
Circuit 2
RMIT Classification: Trusted
Question 5 – Hamming & SECDED Code (3+17= 20 marks)
Please answer the following questions, showing all your working out and intermediate steps.
a) (3 marks) For data, using 4 Hamming code parity bits determine the maximum number of
data bits that can be protected.
b) A SECDED encoded character has been retrieved, with the hexadecimal value of E76. You
may assume that the SECDED parity is even.
i. (1+2 = 3 marks) Was there an error in transmission? Explain your answer.
ii. (14 marks) If there was an error, either correct it (and report the corrected data
binary string) or explain why it could not be corrected. Show your
Hamming/SECDED table.
Hint: To obtain the original data binary string, you need to remove the parity bits.
Question 6 – Half-precision Floating-point Format (50 marks)
This is an advanced question. Do some research and find out how real (floating point) numbers
are represented in Binary.
a) Consider the following 14-bit floating-point format, assume 9-bit mantissa, 5-bit exponent,
and the two's complement representation is used for both the mantissa and
the exponent.
i. (6 marks) How would you encode the largest negative number (or the smallest
number) and the smallest positive number using the given format?
ii. (6 marks) Show how to find their decimal equivalent. Showing all your working
out and intermediate steps.
RMIT Classification: Trusted
b) Consider the following two floating point formats with the same overall size but different
size of the internal elements, the two's complement representation is used
for both the mantissa and the exponent.
i. (2 marks) Which format covers a larger interval? Which format provides a higher
accuracy?
ii. (2 marks) Please explain your answer using a few sentences and discuss the trade-
off between accuracy and range when representing real binary numbers.
c) For this question, use the last two digits of your student number. If your student
number is “s1234567”, then A=7 and B=6. If either of these digits is a “0”, use 9 instead.
x = A + B/10 = 7 + 6/10 = 7.6
y = B ÷ (A×10) = 6 ÷ (7×10) = 0.0857 (rounded to 4 decimal places)
Showing all your working out and intermediate steps:
i. (6+6= 12 marks) Convert x and y into binary using the following normalised 14-bit
floating-point representation, assume 9-bit mantissa, 5-bit exponent, and the two's
complement representation is used for both the mantissa and the exponent.
ii. (10 marks) Show the various steps needed to add together the two numbers x and y
in binary. Your result should be in the normalised form.
iii. (8 marks) Show the steps needed to convert the binary result obtained to the
decimal equivalent.
iv. (4 marks) Did you lose precision/accuracy through addition? If so, discuss what is
causing this "loss of precision" error. Discuss why “loss of precision” does not occur
otherwise.