COSC473 Introduction to Computer Systems
School of Science, RMIT University
COSC473 Introduction to Computer Systems
Semester 1, 2020
Assignment One
Question 1 — Number Systems (37 marks)
Please answer the following questions, showing all your working out and intermediate steps.
 (9 marks) Convert the last four digits of your RMIT student number to binary, octal, and hexadecimal. For example, if your student number is “s1234567”, then convert 4567_{10} to binary, octal, and hexadecimal.
 (8 marks) Convert the last four digits of your RMIT student number to base 13, where 1010=A13, 1110=B13, 1210=C13.
 (20 marks) Consider a base 26 number system wherein the letters of the alphabet represent the digits. That is, A_{26}=0_{10}, B_{26}=1_{10}, C_{26}=2_{10}, … Z_{26}=25_{10}.
Use the first three letters of your given name, and the first three letters of your surname, as numbers in the base 26 system. Add these two base 26 numbers together to obtain the sum (in base 26). Show all your working out and intermediate steps. Note: If one of these has less than three letters, repeat the last letter, e.g. LI become LII.
Example 1 — if your first name is “Peter” and your surname is “Pan”, then add up PET_{26 }and PAN_{26}, and show the sum in base 26.
Example 2 — if your first name is “Peter” and your surname is “Pa”, then add up PET_{26} and PAA_{26}, and show the sum in base 26.
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.
 (10 marks) Convert the decimal numbers A and B to 4bit binary numbers. Show how to add together these two 4bit binary numbers and state whether the answer is valid to 4bit arithmetic.
 (15 marks) Convert the decimal numbers A and B to 5bit binary numbers. Using two’s complement representation, show
(i) how to subtract the two 5bit binary numbers (A−B); (ii) how to translate the binary result back to decimal.
Question 3 — Bitwise Operations (16 marks)
The bitwise operators AND, OR, and XOR allow for bits to be reset (to 0), set (to 1), and inverted (from 0 to 1, and from 1 to 0). Bit masks are strings of bits that allow for a single bitwise operation on particular bits. Commonly a bit string is 8 bits long (referred to as a byte).
Conventionally, bit strings are indexed from 0 staring with the rightmost digit.
Let A = xxxx xxxx_{2}, where each x is a unique bit (0 or 1).
Byte A

x

x

x

x

x

x

x

x

Bit position

7

6

5

4

3

2

1

0

Find the appropriate bitmask(s) M and bitwise operator(s) for ALL byte A for the following cases, showing all your working out and intermediate steps:
 (8 marks) Reset the 2 bits on each side and make sure that only these 4 bits are reset in the byte.
 (8 marks) Toggle the values of the middle 4 bits (the opposite of what it currently is), and set the 2 bits on each side.
Question 4 — Logic Circuits and Truth Tables (37 marks)
For each of the above circuits:
 (10 marks) Write down the equivalent logic expression (simplification is NOT required).
 (25 marks) Write a truth table that shows the inputs (A, B, C) and the outputs of each gate up to and including the final output (O). Showing all your working out and intermediate steps (the output of each gate) in the truth table.
 (2 marks) Compare the final output columns in these two truth tables. Do these two expressions give the same output?
Question 5 — SECDED code (35 marks)
An evenparity SECDED encoded character has been retrieved, with the hexadecimal value of BE6_{16}. Please answer the following questions, showing all your working out and intermediate steps.
 (5 marks) Was there an error? Explain your answer.
 (30 marks) If there was an error, either correct it (reporting the corrected ASCII character) or explain why it could not be corrected.
Question 6 — Advanced Question (50 marks)
You need to attempt either 6.1 or 6.2 to be eligible for an HD for this assignment, NOT BOTH.
Question 6.1 — Halfprecision Floatingpoint Format
Do some research and find out how real (floating point) numbers are represented in Binary.
 (10 marks) Devise your own 16bit representation for floating point numbers, and explain what the various bits are used for. Explain in detail,
 how many bits are allocated to the mantissa and the exponent, respectively?
 what defines the range and the precision (or accuracy) of the numbers stored in floating point notation?
 (24 marks) If your student number is “s1234567”, then
 A=7 and B=6;
 x=A+B÷10= 7+6÷10 = 7.6
 y=B÷(A×10) = 6÷(7×10) = 0.0857 (rounded to 4 decimal places) If either of these digits is a “0”, use 9 instead.
If both of these digits are the same, use B = A1.
Show in detail:
 how x and y would be represented in binary using your 16bit representation;
 the steps needed to add together the two numbers x and y in binary; (iii) the steps needed to convert the binary result obtained to decimal.
(iv) Did you lose precision/accuracy through addition? Discuss what is causing this "loss of precision" error.
 (16 marks) When adding up a large number of floating point numbers at very different magnitudes, in what order should they be added together to get the most accurate result? Explain why with an example.
Question 6.2 — Logic Simplification using Karnaugh Maps and Boolean Algebra
Do some research and find out how a Karnauph map is used for reducing logic functions into minimal Boolean expressions.
 (20 marks) Show in detail, how to use the Kmap to simplify the logic expression of circuit (1) in Question 4.
 (20 marks) Show in detail, how to use Boolean Algebra to simplify the logic expression of circuit (1) in Question 4.
 (5 marks) Compare the above two simplification methods and discuss which is better: Boolean algebra or Kmap?
 (5 marks) What are the limitations of Karnaugh Maps? Explain with an example.
Follow Us