Professional Documents
Culture Documents
Tuanasdqwqr
Tuanasdqwqr
Duration: 90’
Lab 1:
Scoring scale: 10
12 1100 101001 41
16 10000 1001010 74
20 10100 11101111 239
26 10110 100101 37
52 110100 1101.11 13.75
133 1000 0101 111111.11 63.75
70 1000110 1.00101 1.15623
64 1000000 101111.1 47.5
7.625 111.101 1.00001 1.03125
9.5 1001.1 11.001 3.125
10.75 1010.11 10001.11 17.75
235q + 547q = ?q = ?b
=1004q = 001 000 000 100b
1D7Bh + 26FA7h = ?h = ?b
= 28D22h = 0010 1000 1101 0010 0010b
2AD7h – 1FBh = ?h = ?b
=28DCh = 0010 1000 1101 1100b
32Ah – 516q = ?h = ?b
= 1DCh = 0001 1101 1100b
62ACh – 1000101b= ?q
=61147q
Exercise 4 (1 marks)
Two integers A and B are stored in two’s complement format. Show how B is added to
A:
B= 01010110
0+1=1, 1+0=1, 1+0=1, 0+1=1, 1+1=0 nho 1, 0+0=0, 1 nho = 1, 1+0=1, 0+0=0
0+0=0, 1+1=0 nho 1, 1+0=1 nho 1=0, 1+0=1 nho 1=0, 1+1=1 1nho ,0+0=1 1 nho,
0+0=0…
Exercise 5 (3 marks)
1- Store -31(+last number of student code) in an 8-bit memory location using sign-
and-magnitude representation.(step by step)
Bieu dien 31 la 11111
So am => Bit dau la 1 => 1 11111