CEA201 - Lab01 - Ver 1.1
CEA201 - Lab01 - Ver 1.1
Duration: 90’
Lab 1:
Objective:
q Describe the decimal, binary, hexadecimal, and octal system.
q Convert a number in binary, octal, or hexadecimal to a number in the decimal system.
q Convert a number in the decimal system to a number in binary, octal, and hexadecimal.
q Convert a number in binary to octal and vice versa.
Materials:
Based on exercises of chapter 2 in the textbook “Foundations Of Computer Science, 4nd Edition, Behrouz Forouzan, 2017.”
Student's task:
- Review the whole chapter 2 content in the textbook.
- Write down solutions to exercises (step by step)
- Finish exercises and submit the results to the lecturer in class.
Scoring scale: 10
Binary Decimal
01001100
10010100
01100011
10111011
Edition, Behrouz Forouzan, 2017.”
16-bit Binary
0000 0000 1111 1111
cimal ones
16-bit Binary
0000 0000 1111 1111
result (octal)
Dec Oc
X= 0 0
Y= 5 5
Z= 9 2
Bài 1
Old Add New
44 X 44
115 Y 120
175 Z 184
168 X 168
47 Y 52
76 Z 85
37 Y 42
98 X 98
89 Z 98
108 Z 117
Bài 3
Thay các ký tự "X", "Y", "Z" vào các số cần thay thế, riêng biểu thức kiểu bin thì sẽ lựa chọn vị trí đảo bit của số thứ nhất
Bài 4
Old Add New
240 X 240
165 Y 170
118 Z 127
Old Add New
552 X 552
166 Y 171
434 Z 443
76 38 19 9 4 2 1 0
108 54 27 13 6 3 1 0
99 49 24 12 6 3 1 0
69 34 17 8 4 2 1 0
0 0 1 1 0 0 1 0
0 0 1 1 0 1 1 0
1 1 0 0 0 1 1 0
1 0 1 0 0 0 1 0
0 0 1 0 1 1 0
0 0 1 0 1 0 0
1 0 1 1 1 0 0
1 1 0 1 1 1 0