Week2 Tutorial Chapter1 With Solution
Week2 Tutorial Chapter1 With Solution
COMPOSITION
Course Information
1. Solution
Tutorial/Lab
5
2. Solution
Tutorial/Lab
7
2. Solution
Tutorial/Lab
8
2. Solution
Tutorial/Lab
9
3. Solution
Addition of +1D and -1D with 8-bit signed integer
01H+FFH=00H
Tutorial/Lab
11
3. Solution
Addition of +1D and -1D with 16-bit signed integer
0001H+FFFFH=0000H
Tutorial/Lab
12
4. Solution
Unsigned integer 01010011B=53H=5*16+3=83D
Signed integer 01010011B=53H=5*16+3=83D
BCD code 01010011B=53D
ASCII code 01010011B=‘S’
Tutorial/Lab
14
5. Solution
Unsigned integer 10011000B=98H=9*16+8=152D
Signed integer 10011000B is a negative integer, its
negation is
01100111B+1=01101000B=68H=6*16+8=104D,
So 10011000B is -104D.
BCD code 10011000B=98H
Tutorial/Lab
16
6. Solution
Tutorial/Lab
18
7. Solution
Unsigned integer FFH+01H=00H, 255D+1D=256D, is
there something wrong?
Signed integer FFH+01H=00H, -1D+1D=0D
Tutorial/Lab
20
8. Solution
9. Solution
20-bit, 00000H-FFFFFH
32-bit, 00000000H-FFFFFFFFH
64-bit, 0000000000000000H-FFFFFFFFFFFFFFFFH
Tutorial/Lab
24
10. Solution
Please use the afforded T2-10.c to check the result
and think about sth.
Decimal Sign-magnitude One’s Complement Two’s Complement