Professional Documents
Culture Documents
StudentCode 2021 S1 FIT1047 MA Tutorial Lab2
StudentCode 2021 S1 FIT1047 MA Tutorial Lab2
StudentCode 2021 S1 FIT1047 MA Tutorial Lab2
Student Code:
FIT1047 Tutorial/Lab 2
Topics
• 2’s complement, floating point
• Boolean logic, logic gates, logisim
Instructions
• Please use this google doc to answer all the questions in this tutorial/lab.
• The copy of google doc shared with you is only for viewing. Please make a copy into
your own google doc and start answering by editing the google doc. Go to ‘File’ and
then select ‘Make a copy’. Rename the file with your student code and lab group
number. For example, 01141088_2021_S1_FIT1047_MA_Tutorial/Lab2 where
01141088 is your student code. Please fill your name and student code in the header
of this google doc.
• Every student must submit this google doc individually
at the end of the tutorial session by converting this
google doc into PDF file. Please upload your PDF file into
Moodle → Assessment → Laboratory Submissions → Laboratory
2
1.b Create a table with all possible 4-bit binary values in one column and the decimal
they represent in the different notations.
Answer:
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
1.c Assume you want to use a bit-wise approach to add 2 n-bit 2’s complement
numbers x+y=z. You need to check for overflow.
Use the following notation:
x = xnxn−1xn−2...x1
y = ynyn−1yn−2...y1
z = znzn−1zn−2...z1
You can use a bit-wise + operator with one bit result and one bit for the carry:
0 + 0 = 0 with carry bit 0
Name:
Student Code:
In which steps do you need to check for overflow conditions? What do you need to
check?
Answer:
c) 8-bit excess-k
Answer:
b) 33−92
Answer:
Convert the following numbers to 6-bit 2’s complement notation and add
them:
a) −16+11
Answer:
b) 16−11
Answer:
c) 17+15
Answer:
d) −5−8
Answer:
a) Give the 23-bit mantissa and the 8-bit exponent of the IEEE 754 standard floating-
point representation of the decimal number 176. What is the sign bit of its IEEE
standard floating-point representation?
Answer:
3.d (Additional advanced task:) Use logisim and only AND, OR and NOT to build a
circuit for the following function:
How many gates do you need? Simplify the function first, e.g. by using k-maps.
Answer: