Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COSC2473 Introduction to Computer Systems

Assignment 1

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.

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_A1.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.

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 12-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.

5. Academic integrity and plagiarism (standard warning)

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. Ifyou 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.

6. Rubric and marking guidelines

The rubric can be found in Canvas ® Assignments ® Assignment 1.

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.

Please find out how to apply for special consideration online at

https://www.rmit.edu.au/students/student-essentials/assessment-and-results/special- consideration/eligibility-and-how-to-apply

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.

7. Assignment questions

This assignment has 5 questions and students are required to answer all questions.

Question 1  Number Systems (30 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 ofyour 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)  (5 marks) Convert X from decimal to base 13, where A, B and C correspond to 10, 11, and 12 respectively.

d)  (7 marks) Now add 5210 (52 in decimal) to X and calculate the sum in base 13. Consider the following two calculations:

i.     (2 marks) Conversion (base 13 to decimal) before addition (in base 13): convert 5210 into base 13, then add the two base 13 numbers.

ii.     (2 marks) Addition (in decimal) before conversion (decimal to base 13): add 5210 to X in decimal, then convert the decimal sum into base 13.

(3 marks) Which calculation is simpler? Please explain your answer. How many digits are different from your answer to (c)?

e)  (10 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 ofyour given    name as a number in the base 26 system, and the first three letters ofyour 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 appliedfor 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.

Question 2  Binary Addition and Subtraction (30 marks)

Please answer the following questions, showing all your working out and intermediate steps.

For this question, use the last two digits ofyour 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)  (12 marks) Show how to:

i.     (5 marks) Convert the decimal numbers A and B to 4-bit binary numbers.

ii.     (5 marks) Add together these two 4-bit binary numbers: A+B.

iii.     (2 marks) State whether the answer is valid to 4-bit arithmetic.

b)   (18 marks) Using 5-bit two’s complement representation, show how to:

i.     (10 marks) Subtract these two 5-bit binary numbers: AB.

ii.     (8 marks) 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. In

this question each sub question is separate, so the sub questions do not depend on one

another.

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)  (5 marks) Set MSB (most significant bit) and LSB (least significant bit), and make sure that only these two bits are set, and the others are reset.

b)  (5 marks) Toggle the values (the opposite of what it currently is) of bits 2 and 4, reset bits 1 and 5, and leave the rest untouched.

Question 4  Logic Circuits and Truth Tables (25 marks)

Solve problems related to the given circuit.

a)  (1+1+1+1+1 = 5 marks) Write down the equivalent logic expression (simplification is NOT required). Showing all your working out and intermediate steps, i.e., the output of each gate.

b)  (2+2+2+2+2 = 10 marks) Write the 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)  (4 marks) Use Boolean algebra to simplify the expression obtained from your answer to (a) to its simplest form (simplest defined as using the smallest number ofgates). Showing all your working out and intermediate steps, i.e., the rule applied, and the output produced in every step.

d)  (3+3 = 6 mark) Draw a logic circuit diagram that implements the simplified expression (your answer to c). Obtain truth tables to verify the equality of the original expression (your answer to a) and the simplified expression (your answer to c).

Question 5  Hamming & SECDED Code (5+20= 25 marks)

Please answer the following questions, showing all your working out and intermediate steps.

a)  (5 marks) For data, using 5 Hamming code parity bits determine the maximum number of data bits that can be protected.

b)  (20 marks) Data has been encoded using an odd-parity SECDED code. The hexadecimal value was then retrieved as 883. If there was an error, either correct it and report the       corrected ASCII character or explain why it could not be corrected.

Showing your Hamming/SECDED table steps including the bits covered by each parity bit in your answer.

Hint: To obtain the original data binary string, you need to remove the parity bits.