Solution TD 01
Solution TD 01
• (15F)16 = (537)8 15F16 = 0001 0101 11112 = 000 101 011 1112 = 5378
University of 20 august 1955 - Skikda – ﺳﻜ�ﻜﺪة1955 أوت20 ﺟﺎﻣﻌﺔ
Faculty of technology – Department of technology كﻠ�ﺔ اﻟﺘﻜﻨﻮﻟﻮﺟ�ﺎ – ﻗﺴﻢ اﻟﺘﻜﻨﻮﻟﻮﺟ�ﺎ
1st year common core technology engineer ﻣﺸ�ك ﻣﻬﻨﺪس ﺗﻜﻨﻮﻟﻮﺟ�ﺎاﻟﺴﻨﺔ اﻷو� ﺟﺬع ت
Exercise 02:
Exercise 03:
For unsigned n-bit integer the values vary between 0 and 2n-1,
So for 4-bit we have the interval [0 .. 24-1] = [0 .. 15]
Unsigned integers in 4 bits
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
For signed n-bit integer with the two's complement system the values vary between -2n-1 and 2n-1-1,
So for 4-bit we have the interval [-23 .. 23-1] = [-8 .. 7]
Signed integers in 4 bits (two's complement)
0 1 2 3 4 5 6 7 -8 -7 -6 -5 -4 -3 -2 -1
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
7 0111,
3 0011,
-7 inversing (0111) + 1 1000 + 1 1001
-3 inversing (0011) + 1 1100 + 1 1101
We can’t put the number -10 in a signed 4-bit space because it is outside the limit of the interval [-8, 7]
University of 20 august 1955 - Skikda – ﺳﻜ�ﻜﺪة1955 أوت20 ﺟﺎﻣﻌﺔ
Faculty of technology – Department of technology كﻠ�ﺔ اﻟﺘﻜﻨﻮﻟﻮﺟ�ﺎ – ﻗﺴﻢ اﻟﺘﻜﻨﻮﻟﻮﺟ�ﺎ
1st year common core technology engineer ﻣﺸ�ك ﻣﻬﻨﺪس ﺗﻜﻨﻮﻟﻮﺟ�ﺎاﻟﺴﻨﺔ اﻷو� ﺟﺬع ت
Exercise 04:
25 ÷ 20 = 1 Reminder = 5
• (25)10 = ( )20 1 ÷ 20 = 0 Reminder = 1
360 ÷ 20 = 18 Reminder = 0
• (360)10 = ( )20
18 ÷ 20 = 0 Reminder = 18
• ( )20 = ( 78)10
20 = 18 × 200 + 3 × 201 = 18 + 60 = 78
Exercise 05:
• First line (20 characters) + 2 characters (CR + LF) +
University Of Skikda
second line (21 characters) = 43 characters. Each Faculty Of Technology
one �its in one byte, then the total size is 43 bytes.
• 17.6 MB = 17.6*210 KB = 17.6*210*8 Kb = 144179.2 Kb;
(144179.2 Kb) / (256 Kb/s) = 563.2 seconds = 9.39 minutes.
• 24 bits BMP: 200*150*3 = 90000 bytes = 87.89 KB
256 intensities: 200*150*1 = 30000 bytes = 29.29 KB
16 intensities: 200*150*0.5 = 15000 bytes = 14.65 KB
(plus some bytes for header information in the beginning of the �ile)
University of 20 august 1955 - Skikda – ﺳﻜ�ﻜﺪة1955 أوت20 ﺟﺎﻣﻌﺔ
Faculty of technology – Department of technology كﻠ�ﺔ اﻟﺘﻜﻨﻮﻟﻮﺟ�ﺎ – ﻗﺴﻢ اﻟﺘﻜﻨﻮﻟﻮﺟ�ﺎ
1st year common core technology engineer ﻣﺸ�ك ﻣﻬﻨﺪس ﺗﻜﻨﻮﻟﻮﺟ�ﺎاﻟﺴﻨﺔ اﻷو� ﺟﺬع ت
BASE
10 8 16 2
0 0 0 0
1 1 1 1
2 2 2 10
3 3 3 11
4 4 4 100
5 5 5 101
6 6 6 110
7 7 7 111
8 10 8 1000
9 11 9 1001
10 12 A 1010
11 13 B 1011
12 14 C 1100
13 15 D 1101
14 16 E 1110
15 17 F 1111
16 20 10 10000